public FIInspector( FileIdentifierInspector inspector ) { this.config = inspector; nsContext.addNamespace( "srv", "http://www.isotc211.org/2005/srv" ); nsContext.addNamespace( "gmd", "http://www.isotc211.org/2005/gmd" ); nsContext.addNamespace( "gco", "http://www.isotc211.org/2005/gco" ); nsContext.addNamespace( SDS_PREFIX, SDS_NS ); }
/** * Creates a new {@link OWSCommon110CapabilitiesAdapter} instance. */ public OWSCommon110CapabilitiesAdapter() { super( OWS_11_NS ); nsContext.addNamespace( "wps", WPS_100_NS ); }
/** * Creates a new {@link WMTSCapabilitiesAdapter} instance. */ public WMTSCapabilitiesAdapter() { nsContext.addNamespace( "wmts", WMTS_100_NS ); }
/** * Creates a new {@link WPS100CapabilitiesAdapter} instance. */ public WPS100CapabilitiesAdapter() { nsContext.addNamespace( "wps", WPS_100_NS ); nsContext.addNamespace( "ows", OWS_11_NS ); nsContext.addNamespace( "xlink", XLNNS ); }
public HierarchyLevelInspector() { nsContext.addNamespace( "srv", "http://www.isotc211.org/2005/srv" ); nsContext.addNamespace( "gmd", "http://www.isotc211.org/2005/gmd" ); nsContext.addNamespace( "gco", "http://www.isotc211.org/2005/gco" ); }
protected AbstractOWSCommonCapabilitiesAdapter( String owsNs ) { nsContext.addNamespace( "ows", owsNs ); nsContext.addNamespace( "xlink", XLNNS ); }
public WFS110CapabilitiesAdapter() { nsContext.addNamespace( "wfs", WFS_NS ); }
@Override public void setPrefix( String prefix, String uri ) throws XMLStreamException { nsBindings.addNamespace( prefix, uri ); activeWriter.setPrefix( prefix, uri ); }
public CoupledDataInspector( CoupledResourceInspector config ) { this.config = config; nsContext = new NamespaceBindings(); nsContext.addNamespace( "srv", "http://www.isotc211.org/2005/srv" ); nsContext.addNamespace( "gmd", "http://www.isotc211.org/2005/gmd" ); nsContext.addNamespace( "gco", "http://www.isotc211.org/2005/gco" ); }
@Override public void writeNamespace( String prefix, String namespaceURI ) throws XMLStreamException { nsBindings.addNamespace( prefix, namespaceURI ); activeWriter.writeNamespace( prefix, namespaceURI ); }
@Override public void writeStartElement( String prefix, String localName, String namespaceURI ) throws XMLStreamException { nsBindings.addNamespace( prefix, namespaceURI ); activeWriter.writeStartElement( prefix, localName, namespaceURI ); openElements++; }
@Override public void writeAttribute( String prefix, String namespaceURI, String localName, String value ) throws XMLStreamException { nsBindings.addNamespace( prefix, namespaceURI ); activeWriter.writeAttribute( prefix, namespaceURI, localName, value ); }
@Override public void writeDefaultNamespace( String namespaceURI ) throws XMLStreamException { nsBindings.addNamespace( DEFAULT_NS_PREFIX, namespaceURI ); activeWriter.writeDefaultNamespace( namespaceURI ); }
@Override public void setDefaultNamespace( String uri ) throws XMLStreamException { nsBindings.addNamespace( DEFAULT_NS_PREFIX, uri ); activeWriter.setDefaultNamespace( uri ); }
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; }
private QName determineTargetElementAdv( XMLAdapter annotationXML ) { NamespaceBindings nsContext = new NamespaceBindings(); nsContext.addNamespace( "xs", CommonNamespaces.XSNS ); nsContext.addNamespace( "adv", "http://www.adv-online.de/nas" ); QName refElement = annotationXML.getNodeAsQName( annotationXML.getRootElement(), new XPath( "xs:appinfo/adv:referenziertesElement/text()", nsContext ), null ); if ( refElement != null ) { LOG.trace( "Identified a target element annotation (adv style)." ); } return refElement; }
private QName determineTargetElementXGml( XMLAdapter annotationXML ) { NamespaceBindings nsContext = new NamespaceBindings(); nsContext.addNamespace( "xs", CommonNamespaces.XSNS ); QName refElement = annotationXML.getNodeAsQName( annotationXML.getRootElement(), new XPath( "xs:appinfo[@source='urn:x-gml:targetElement']/text()", nsContext ), null ); if ( refElement != null ) { LOG.trace( "Identified a target element annotation (urn:x-gml style)." ); } return refElement; }
private NamespaceBindings getNamespaceBindings( final List<PrebindNamespace> prebindNamespaces ) { if ( prebindNamespaces == null ) { return null; } final NamespaceBindings nsBindings = new NamespaceBindings(); for ( final PrebindNamespace prebindNamespace : prebindNamespaces ) { nsBindings.addNamespace( prebindNamespace.getPrefix(), prebindNamespace.getUri() ); } return nsBindings; }
@SuppressWarnings("unchecked") private void augmentNamespaceContext( OMElement element, NamespaceBindings nsContext ) { Iterator<OMNamespace> iterator = element.getAllDeclaredNamespaces(); while ( iterator.hasNext() ) { OMNamespace namespace = iterator.next(); if ( nsContext.translateNamespacePrefixToUri( namespace.getPrefix() ) == null ) { nsContext.addNamespace( namespace.getPrefix(), namespace.getNamespaceURI() ); } } OMContainer parent = element.getParent(); if ( parent != null && parent instanceof OMElement ) { augmentNamespaceContext( (OMElement) parent, nsContext ); } }
/** * Creates a new {@link NamespaceNormalizationInspector} instance. * * @param config * inspector configuration, must not be <code>null</code> */ public NamespaceNormalizationInspector( NamespaceNormalizer config ) { if ( config.getNamespaceBinding() != null ) { for ( NamespaceBinding binding : config.getNamespaceBinding() ) { String prefix = binding.getPrefix(); String namespaceUri = binding.getNamespaceURI(); LOG.debug( "'" + prefix + "' -> '" + namespaceUri + "'" ); nsBindings.addNamespace( prefix, namespaceUri ); } } }