Examples of PrefixMapping


Examples of com.hp.hpl.jena.shared.PrefixMapping

    // ---- prefixes

    @Test public void graphDSG_prefixes_1()
    {
        Graph g = makeNamedGraph(baseDSG, gn1) ;
        PrefixMapping pmap = g.getPrefixMapping() ;
        assertNotNull(pmap) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.shared.PrefixMapping

    }
   
    @Test public void graphDSG_prefixes_2()
    {
        Graph g = makeNamedGraph(baseDSG, Quad.unionGraph) ;
        PrefixMapping pmap = g.getPrefixMapping() ;
        assertNotNull(pmap) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.shared.PrefixMapping

    }
   
    @Test public void graphDSG_prefixes_3()
    {
        Graph g = makeDefaultGraph(baseDSG) ;
        PrefixMapping pmap = g.getPrefixMapping() ;
        assertNotNull(pmap) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.shared.PrefixMapping

   
    @Test public void graphDSG_prefixes_4()
    {
        // All graphs exist.
        Graph g = makeNamedGraph(baseDSG, gnNotSuchGraph;
        PrefixMapping pmap = g.getPrefixMapping() ;
        assertNotNull(pmap) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.shared.PrefixMapping

            return ;
        }
       
        if ( isPrefix )
        {
            PrefixMapping newMappings = BuilderPrefixMapping.build(item) ;
            prologue = prologue.sub(newMappings) ;
            // Remember first prefix mapping seen.
            if( topMap == null )
                topMap = newMappings ;
            return ;
View Full Code Here

Examples of com.hp.hpl.jena.shared.PrefixMapping

    {
        try {
            if ( dataset != null )
            {
                // Load the models prefixes first
                PrefixMapping m = dataset.getDefaultModel() ;
                model.setNsPrefixes(m) ;
            }
            // Then add the queries (just the declared mappings)
            // so the query declarations override the data sources.
            model.setNsPrefixes(query.getPrefixMapping()) ;
View Full Code Here

Examples of com.hp.hpl.jena.shared.PrefixMapping

    }

    @Test public void multiple1()
    {
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.testing() ;
        PrefixMapping pmap1 = prefixes.getPrefixMapping() ;
        PrefixMapping pmap2 = prefixes.getPrefixMapping("http://graph/") ;
        pmap1.setNsPrefix("x", "http://foo/") ;
        assertNull(pmap2.getNsPrefixURI("x")) ;
        assertNotNull(pmap1.getNsPrefixURI("x")) ;
    }
View Full Code Here

Examples of com.hp.jena.rules.ast.PrefixMapping

public class TestPrefixMapping
    {
    @Test public void testAbsentPrefixMapsToNull()
        {
        PrefixMapping pm = PrefixMapping.create().setPrefix( "my", "spoo:/flarn#" );
        assertEquals( null, pm.getURI( "your" ) );
        }
View Full Code Here

Examples of com.hp.jena.rules.ast.PrefixMapping

        assertEquals( null, pm.getURI( "your" ) );
        }
   
    @Test public void testMapsPrefixIfPresent()
        {
        PrefixMapping pm = PrefixMapping.create().setPrefix( "my", "spoo:/flarn#" );
        assertEquals( "spoo:/flarn#", pm.getURI( "my" ) );
        }
View Full Code Here

Examples of com.hp.jena.rules.ast.PrefixMapping

        assertEquals( "spoo:/flarn#", pm.getURI( "my" ) );
        }
   
    @Test public void testOverridingMergesDifferentPrefixes()
        {
        PrefixMapping A = PrefixMapping.create().setPrefix( "a", "my:A#" );
        PrefixMapping B = PrefixMapping.create().setPrefix( "b", "my:B#" );
        PrefixMapping AB = A.overriddenBy( B );
        assertEquals( "my:A#", AB.getURI( "a" ) );
        assertEquals( "my:B#", AB.getURI( "b" ) );
        }
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.