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;
}
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;
}
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;
}
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;
}
Aggregations