Examples of inspectModel()


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

            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

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

                { 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

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

    if ( didRepair )
      {
      // 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 )
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.SparqlDrivenInspector.inspectModel()

        {
        Report r = new Report();
        String sparql = "select * where {?s ?p ?o}";
        Resource root = resourceInModel( "root eye:require '<S>'".replaceAll( "<S>", sparql ) );
        SparqlDrivenInspector s = new SparqlDrivenInspector( root );
        s.inspectModel( r, ontModel( "" ) );
        String expect =
            "[eye:mainProperty eye:sparqlRequireFailed & eye:sparqlRequireFailed '<S>']"
            .replaceAll"<S>", sparql )
            ;
        assertIsoModels( itemModel( expect ), r.model() );
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.SparqlDrivenInspector.inspectModel()

        {
        Report r = new Report();
        String sparql = "select * where {?s ?p ?o}";
        Resource root = resourceInModel( "root eye:sparql [eye:require '<S>' & eye:message 'WHOOPS']".replaceAll( "<S>", sparql ) );
        SparqlDrivenInspector s = new SparqlDrivenInspector( root );
        s.inspectModel( r, ontModel( "" ) );
        String expect = "[eye:mainProperty eye:sparqlRequireFailed & eye:sparqlRequireFailed 'WHOOPS']" ;
        assertIsoModels( itemModel( expect ), r.model() );
        }
   
    @Test public void testAcceptsSPOPresence()
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.SparqlDrivenInspector.inspectModel()

        {
        Report r = new Report();
        String sparql = "select * where {?s ?p ?o}";
        Resource root = resourceInModel( "root eye:require '<S>'".replaceAll( "<S>", sparql ) );
        SparqlDrivenInspector s = new SparqlDrivenInspector( root );
        s.inspectModel( r, ontModel( "my count 17" ) );
        assertIsoModels( itemModel( "" ), r.model() );
        }
   
    @Test public void testRejectsSPOPresence()
        {
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.SparqlDrivenInspector.inspectModel()

        {
        Report r = new Report();
        String sparql = "select * where {?s ?p ?o}";
        Resource root = resourceInModel( "root eye:prohibit '<S>'".replaceAll( "<S>", sparql ) );
        SparqlDrivenInspector s = new SparqlDrivenInspector( root );
        s.inspectModel( r, ontModel( "my count 17" ) );
        String expect =
            "[eye:mainProperty eye:sparqlProhibitFailed & eye:sparqlProhibitFailed '<S>']"
            .replaceAll"<S>", sparql )
            ;
        assertIsoModels( "should report prohibition violation", itemModel( expect ), r.model() );
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.SparqlDrivenInspector.inspectModel()

        {
        Report r = new Report();
        String sparql = "select * where {?s ?p ?o}";
        Resource root = resourceInModel( "root eye:sparql [eye:prohibit '<S>' & eye:message 'SPOO']".replaceAll( "<S>", sparql ) );
        SparqlDrivenInspector s = new SparqlDrivenInspector( root );
        s.inspectModel( r, ontModel( "my count 17" ) );
        String expect =
            "[eye:mainProperty eye:sparqlProhibitFailed & eye:sparqlProhibitFailed 'SPOO']"
            .replaceAll"<S>", sparql )
            ;
        assertIsoModels( "should report prohibition violation", itemModel( expect ), r.model() );
View Full Code Here

Examples of com.hp.hpl.jena.eyeball.inspectors.SparqlDrivenInspector.inspectModel()

        {
        Report r = new Report();
        String sparql = "select * where {?s ?p ?o}";
        Resource root = resourceInModel( "root eye:prohibit '@\"NAME\"'" );
        SparqlDrivenInspector s = new InsertingInspector( root, "NAME", sparql );
        s.inspectModel( r, ontModel( "my count 17" ) );
        String expect =
            "[eye:mainProperty eye:sparqlProhibitFailed & eye:sparqlProhibitFailed '@\"NAME\"']";
        assertIsoModels( "should report prohibition violation", itemModel( expect ), r.model() );       
        }
   
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.