use of org.apache.abdera.model.Entry in project ddf by codice.
the class AbstractTestCompositeGeometry method getSampleAtomEntry.
/**
* Creates an Atom Entry with GeoRSS encoded in GML.
*
* @param composite
* @return Atom entry as text
* @throws org.locationtech.jts.io.ParseException
* @throws IOException
*/
protected String getSampleAtomEntry(CompositeGeometry composite) throws IOException {
List<Position> positions = composite.toGeoRssPositions();
Entry sampleEntry = ABDERA.newEntry();
for (Position pos : positions) {
GeoHelper.addPosition(sampleEntry, pos, Encoding.GML);
}
StringWriter writer = new StringWriter();
sampleEntry.writeTo(writer);
return writer.toString();
}
use of org.apache.abdera.model.Entry in project mycore by MyCoRe-Org.
the class MCRSwordMetadataProvider method provideListMetadata.
/**
* @param id the id of the MyCoReObject as String
*/
public Entry provideListMetadata(MCRObjectID id) throws SwordError {
Entry feedEntry = Abdera.getInstance().newEntry();
feedEntry.setId(id.toString());
MCRSwordUtil.BuildLinkUtil.getEditMediaIRIStream(lifecycleConfiguration.getCollection(), id.toString()).forEach(feedEntry::addLink);
feedEntry.addLink(MCRFrontendUtil.getBaseURL() + MCRSwordConstants.SWORD2_EDIT_IRI + lifecycleConfiguration.getCollection() + "/" + id, "edit");
return feedEntry;
}
Aggregations