start(prefix + ":" + p.getName().getLocalPart(), atts); encodeProperty(f, p2); end(prefix + ":" + p.getName().getLocalPart()); addAttribute(attributes, "crs", AbstractRecordDescriptor.DEFAULT_CRS_NAME); start("gmd:EX_GeographicBoundingBox", attributes); element("gmd:westBoundLongitude", minx ); element("gmd:southBoundLatitude", miny); element("gmd:eastBoundLongitude", maxx); element("gmd:northBoundLatitude", maxy); end("gmd:EX_GeographicBoundingBox"); } catch (Exception e) { throw new ServiceException("Failed to encode the current record: " + f, e); encodeSimpleLiteral(p);
start(prefix + ":" + p.getName().getLocalPart(), atts); encodeProperty(f, p2); end(prefix + ":" + p.getName().getLocalPart()); addAttribute(attributes, "crs", AbstractRecordDescriptor.DEFAULT_CRS_NAME); start("gmd:EX_GeographicBoundingBox", attributes); element("gmd:westBoundLongitude", minx); element("gmd:southBoundLatitude", miny); element("gmd:eastBoundLongitude", maxx); element("gmd:northBoundLatitude", maxy); end("gmd:EX_GeographicBoundingBox"); } catch (Exception e) { throw new ServiceException("Failed to encode the current record: " + f, e); encodeSimpleLiteral(p);
public void encode(CSWRecordsResult response, Feature f) { encodeProperty(f, f); }
public void encode(CSWRecordsResult response, Feature f) { encodeProperty(f, f); }
@Override public Translator createTranslator(ContentHandler handler) { return new MetaDataTranslator(handler); }
@Override public Translator createTranslator(ContentHandler handler) { return new MetaDataTranslator(handler); }
private void encodeSimpleLiteral(Property p) { String value = p.getValue().toString(); Name dn = p.getDescriptor().getName(); String name = dn.getLocalPart(); String prefix = MetaDataDescriptor.NAMESPACES.getPrefix(dn.getNamespaceURI()); AttributesImpl attributes = new AttributesImpl(); element(prefix + ":" + name, value, attributes); }
private void encodeSimpleLiteral(Property p) { String value = p.getValue().toString(); Name dn = p.getDescriptor().getName(); String name = dn.getLocalPart(); String prefix = MetaDataDescriptor.NAMESPACES.getPrefix(dn.getNamespaceURI()); AttributesImpl attributes = new AttributesImpl(); element(prefix + ":" + name, value, attributes); } }