Java 8 NamespaceSupport - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 NamespaceSupport class.

This code example shows how to use the following methods: declarePrefix, getPrefixes, popContext, pushContext, reset
    } 
 
    public void testReset() { 
        int count;
 
        ns = new NamespaceSupport();
        count = countPrefixes();
 
        ns.pushContext();
        ns.declarePrefix("dc", "http://www.purl.org/dc#");
 
        assertEquals("Test 1: Incorrect prefix count;",
                count + 1, countPrefixes());
 
        ns.reset();
        assertEquals("Test 2: Incorrect prefix count;",
                count, countPrefixes());
 
        // Check that only one context has been created by reset(). 
        try { 

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: declarePrefix
  /** 
   * Test that the {@link StepList} for the root element is properly formed. 
   */ 
  @Test
    public void testRootElementSteps() { 
        NamespaceSupport namespaces = new NamespaceSupport();
 
        try { 
            XPathUtil.rootElementSteps(null, namespaces);
            fail("passed null"); 
        } catch (NullPointerException e) {
        } 
 
        FeatureType complexType = ComplexTestData
                .createExample05NoNamespaceURI(new UniqueNameFeatureTypeFactoryImpl()); 
        Name name = complexType.getName();
        AttributeDescriptor descriptor = new AttributeDescriptorImpl(complexType, name, 0,
                Integer.MAX_VALUE, true, null);
 
        try { 

7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: declarePrefix
    public List<String> getVendorSpecificCapabilitiesChildDecls(GetCapabilitiesRequest request) {
        return Collections.emptyList();
    } 
 
    public void registerNamespaces(NamespaceSupport namespaces) {
        namespaces.declarePrefix("inspire_vs", NAMESPACE);
        namespaces.declarePrefix("gml", "http://schemas.opengis.net/gml");
        namespaces
                .declarePrefix("gmd", "http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd");
        namespaces
                .declarePrefix("gco", "http://schemas.opengis.net/iso/19139/20060504/gco/gco.xsd");
        namespaces
                .declarePrefix("srv", "http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd");
        // IGN : We add another xmlns for inspire_common 
        namespaces
                .declarePrefix("inspire_common", "http://inspire.ec.europa.eu/schemas/common/1.0");
    } 
 
    public void encode(Translator tx, WMSInfo wms, GetCapabilitiesRequest request)
            throws IOException {
        Version requestVersion = WMS.version(request.getVersion());
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: declarePrefix, getPrefixes, popContext, pushContext, reset
    } 
 
    public void testReset() { 
        int count;
 
        ns = new NamespaceSupport();
        count = countPrefixes();
 
        ns.pushContext();
        ns.declarePrefix("dc", "http://www.purl.org/dc#");
 
        assertEquals("Test 1: Incorrect prefix count;",
                count + 1, countPrefixes());
 
        ns.reset();
        assertEquals("Test 2: Incorrect prefix count;",
                count, countPrefixes());
 
        // Check that only one context has been created by reset(). 
        try { 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: declarePrefix
    @Before 
    public void setUp() throws Exception { 
        /** 
         * Set up filter factory 
         */ 
        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gsml", GSMLNS);
        namespaces.declarePrefix("gml", GMLNS);
        ff = new FilterFactoryImplNamespaceAware(namespaces);
         
        /** 
         * Load mapped feature data access 
         */         
        Map<String, Serializable> dsParams = new HashMap<String, Serializable>();
        URL url = PropSelectionTest.class.getResource(schemaBase + "MappedFeaturePropertyfile.xml");
        assertNotNull(url);
 
        dsParams.put("dbtype", "app-schema");
        dsParams.put("url", url.toExternalForm());
        DataAccess<FeatureType, Feature> mfDataAccess = DataAccessFinder.getDataStore(dsParams);
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 NamespaceSupport Methods: