Examples of inspectStatement()


Examples of com.hp.hpl.jena.eyeball.inspectors.AllTypedInspector.inspectStatement()

    @Test public void testUntypedLiteralReportedWhenConfigured()
        {
        AllTypedInspector ins = new AllTypedInspector( resourceInModel( "root eye:checkLiteralTypes eye:true" ) );
        Model m = model( "a rdf:type U" );
        Statement source = statement( m, "a P 'untypedString'" );
        ins.inspectStatementr, source );
        assertIsoModels( itemModel( "[eye:mainProperty eye:hasNoType & eye:hasNoType 'untypedString']", source ), r.model() );
        }
   
    @Test public void testLanguagedLiteralNotReported()
        {
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.AllTypedInspector.inspectStatement()

   
    @Test public void testLanguagedLiteralNotReported()
        {
        AllTypedInspector ins = new AllTypedInspector( resourceInModel( "root eye:checkLiteralTypes eye:true" ) );
        Model m = model( "a rdf:type U" );
        ins.inspectStatementr, statement( m, "a P 'untypedString'en-UK" ) );
        assertIsoModels( model( "" ), r.model() );
        }

    @Test public void testUntypedObjectsNotReportedByDefault()
        {
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.AllTypedInspector.inspectStatement()

    @Test public void testUntypedObjectsReportedIfConfigured()
        {
        AllTypedInspector ins = new AllTypedInspector( resourceInModel( "root eye:checkObjectTypes eye:true" ) );
        Model m = model( "a rdf:type U" );
        Statement aPb = statement( m, "a P b" );
        ins.inspectStatementr, aPb );
        assertIsoModels( itemModel( "[eye:mainProperty eye:hasNoType & eye:hasNoType b]", aPb ), r.model() );
        }
    }

/*
 
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.ListInspector.inspectStatement()

           
            @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 );
        }
   
    @Test public void testChecksNilWellFormed()
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.ListInspector.inspectStatement()

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

Examples of com.hp.hpl.jena.eyeball.inspectors.LiteralInspector.inspectStatement()

      // Check the rest of the model for other instances of this issue and repair (LiteralInspector only reports one usage at a time)
      Report r = new Report();
          LiteralInspector inspector = new LiteralInspector();
          inspector.inspectModel( r, (OntModel)output );
          for (StmtIterator itb = ((OntModel)output).getBaseModel().listStatements(); itb.hasNext();)
              inspector.inspectStatement( r, itb.nextStatement() );
          inspector.end( r );
         
          if( r.model().size() > 0 )
            { // New items were found to report; analyse and doctor them
            LiteralAnalysis litA = new LiteralAnalysis();
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.LiteralInspector.inspectStatement()

        final List<Literal> literals = new ArrayList<Literal>();
        LiteralInspector ins = new LiteralInspector()
            {
            public void inspectLiteral( Report r, Statement s, Literal L ) { literals.add( L ); }
            };
        ins.inspectStatement( new Report(), statement( "s p 17" ) );
        assertEquals( listOfOne( L17 ), literals );
        }
   
    @Test public void testLiteralInspectorDeclaresPredicates()
        {
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.VocabularyInspector.inspectStatement()

        Inspector i = new VocabularyInspector()
            {
            public void inspectURI( Report ignored, Statement s, Resource res )
                { uris.add( res.getURI() ); }
            };
        i.inspectStatement( new Report(), statement( "S P O" ) );
        assertEquals( listOfStrings( "eh:/S eh:/P eh:/O" ), uris );
        }
   
    @Test public void testNoAssumptionsCreatesBuiltinNamespaceTable()
        {
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.