use of org.w3._2005.atom.LinkType in project geotoolkit by Geomatys.
the class OwcXmlIO method write.
private static FeedType write(final MapLayers context) throws FactoryException {
final FeedType feed = ATOM_FACTORY.createFeedType();
final LinkType link = ATOM_FACTORY.createLinkType();
link.setRel("profile");
link.setHref("http://www.opengis.net/spec/owc-atom/1.0/req/core");
link.setTitle(context.getIdentifier() == null ? "" : context.getIdentifier());
feed.getAuthorOrCategoryOrContributor().add(ATOM_FACTORY.createFeedTypeLink(link));
final TextType title = ATOM_FACTORY.createTextType();
title.getContent().add(context.getIdentifier() == null ? "" : context.getIdentifier());
feed.getAuthorOrCategoryOrContributor().add(ATOM_FACTORY.createFeedTypeTitle(title));
final Envelope aoi = context.getAreaOfInterest();
if (aoi != null) {
final String ogc = IdentifiedObjects.lookupURN(aoi.getCoordinateReferenceSystem(), null);
final WhereType where = GEORSS_FACTORY.createWhereType();
final DirectPositionType lowerCorner = new DirectPositionType(aoi.getLowerCorner());
final DirectPositionType upperCorner = new DirectPositionType(aoi.getUpperCorner());
final EnvelopeType envelopeType = new EnvelopeType(null, lowerCorner, upperCorner, ogc);
envelopeType.setSrsDimension(2);
where.setEnvelope(envelopeType);
feed.getAuthorOrCategoryOrContributor().add(GEORSS_FACTORY.createWhere(where));
}
for (final MapItem mapItem : context.getComponents()) {
toEntry(null, mapItem, feed.getAuthorOrCategoryOrContributor());
}
return feed;
}
Aggregations