Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.NamespaceSupport.declarePrefix()


        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


    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

        /**
         * 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

        /**
         * 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));
    }

    public void testWithPrefix() throws Exception {
View Full Code Here

                    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

        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

    }
   
    public void testPreservedNamespaceContext() {
        // set GEOT-3756
        NamespaceSupport nsContext = new NamespaceSupport();
        nsContext.declarePrefix("f", "http://feature.example.org");
        Expression geometry = fac.property("f:name", nsContext);
        BBOX bbox = fac.bbox(geometry, 0, 0, 1, 1, "EPSG:4326");
        DuplicatingFilterVisitor visitor = new DuplicatingFilterVisitor(fac);
        BBOX clone = (BBOX) bbox.accept(visitor, null);
        assertEquals(bbox, clone);
View Full Code Here

        List<DeleteElementType> deletes = changes.getDelete();
        List<UpdateElementType> updates = changes.getUpdate();
        List<InsertElementType> inserts = changes.getInsert();
        for (DeleteElementType delete : deletes) {
            QName typeName = delete.getTypeName();
            namespaces.declarePrefix(typeName.getPrefix(), typeName.getNamespaceURI());
        }
        for (UpdateElementType update : updates) {
            QName typeName = update.getTypeName();
            namespaces.declarePrefix(typeName.getPrefix(), typeName.getNamespaceURI());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.