Search in sources :

Example 1 with OnlineResourceType

use of org.geotoolkit.se.xml.v110.OnlineResourceType in project geotoolkit by Geomatys.

the class GTtoSLD110Transformer method visit.

@Override
public UseSLDLibrary visit(final SLDLibrary library, final Object data) {
    final UseSLDLibrary lib = sld_factory.createUseSLDLibrary();
    final OnlineResourceType online = visit(library.getOnlineResource(), null);
    lib.setOnlineResource(online);
    return lib;
}
Also used : OnlineResourceType(org.geotoolkit.se.xml.v110.OnlineResourceType) UseSLDLibrary(org.geotoolkit.sld.xml.v110.UseSLDLibrary)

Example 2 with OnlineResourceType

use of org.geotoolkit.se.xml.v110.OnlineResourceType in project ddf by codice.

the class CswEndpoint method buildServiceProvider.

/**
 * Creates the ServiceProvider portion of the GetCapabilities response TODO: Add more DDF-specific
 * information if desired
 *
 * @return The constructed ServiceProvider object
 */
private ServiceProvider buildServiceProvider() {
    ServiceProvider sp = new ServiceProvider();
    sp.setProviderName(PROVIDER_NAME);
    sp.setProviderSite(new OnlineResourceType());
    sp.setServiceContact(new ResponsiblePartySubsetType());
    return sp;
}
Also used : OnlineResourceType(net.opengis.ows.v_1_0_0.OnlineResourceType) ServiceProvider(net.opengis.ows.v_1_0_0.ServiceProvider) ResponsiblePartySubsetType(net.opengis.ows.v_1_0_0.ResponsiblePartySubsetType)

Example 3 with OnlineResourceType

use of org.geotoolkit.se.xml.v110.OnlineResourceType in project geotoolkit by Geomatys.

the class SE110toGTTransformer method visitFTS.

/**
 * Transform a SLD v1.1 FeatureTypeStyle or CoverageStyle in GT FTS.
 */
public MutableFeatureTypeStyle visitFTS(final Object obj) throws FactoryException {
    if (obj == null)
        return null;
    if (obj instanceof OnlineResourceType) {
        final OnlineResourceType ort = (OnlineResourceType) obj;
        final OnlineResource or = visitOnlineResource(ort);
        if (or != null) {
            try {
                return xmlUtilities.readFeatureTypeStyle(or, Specification.SymbologyEncoding.V_1_1_0);
            } catch (JAXBException ex) {
                Logger.getLogger("org.geotoolkit.sld.xml").log(Level.WARNING, null, ex);
            }
            return null;
        }
    } else if (obj instanceof CoverageStyleType) {
        final MutableFeatureTypeStyle fts = styleFactory.featureTypeStyle();
        final CoverageStyleType cst = (CoverageStyleType) obj;
        fts.setName(cst.getName());
        fts.setDescription(visitDescription(cst.getDescription()));
        fts.semanticTypeIdentifiers().addAll(visitSemantics(cst.getSemanticTypeIdentifier()));
        if (cst.getCoverageName() != null) {
            fts.featureTypeNames().add(NamesExt.create(cst.getCoverageName()));
        }
        if (cst.getRuleOrOnlineResource() == null || cst.getRuleOrOnlineResource().isEmpty()) {
        } else {
            for (Object objRule : cst.getRuleOrOnlineResource()) {
                fts.rules().add(visitRule(objRule));
            }
        }
        return fts;
    } else if (obj instanceof FeatureTypeStyleType) {
        final MutableFeatureTypeStyle fts = styleFactory.featureTypeStyle();
        final FeatureTypeStyleType ftst = (FeatureTypeStyleType) obj;
        fts.setName(ftst.getName());
        fts.setDescription(visitDescription(ftst.getDescription()));
        fts.semanticTypeIdentifiers().addAll(visitSemantics(ftst.getSemanticTypeIdentifier()));
        if (ftst.getFeatureTypeName() != null) {
            fts.featureTypeNames().add(NamesExt.create(ftst.getFeatureTypeName()));
        }
        if (ftst.getRuleOrOnlineResource() == null || ftst.getRuleOrOnlineResource().isEmpty()) {
        } else {
            for (final Object objRule : ftst.getRuleOrOnlineResource()) {
                fts.rules().add(visitRule(objRule));
            }
        }
        return fts;
    }
    return null;
}
Also used : OnlineResource(org.opengis.metadata.citation.OnlineResource) OnlineResourceType(org.geotoolkit.se.xml.v110.OnlineResourceType) JAXBException(javax.xml.bind.JAXBException) MutableFeatureTypeStyle(org.geotoolkit.style.MutableFeatureTypeStyle) CoverageStyleType(org.geotoolkit.se.xml.v110.CoverageStyleType) FeatureTypeStyleType(org.geotoolkit.se.xml.v110.FeatureTypeStyleType)

Example 4 with OnlineResourceType

use of org.geotoolkit.se.xml.v110.OnlineResourceType in project geotoolkit by Geomatys.

the class GTtoSE110Transformer method visit.

/**
 * Transform a GT onlineResource in jaxb online resource.
 */
public org.geotoolkit.se.xml.v110.OnlineResourceType visit(final OnlineResource onlineResource, final Object data) {
    final OnlineResourceType ort = se_factory.createOnlineResourceType();
    ort.setHref(onlineResource.getLinkage().toString());
    return ort;
}
Also used : OnlineResourceType(org.geotoolkit.se.xml.v110.OnlineResourceType)

Aggregations

OnlineResourceType (org.geotoolkit.se.xml.v110.OnlineResourceType)3 JAXBException (javax.xml.bind.JAXBException)1 OnlineResourceType (net.opengis.ows.v_1_0_0.OnlineResourceType)1 ResponsiblePartySubsetType (net.opengis.ows.v_1_0_0.ResponsiblePartySubsetType)1 ServiceProvider (net.opengis.ows.v_1_0_0.ServiceProvider)1 CoverageStyleType (org.geotoolkit.se.xml.v110.CoverageStyleType)1 FeatureTypeStyleType (org.geotoolkit.se.xml.v110.FeatureTypeStyleType)1 UseSLDLibrary (org.geotoolkit.sld.xml.v110.UseSLDLibrary)1 MutableFeatureTypeStyle (org.geotoolkit.style.MutableFeatureTypeStyle)1 OnlineResource (org.opengis.metadata.citation.OnlineResource)1