Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.NamespaceSupport


        final FeatureSource<FeatureType, Feature> fSource = (FeatureSource<FeatureType, Feature>) mappingDataStore
                .getFeatureSource(typeName);
        final String queryProperty = "sa:shape/geo:LineByVector/geo:origin/@xlink:href";
        final String queryLiteral = "#bh.176909a.start";

        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("sa", SANS);
        namespaces.declarePrefix("geo", GEONS);
        namespaces.declarePrefix("xlink", XLINK.NAMESPACE);

        FeatureCollection<FeatureType, Feature> features = (FeatureCollection) fSource
                .getFeatures();
        Feature f = (Feature) features.features().next();
        traverse(f);
View Full Code Here


    /**
     * No parameters constructor for use by the digester configuration engine as a JavaBean
     */
    public XmlFeatureTypeMapping() {
        super(null, null, new LinkedList<AttributeMapping>(), new NamespaceSupport());
    }
View Full Code Here

        return combinedExpressions;
    }

    public List<Expression> visit(PropertyName expr, Object arg1) {
        String targetXPath = expr.getPropertyName();
        NamespaceSupport namespaces = mappings.getNamespaces();
        AttributeDescriptor root = mappings.getTargetFeature();

        List<NestedAttributeMapping> nestedMappings = mappings.getNestedMappings();
        // break into single steps
        StepList simplifiedSteps = XPath.steps(root, targetXPath, namespaces);
View Full Code Here

    @Before
    public void setUp() throws Exception {
        /**
         * Set up filter factory
         */
        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("ex", "http://example.com");
        namespaces.declarePrefix("gml", "http://www.opengis.net/gml");
        ff = new FilterFactoryImplNamespaceAware(namespaces);

        /**
         * Load data access
         */
 
View Full Code Here

        final String GSML_URI = "urn:cgi:xmlns:CGI:GeoSciML:2.0";
        /**
         * Set up filter factory
         */
        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gsml", GSML_URI);
        namespaces.declarePrefix("gml", "http://www.opengis.net/gml");
        ff = new FilterFactoryImplNamespaceAware(namespaces);

        /**
         * Load data access
         */
 
View Full Code Here

*/
public class XSQNameBindingTest extends TestCase {
    XSQNameBinding binding;

    protected void setUp() throws Exception {
        NamespaceSupport ns = new NamespaceSupport();
        ns.declarePrefix("foo", "http://foo");
       
        binding = new XSQNameBinding(new NamespaceSupportWrapper(ns));
    }
View Full Code Here

    }
   
 
    private static NamespaceSupport getNameSpaces(Node node)
    {
        NamespaceSupport namespaces = new NamespaceSupport();
        while (node != null)
        {
            NamedNodeMap atts = node.getAttributes();
           
            if (atts != null) {
                for (int i=0; i<atts.getLength(); i++){
                    Node att = atts.item(i);
                   
                    if (att.getNamespaceURI() != null
                            && att.getNamespaceURI().equals("http://www.w3.org/2000/xmlns/")
                            && namespaces.getURI(att.getLocalName()) == null){
                        namespaces.declarePrefix(att.getLocalName(), att.getNodeValue());
                    }
                }
            }
           
            node = node.getParentNode();
View Full Code Here

        System.out.println("testProperties");
        Query query = new Query();
        assertNull(query.getProperties());
        List<PropertyName> properties = new ArrayList<PropertyName>();
       
        NamespaceSupport nsContext = new NamespaceSupport();
        nsContext.declarePrefix("foo", "FooNamespace");
       
        PropertyName fooProp = ff.property("foo", nsContext);
        PropertyName barProp = ff.property("bar", nsContext);
        properties.add(fooProp);
        properties.add(barProp);
View Full Code Here

        // create the document handler + root context
        // DocumentHandler docHandler =
        // handlerFactory.createDocumentHandler(this);

        MutablePicoContainer context = wfsConfiguration.setupContext(new DefaultPicoContainer());
        NamespaceSupport namespaces = new NamespaceSupport();
        // setup the namespace support
        context.registerComponentInstance(namespaces);
        context.registerComponentInstance(new NamespaceSupportWrapper(namespaces));

        // binding factory support
View Full Code Here

        /**
         * Utility method to copy namespace declarations from "sub" translators
         * into this ns support...
         */
        protected void addNamespaceDeclarations(TranslatorSupport trans) {
            NamespaceSupport additional = trans.getNamespaceSupport();
            java.util.Enumeration declared = additional.getDeclaredPrefixes();
            while (declared.hasMoreElements()) {
                String prefix1 = declared.nextElement().toString();
                nsSupport.declarePrefix(prefix1, additional.getURI(prefix1));
            }
        }
View Full Code Here

TOP

Related Classes of org.xml.sax.helpers.NamespaceSupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.