Package com.hp.jena.rules.ast

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


        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

        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

        assertEquals( "my:B#", AB.getURI( "b" ) );
        }
   
    @Test public void testOverridingPrefersLaterPrefix()
        {
        PrefixMapping A = PrefixMapping.create().setPrefix( "a", "my:A#" );
        PrefixMapping B = PrefixMapping.create().setPrefix( "a", "my:B#" );
        PrefixMapping AB = A.overriddenBy( B );
        assertEquals( "my:B#", AB.getURI( "a" ) );
        assertEquals( null, AB.getURI( "b" ) );
        }
View Full Code Here

TOP

Related Classes of com.hp.jena.rules.ast.PrefixMapping

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.