Package com.hp.hpl.jena.eyeball.inspectors

Examples of com.hp.hpl.jena.eyeball.inspectors.ListInspector


            {
            Statement s = it.nextStatement();
            OntModel m = ModelFactory.createOntologyModel();
            m.add( xListT.getBaseModel() );
            m.remove( s );
            ListInspector x = new ListInspector();
            x.inspectModel( new Report(), m );
            if (!s.equalsstatement( "x rdfs:subClassOf rdf:List" ) ))
                assertEquals( "BROKEN for missing " + s, 1, x.getSuspectListTypes().size() );
            if (x.getIdiomaticListTypes().size() > 1)
                fail( "list type mistakenly found from partial description " + nice( m.getBaseModel().getGraph(), new HashMap<Node, Object>() ) );
            }
        }
View Full Code Here


        }
   
    @Test public void testInspectStatementCallsCheckListIfPropertyListful()
        {
        final Set<Resource> history = new HashSet<Resource>();
        Inspector x = new ListInspector()
            {
            @Test public void inspectModel( Report r, OntModel assume )
                { propertiesWithListRange.put( resource( "P" ), resource( "T" ) ); }
           
            @Test public void inspectList( Report r, Statement s, Resource root, Resource type )
                { history.add( root ); }
            };
        x.inspectModel( r, ontModel( "" ) );
        x.inspectStatement( r, statement( "a P b" ) );
        x.inspectStatement( r, statement( "c Q d" ) );
        assertEquals( resourceSet( "b" ), history );
        }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.eyeball.inspectors.ListInspector

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.