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

Examples of com.hp.hpl.jena.assembler.assemblers.PrefixMappingAssembler


    @Override protected Class<? extends Assembler> getAssemblerClass()
        { return PrefixMappingAssembler.class; }

    public void testPrefixMappingAssemblerType()
        { testDemandsMinimalType( new PrefixMappingAssembler(), JA.PrefixMapping )}
View Full Code Here


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

   
    public void testSimplePrefixMapping()
        {
        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 );
        }
View Full Code Here

   
    public void testIncludesSingleMapping()
        {
        PrefixMapping wanted = PrefixMapping.Factory.create()
            .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 );
        }
View Full Code Here

        {
        PrefixMapping wanted = PrefixMapping.Factory.create()
            .setNsPrefix( "p1", "some:prefix/" )
            .setNsPrefix( "p2", "other:prefix/" )
            .setNsPrefix( "p3", "simple:prefix#" );
        Assembler a = new PrefixMappingAssembler();
        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

    @Override protected Class<? extends Assembler> getAssemblerClass()
        { return PrefixMappingAssembler.class; }

    public void testPrefixMappingAssemblerType()
        { testDemandsMinimalType( new PrefixMappingAssembler(), JA.PrefixMapping )}
View Full Code Here

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

   
    public void testSimplePrefixMapping()
        {
        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 );
        }
View Full Code Here

   
    public void testIncludesSingleMapping()
        {
        PrefixMapping wanted = PrefixMapping.Factory.create()
            .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 );
        }
View Full Code Here

        {
        PrefixMapping wanted = PrefixMapping.Factory.create()
            .setNsPrefix( "p1", "some:prefix/" )
            .setNsPrefix( "p2", "other:prefix/" )
            .setNsPrefix( "p3", "simple:prefix#" );
        Assembler a = new PrefixMappingAssembler();
        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

Related Classes of com.hp.hpl.jena.assembler.assemblers.PrefixMappingAssembler

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.