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

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


   
    public void testCreatesDocumentManager()
        {
        Resource root = resourceInModel( "x rdf:type ja:DocumentManager" );
        Assembler a = new DocumentManagerAssembler();
        Object x = a.open( root );
        assertInstanceOf( OntDocumentManager.class, x );
        }
   
    public void testUsesFileManager()
        {
View Full Code Here


        {
        Resource root = resourceInModel( "x rdf:type ja:DocumentManager; x ja:fileManager f" );
        Assembler a = new DocumentManagerAssembler();
        FileManager fm = new FileManager();
        Assembler mock = new NamedObjectAssembler( resource( "f" ), fm );
        Object x = a.open( mock, root );
        assertInstanceOf( OntDocumentManager.class, x );
        assertSame( fm, ((OntDocumentManager) x).getFileManager() );
        }
   
    public void testSetsPolicyPath()
View Full Code Here

                        history.add( path );
                        super.setMetadataSearchPath( path, replace ); }
                    };
                }
            };
        OntDocumentManager d = (OntDocumentManager) a.open( root );
        assertEquals( listOfOne( "somePath" ), history );
        }   
   
    public void testTrapsPolicyPathNotString()
        {
View Full Code Here

    private void testTrapsBadPolicyPath( String path )
        {
        Resource root = resourceInModel( "x rdf:type ja:DocumentManager; x ja:policyPath <policy>".replaceAll( "<policy>", path ) );
        Assembler a = new DocumentManagerAssembler();
        try
            { a.open( root );
            fail( "should trap illegal policy path object " + path ); }
        catch (BadObjectException e)
            { assertEquals( resource( "x" ), e.getRoot() );
            assertEquals( rdfNode( root.getModel(), path ), e.getObject() ); }
        }
View Full Code Here

                        history.add( "called" );
                        super.processMetadata( m ); }
                    };
                }
            };
        OntDocumentManager d = (OntDocumentManager) a.open( root );
        assertEquals( listOfOne( "called" ), history );
        }
    }
View Full Code Here

   
    public void testCreatesDocumentManager()
        {
        Resource root = resourceInModel( "x rdf:type ja:DocumentManager" );
        Assembler a = new DocumentManagerAssembler();
        Object x = a.open( root );
        assertInstanceOf( OntDocumentManager.class, x );
        }
   
    public void testUsesFileManager()
        {
View Full Code Here

        {
        Resource root = resourceInModel( "x rdf:type ja:DocumentManager; x ja:fileManager f" );
        Assembler a = new DocumentManagerAssembler();
        FileManager fm = new FileManager();
        Assembler mock = new NamedObjectAssembler( resource( "f" ), fm );
        Object x = a.open( mock, root );
        assertInstanceOf( OntDocumentManager.class, x );
        assertSame( fm, ((OntDocumentManager) x).getFileManager() );
        }
   
    public void testSetsPolicyPath()
View Full Code Here

                        history.add( path );
                        super.setMetadataSearchPath( path, replace ); }
                    };
                }
            };
        OntDocumentManager d = (OntDocumentManager) a.open( root );
        assertEquals( listOfOne( "somePath" ), history );
        }   
   
    public void testTrapsPolicyPathNotString()
        {
View Full Code Here

    private void testTrapsBadPolicyPath( String path )
        {
        Resource root = resourceInModel( "x rdf:type ja:DocumentManager; x ja:policyPath <policy>".replaceAll( "<policy>", path ) );
        Assembler a = new DocumentManagerAssembler();
        try
            { a.open( root );
            fail( "should trap illegal policy path object " + path ); }
        catch (BadObjectException e)
            { assertEquals( resource( "x" ), e.getRoot() );
            assertEquals( rdfNode( root.getModel(), path ), e.getObject() ); }
        }
View Full Code Here

                        history.add( "called" );
                        super.processMetadata( m ); }
                    };
                }
            };
        OntDocumentManager d = (OntDocumentManager) a.open( root );
        assertEquals( listOfOne( "called" ), history );
        }
    }
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.