public boolean getRequiredNodeAsBoolean( OMElement context, XPath xpath ) throws XMLParsingException { String s = getRequiredNodeAsString( context, xpath ); boolean value = parseBoolean( s ); return value; }
public double getRequiredNodeAsDouble( OMElement context, XPath xpath ) throws XMLParsingException { String s = getRequiredNodeAsString( context, xpath ); double value = parseDouble( s ); return value; }
public URL getRequiredNodeAsURL( OMElement context, XPath xpath ) throws XMLParsingException { String s = getRequiredNodeAsString( context, xpath ); URL value = parseURL( s ); return value; }
public float getRequiredNodeAsFloat( OMElement context, XPath xpath ) throws XMLParsingException { String s = getRequiredNodeAsString( context, xpath ); float value = parseFloat( s ); return value; }
public int getRequiredNodeAsInteger( OMElement context, XPath xpath ) throws XMLParsingException { String s = getRequiredNodeAsString( context, xpath ); int value = parseInt( s ); return value; }
/** * Get the id from an element of a href. * * @param sourceCRSProp * @return * @throws XMLParsingException */ private String getIdFromElemOrXlink( OMElement sourceCRSProp ) throws XMLParsingException { String result = sourceCRSProp.getAttributeValue( new QName( CommonNamespaces.XLNNS, "href" ) ); if ( result == null || "".equals( result ) ) { result = adapter.getRequiredNodeAsString( sourceCRSProp, new XPath( "*[1]/" + PRE + "identifier", nsContext ) ); } return result; }
/** * @return the sourceObject */ public String getSourceObject() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "@sourceObject", ns ) ); }
/** * @return the classifiedObject */ public String getClassifiedObject() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "@classifiedObject", ns ) ); }
/** * @return the id */ public String getId() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "./@id", ns ) ); }
/** * @return the targetObject */ public String getTargetObject() { return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "@targetObject", ns ) ); }
/** * @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 ) ); }
/** * @param rootElement * containing an gml:CoordinateSystemAxis type dom representation. * @return an {@link Axis} instance initialized with values from the given XML-OM fragment or <code>null</code> if * the given root element is <code>null</code> if the axis could not be mapped it's orientation will be * {@link Axis#AO_OTHER} * * @throws XMLParsingException * if the dom tree is not consistent or a required element is missing. */ protected IAxis parseAxis( OMElement rootElement ) throws XMLParsingException { if ( rootElement == null ) { LOG.debug( "The given axis element is null, returning nothing" ); return null; } String name = adapter.getRequiredNodeAsString( rootElement, new XPath( PRE + "axisAbbrev", nsContext ) ); String orientation = adapter.getRequiredNodeAsString( rootElement, new XPath( PRE + "axisDirection", nsContext ) ); IUnit unit = parseUnitOfMeasure( rootElement ); if ( unit == null ) { unit = Unit.METRE; } return new Axis( unit, name, orientation ); }
String identifier; try { identifier = adapter.getRequiredNodeAsString( rootElement, new XPath( PRE + "identifier", nsContext ) ); } catch ( XMLParsingException e ) { LOG.error( "Could not find the required identifier node for the given gml:identifiable with localname: "