Search in sources :

Example 11 with Role

use of org.n52.shetland.iso.gco.Role in project arctic-sea by 52North.

the class OwsServiceProviderFactory method create.

@Override
protected OwsServiceProvider create(Locale language) throws ConfigurationError {
    // TODO organisation name is missing
    String organisationName = null;
    OwsOnlineResource onlineResource = null;
    if (site != null) {
        onlineResource = new OwsOnlineResource(site);
    }
    OwsCode roleCode = null;
    if (role != null) {
        roleCode = new OwsCode(role, roleCodespace);
    }
    OwsOnlineResource providerSite = null;
    if (onlineResoureHref != null) {
        providerSite = new OwsOnlineResource(onlineResoureHref, onlineResoureTitle);
    }
    OwsAddress address = null;
    if (anyNonNull(deliveryPoint, city, administrativeArea, postalCode, country, electronicMailAddress)) {
        address = new OwsAddress(deliveryPoint, city, administrativeArea, postalCode, country, electronicMailAddress);
    }
    OwsPhone owsPhone = null;
    if (anyNonNull(phone, facsimile)) {
        owsPhone = new OwsPhone(phone, facsimile);
    }
    OwsContact contactInfo = null;
    if (anyNonNull(owsPhone, address, onlineResource, hoursOfService, contactInstructions)) {
        contactInfo = new OwsContact(owsPhone, address, onlineResource, hoursOfService, contactInstructions);
    }
    OwsResponsibleParty serviceContact = new OwsResponsibleParty(individualName, organisationName, positionName, contactInfo, roleCode);
    return new OwsServiceProvider(name, providerSite, serviceContact);
}
Also used : OwsOnlineResource(org.n52.shetland.ogc.ows.OwsOnlineResource) OwsResponsibleParty(org.n52.shetland.ogc.ows.OwsResponsibleParty) OwsContact(org.n52.shetland.ogc.ows.OwsContact) OwsServiceProvider(org.n52.shetland.ogc.ows.OwsServiceProvider) OwsCode(org.n52.shetland.ogc.ows.OwsCode) OwsAddress(org.n52.shetland.ogc.ows.OwsAddress) OwsPhone(org.n52.shetland.ogc.ows.OwsPhone)

Example 12 with Role

use of org.n52.shetland.iso.gco.Role in project arctic-sea by 52North.

the class AbstractCapabilitiesBaseTypeDecoder method parseRequestMethod.

private OwsRequestMethod parseRequestMethod(String httpMethod, RequestMethodType method) {
    if (method == null) {
        return null;
    }
    URI href = Optional.ofNullable(method.getHref()).map(Strings::emptyToNull).map(URI::create).orElse(null);
    URI role = Optional.ofNullable(method.getRole()).map(Strings::emptyToNull).map(URI::create).orElse(null);
    URI arcrole = Optional.ofNullable(method.getArcrole()).map(Strings::emptyToNull).map(URI::create).orElse(null);
    Show show = Optional.ofNullable(method.getShow()).map(Object::toString).map(Show::valueOf).orElse(null);
    Actuate actuate = Optional.ofNullable(method.getActuate()).map(Object::toString).map(Actuate::valueOf).orElse(null);
    String title = method.getTitle();
    List<OwsDomain> constraints = parseDomains(method.getConstraintArray());
    return new OwsRequestMethod(href, constraints, httpMethod, role, arcrole, title, show, actuate);
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) Actuate(org.n52.shetland.w3c.xlink.Actuate) Show(org.n52.shetland.w3c.xlink.Show) XmlObject(org.apache.xmlbeans.XmlObject) LocalizedString(org.n52.janmayen.i18n.LocalizedString) MultilingualString(org.n52.janmayen.i18n.MultilingualString) OwsLanguageString(org.n52.shetland.ogc.ows.OwsLanguageString) OwsRequestMethod(org.n52.shetland.ogc.ows.OwsRequestMethod) URI(java.net.URI) Strings(com.google.common.base.Strings)

Example 13 with Role

use of org.n52.shetland.iso.gco.Role in project arctic-sea by 52North.

the class Iso19139GcoDecoder method encodeCodeListValue.

private Role encodeCodeListValue(CodeListValueType circ) {
    Role role = new Role(circ.getStringValue());
    role.setCodeList(circ.getCodeList());
    role.setCodeListValue(circ.getCodeListValue());
    return role;
}
Also used : Role(org.n52.shetland.ogc.sensorML.Role)

Aggregations

Test (org.junit.Test)6 CodeWithAuthority (org.n52.shetland.ogc.gml.CodeWithAuthority)6 SamplingFeature (org.n52.shetland.ogc.om.features.samplingFeatures.SamplingFeature)6 SamplingFeatureComplex (org.n52.shetland.ogc.om.features.samplingFeatures.SamplingFeatureComplex)6 LocalizedString (org.n52.janmayen.i18n.LocalizedString)4 MultilingualString (org.n52.janmayen.i18n.MultilingualString)4 OwsLanguageString (org.n52.shetland.ogc.ows.OwsLanguageString)4 Strings (com.google.common.base.Strings)3 URI (java.net.URI)3 XmlObject (org.apache.xmlbeans.XmlObject)3 Actuate (org.n52.shetland.w3c.xlink.Actuate)3 Show (org.n52.shetland.w3c.xlink.Show)3 OwsCode (org.n52.shetland.ogc.ows.OwsCode)2 OwsContact (org.n52.shetland.ogc.ows.OwsContact)2 OwsOnlineResource (org.n52.shetland.ogc.ows.OwsOnlineResource)2 OwsResponsibleParty (org.n52.shetland.ogc.ows.OwsResponsibleParty)2 ReferenceType (org.n52.shetland.ogc.gml.ReferenceType)1 OwsAddress (org.n52.shetland.ogc.ows.OwsAddress)1 OwsDomain (org.n52.shetland.ogc.ows.OwsDomain)1 OwsMetadata (org.n52.shetland.ogc.ows.OwsMetadata)1