Package com.hp.hpl.jena.assembler.assemblers

Examples of com.hp.hpl.jena.assembler.assemblers.PrefixMappingAssembler.open()


   
    public void testConstructEmptyPrefixMapping()
        {
        Assembler a = new PrefixMappingAssembler();
        Resource root = resourceInModel( "pm rdf:type ja:PrefixMapping" );
        Object pm = a.open( root );
        assertInstanceOf( PrefixMapping.class, pm );
        }
   
    public void testSimplePrefixMapping()
        {
View Full Code Here


        {
        PrefixMapping wanted = PrefixMapping.Factory.create()
            .setNsPrefix( "pre", "some:prefix/" );
        Assembler a = new PrefixMappingAssembler();
        Resource root = resourceInModel( "pm rdf:type ja:PrefixMapping; pm ja:prefix 'pre'; pm ja:namespace 'some:prefix/'" );
        PrefixMapping pm = (PrefixMapping) a.open( root );
        assertSamePrefixMapping( wanted, pm );
        }
   
    public void testIncludesSingleMapping()
        {
View Full Code Here

            .setNsPrefix( "pre", "some:prefix/" );
        Assembler a = new PrefixMappingAssembler();
        Resource root = resourceInModel
            ( "root rdf:type ja:PrefixMapping; root ja:includes pm"
            + "; pm rdf:type ja:PrefixMapping; pm ja:prefix 'pre'; pm ja:namespace 'some:prefix/'" );
        PrefixMapping pm = (PrefixMapping) a.open( root );
        assertSamePrefixMapping( wanted, pm );
        }
   
    public void testIncludesMultipleMappings()
        {
View Full Code Here

        Resource root = resourceInModel
            ( "root rdf:type ja:PrefixMapping"
            + "; root ja:includes pm1; pm1 rdf:type ja:PrefixMapping; pm1 ja:prefix 'p1'; pm1 ja:namespace 'some:prefix/'"
            + "; root ja:includes pm2; pm2 rdf:type ja:PrefixMapping; pm2 ja:prefix 'p2'; pm2 ja:namespace 'other:prefix/'"
            + "; root ja:prefix 'p3'; root ja:namespace 'simple:prefix#'" );
        PrefixMapping pm = (PrefixMapping) a.open( root );
        assertSamePrefixMapping( wanted, pm );
        }
    }
View Full Code Here

   
    public void testConstructEmptyPrefixMapping()
        {
        Assembler a = new PrefixMappingAssembler();
        Resource root = resourceInModel( "pm rdf:type ja:PrefixMapping" );
        Object pm = a.open( root );
        assertInstanceOf( PrefixMapping.class, pm );
        }
   
    public void testSimplePrefixMapping()
        {
View Full Code Here

        {
        PrefixMapping wanted = PrefixMapping.Factory.create()
            .setNsPrefix( "pre", "some:prefix/" );
        Assembler a = new PrefixMappingAssembler();
        Resource root = resourceInModel( "pm rdf:type ja:PrefixMapping; pm ja:prefix 'pre'; pm ja:namespace 'some:prefix/'" );
        PrefixMapping pm = (PrefixMapping) a.open( root );
        assertSamePrefixMapping( wanted, pm );
        }
   
    public void testIncludesSingleMapping()
        {
View Full Code Here

            .setNsPrefix( "pre", "some:prefix/" );
        Assembler a = new PrefixMappingAssembler();
        Resource root = resourceInModel
            ( "root rdf:type ja:PrefixMapping; root ja:includes pm"
            + "; pm rdf:type ja:PrefixMapping; pm ja:prefix 'pre'; pm ja:namespace 'some:prefix/'" );
        PrefixMapping pm = (PrefixMapping) a.open( root );
        assertSamePrefixMapping( wanted, pm );
        }
   
    public void testIncludesMultipleMappings()
        {
View Full Code Here

        Resource root = resourceInModel
            ( "root rdf:type ja:PrefixMapping"
            + "; root ja:includes pm1; pm1 rdf:type ja:PrefixMapping; pm1 ja:prefix 'p1'; pm1 ja:namespace 'some:prefix/'"
            + "; root ja:includes pm2; pm2 rdf:type ja:PrefixMapping; pm2 ja:prefix 'p2'; pm2 ja:namespace 'other:prefix/'"
            + "; root ja:prefix 'p3'; root ja:namespace 'simple:prefix#'" );
        PrefixMapping pm = (PrefixMapping) a.open( root );
        assertSamePrefixMapping( wanted, pm );
        }
    }
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.