Package org.mindswap.pellet.jena.graph.loader

Examples of org.mindswap.pellet.jena.graph.loader.GraphLoader


   
    rebind();
  }
 
  public GraphLoader attachTemporaryGraph(Graph tempGraph) {
    GraphLoader savedLoader = loader;
   
    SimpleUnion unionGraph = (SimpleUnion) savedLoader.getGraph();
    unionGraph.addGraph( tempGraph );
       
    loader = new DefaultGraphLoader();
    loader.setGraph( unionGraph );
    loader.setKB( kb );
View Full Code Here


 
  @Override
    public ExtendedIterator<Triple> find(Node subject, Node property, Node object, Graph param) {
    prepare();
   
    GraphLoader savedLoader = attachTemporaryGraph( param );

    ExtendedIterator<Triple> result = graphBaseFind( subject, property, object );

    detachTemporaryGraph( param, savedLoader );
View Full Code Here

   
    OntBuilder builder = new OntBuilder( kb );
    KnowledgeBase copyKB;
    PelletInfGraph copyGraph;

    GraphLoader loader = new DefaultGraphLoader();
    for( ATermAppl axiom : explanation ) {
      prunedExplanation.remove( axiom );

      copyKB = builder.build( prunedExplanation );
      copyGraph = new PelletInfGraph( copyKB, (PelletReasoner) getReasoner(), loader );
View Full Code Here

   
    rebind();
  }
 
  public GraphLoader attachTemporaryGraph(Graph tempGraph) {
    GraphLoader savedLoader = loader;
   
    SimpleUnion unionGraph = (SimpleUnion) savedLoader.getGraph();
    unionGraph.addGraph( tempGraph );
       
    loader = new DefaultGraphLoader();
    loader.setGraph( unionGraph );
    loader.setKB( kb );
View Full Code Here

 
  @Override
    public ExtendedIterator<Triple> find(Node subject, Node property, Node object, Graph param) {
    prepare();
   
    GraphLoader savedLoader = attachTemporaryGraph( param );

    ExtendedIterator<Triple> result = graphBaseFind( subject, property, object );

    detachTemporaryGraph( param, savedLoader );
View Full Code Here

   
    OntBuilder builder = new OntBuilder( kb );
    KnowledgeBase copyKB;
    PelletInfGraph copyGraph;

    GraphLoader loader = new DefaultGraphLoader();
    for( ATermAppl axiom : explanation ) {
      prunedExplanation.remove( axiom );

      copyKB = builder.build( prunedExplanation );
      copyGraph = new PelletInfGraph( copyKB, (PelletReasoner) getReasoner(), loader );
View Full Code Here

    entailments.read( entailmentFileURI, entailmentFileURI, fileType( entailmentFileURI ) );
   
    Graph entailmentsGraph = entailments.getGraph();
    PelletInfGraph pellet = (PelletInfGraph) model.getGraph();

    GraphLoader savedLoader = pellet.attachTemporaryGraph( entailmentsGraph );

    ExtendedIterator i = entailmentsGraph.find( Triple.ANY );
   
    while( i.hasNext() ) {
      Triple triple = (Triple) i.next();
View Full Code Here

      this.query = query;
    }

    private ResultBinding convertBinding(Binding binding) {
      ResultBinding pelletBinding = new ResultBindingImpl();
      GraphLoader loader = pellet.getLoader();
      for( Iterator<?> vars = binding.vars(); vars.hasNext(); ) {
        Var var = (Var) vars.next();
        Node value = binding.get( var );
        if( value != null ) {
          ATermAppl pelletVar = ATermUtils.makeVar( var.getVarName() );
          ATermAppl pelletValue = loader.node2term( value );
          pelletBinding.setValue( pelletVar, pelletValue );
        }
      }

      return pelletBinding;
View Full Code Here

    entailments.read( entailmentFileURI, entailmentFileURI, fileType( entailmentFileURI ) );
   
    Graph entailmentsGraph = entailments.getGraph();
    PelletInfGraph pellet = (PelletInfGraph) model.getGraph();

    GraphLoader savedLoader = pellet.attachTemporaryGraph( entailmentsGraph );

    ExtendedIterator i = entailmentsGraph.find( Triple.ANY );
   
    while( i.hasNext() ) {
      Triple triple = (Triple) i.next();
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.jena.graph.loader.GraphLoader

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.