public List<ExtrinsicObject> getExtrinsicObjects( String type ) { if ( !extrinsicObjects.containsKey( type ) ) { List<ExtrinsicObject> eos = new ArrayList<ExtrinsicObject>(); List<OMElement> eoElems = adapter.getElements( adapter.getRootElement(), getEOPath( type ) ); for ( OMElement eoElem : eoElems ) { eos.add( new ExtrinsicObject( eoElem ) ); } extrinsicObjects.put( type, eos ); } return extrinsicObjects.get( type ); }
/** * @return the path */ public String getPath() { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./@path", ns ), null ); }
/** * @return the classificationScheme */ public String getClassificationScheme() { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "@classificationScheme", ns ), null ); }
/** * @return the classificationNode */ public String getClassificationNode() { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "@classificationNode", ns ), null ); }
/** * Returns the {@link RIMType}. * * @return {@link RIMType}, never <code>null</code> */ public RIMType getRIMType() { return RIMType.valueOf( adapter.getRootElement().getLocalName() ); }
/** * @return the id */ public String getId() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "./@id", ns ) ); }
/** * @return the extId */ public String getExtId() { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./rim:ExternalIdentifier/rim:Name/rim:LocalizedString/@value", ns ), null ); }
/** * @return the queryExpression */ public OMElement getQueryExpression() { return adapter.getElement( adapter.getRootElement(), new XPath( "./rim:QueryExpression", ns ) ); }
/** * @return the name */ public String getROName() { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./rim:Name/rim:LocalizedString/@value", ns ), null ); }
public String getSlotValue( String slotName ) { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./rim:Slot[@name='" + slotName + "']/rim:ValueList/rim:Value[1]", ns ), null ); }
/** * @return the sourceObject */ public String getSourceObject() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "@sourceObject", ns ) ); }
private void loadRecord( File recordFile ) throws IOException { FileInputStream recordStream = new FileInputStream( recordFile ); OMElement document = new XMLAdapter( recordStream ).getRootElement(); document.build(); MetadataRecord record = MetadataRecordFactory.create( document ); recordStream.close(); if ( !( record instanceof ISORecord ) ) { LOG.debug( "Ignore record {}: is not a ISO19139 record.", recordFile.getName() ); return; } addOrUpdateRecord( (ISORecord) record, recordFile ); }
/** * @return the classifiedObject */ public String getClassifiedObject() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "@classifiedObject", ns ) ); }
/** * @return the versionInfo */ public String getVersionInfo() { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./rim:versionInfo/@versionName", ns ), null ); }
/** * @return the objectType */ public String getObjectType() { return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./@objectType", ns ), null ); }
/** * @return the associationType */ public String getAssociationType() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "@associationType", ns ) ); }
/** * @return the queryLanguage */ public String getQueryLanguage() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "./@queryLanguage", ns ) ); }
public ReturnableElement getElementSetName() { String reAsString = adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./rim:QueryExpression/csw:Query/csw:ElementSetName", ns ), null ); ReturnableElement re = ReturnableElement.summary; try { re = ReturnableElement.valueOf( reAsString ); } catch ( Exception e ) { // } return re; }
/** * * @param request * the type of {@link WPVSRequestType} * @return whether the request is defined in the getCapabilities xml file */ public synchronized boolean isOperationSupported( WPVSRequestType request ) { XPath xp = new XPath( "//ows:Operation[@name='" + request.name() + "']", nsContext ); return capabilities.getElement( capabilities.getRootElement(), xp ) != null; }
private QName determineTargetElementGml32( XMLAdapter annotationXML ) { NamespaceBindings nsContext = new NamespaceBindings(); nsContext.addNamespace( "xs", CommonNamespaces.XSNS ); nsContext.addNamespace( "gml", GML3_2_NS ); QName refElement = annotationXML.getNodeAsQName( annotationXML.getRootElement(), new XPath( "xs:appinfo/gml:targetElement/text()", nsContext ), null ); if ( refElement != null ) { LOG.trace( "Identified a target element annotation (GML 3.2 style)." ); } return refElement; }