Package com.hp.jena.ymris.deploy.reasoner

Examples of com.hp.jena.ymris.deploy.reasoner.DirectReasoner


    private void testNetInference( String baseTriples, String rules, String desiredTriples ) throws ParseException
        {
        Ymris y = new Ymris( new StringReader( rules ) );
        YAST yast = y.ymris();
        Reasoner r = new DirectReasoner( yast.ruleSets().get( 0 ) );
        Graph base = graphWith( baseTriples );
        InfGraph ig = r.bind( base );
        assertIsomorphic( graphWith( desiredTriples ), ig );
        }
View Full Code Here


            result.withDefaultMappings( PrefixMapping.Extended );
            return result;
            }
        else
            {
            Reasoner r = new DirectReasoner( ruleSets.get( 0 ) );
            InfGraph ig = r.bind( m.getGraph() );
            Model result = ModelFactory.createModelForGraph( ig );
            result.setNsPrefixes( m.getNsPrefixMap() );
            result.withDefaultMappings( PrefixMapping.Extended );
            return result;
            }
View Full Code Here

        YAST yast = y.ymris();
        List<RuleSet> ruleSets = yast.ruleSets();
        RuleSet A = ruleSets.get(0), B = ruleSets.get(1);
//        Net B = YASTtoNet.rulesetToNet( ruleSets.get( 1 ) );
        Graph base = graphWith( "" );
        InfGraph igA = new DirectReasoner( A ).bind( base );
        igA.size();
        igA.getPrefixMapping()
            .setNsPrefix( "xsd", "http://www.w3.org/2001/XMLSchema#" )
            .setNsPrefix( "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" )
            .setNsPrefix( "rdfs", "http://www.w3.org/2000/01/rdf-schema#" )
            .setNsPrefix( "rb", "urn:x-hp-jena:rubrik/xsdBase" )
            ;
        ModelFactory.createModelForGraph( igA ).write( System.err, "TTL" );
        InfGraph igB = new DirectReasoner( B ).bind( igA );
        igB.size();
        return igB;
        }
View Full Code Here

TOP

Related Classes of com.hp.jena.ymris.deploy.reasoner.DirectReasoner

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.