Examples of EdgeList


Examples of org.mindswap.pellet.EdgeList

      DependencySet finalDS = ds.union(entry.getValue(), abox.doExplanation());
      addType(x, yType, finalDS);
    }

    // for all edges (z, r, y) add an edge (z, r, x)
    EdgeList inEdges = y.getInEdges();
    for (int e = 0; e < inEdges.size(); e++) {
      Edge edge = inEdges.edgeAt(e);

      Individual z = edge.getFrom();
      Role r = edge.getRole();
      DependencySet finalDS = ds.union(edge.getDepends(), abox.doExplanation());

      // if y has a self edge then x should have the same self edge
      if (y.equals(z)) {
        addEdge(x, r, x, finalDS);
      }
      // if z is already a successor of x add the reverse edge
      else if (x.hasSuccessor(z)) {
        // FIXME what if there were no inverses in this expressitivity
        addEdge(x, r.getInverse(), z, finalDS);
      }
      else {
        addEdge(z, r, x, finalDS);
      }

      // only remove the edge from z and keep a copy in y for a
      // possible restore operation in the future
      z.removeEdge(edge);

      // add to effected list of queue
      // if( abox.getBranch() >= 0 && PelletOptions.USE_COMPLETION_QUEUE ) {
      // abox.getCompletionQueue().addEffected( abox.getBranch(), z.getName() );
      // }
      if (abox.getBranch() >= 0 && PelletOptions.TRACK_BRANCH_EFFECTS) {
        abox.getBranchEffectTracker().add(abox.getBranch(), z.getName());
      }

    }

    // for all z such that y != z set x != z
    x.inheritDifferents(y, ds);

    // we want to prune y early due to an implementation issue about literals
    // if y has an outgoing edge to a literal with concrete value
    y.prune(ds);

    // for all edges (y, r, z) where z is a nominal add an edge (x, r, z)
    EdgeList outEdges = y.getOutEdges();
    for (int e = 0; e < outEdges.size(); e++) {
      Edge edge = outEdges.edgeAt(e);
      Node z = edge.getTo();

      if (z.isNominal() && !y.equals(z)) {
        Role r = edge.getRole();
        DependencySet finalDS = ds.union(edge.getDepends(), abox.doExplanation());
View Full Code Here

Examples of org.mindswap.pellet.EdgeList

    y.setSame(x, ds);

    x.addAllTypes(y.getDepends(), ds);

    // for all edges (z, r, y) add an edge (z, r, x)
    EdgeList inEdges = y.getInEdges();
    for (int e = 0; e < inEdges.size(); e++) {
      Edge edge = inEdges.edgeAt(e);

      Individual z = edge.getFrom();
      Role r = edge.getRole();
      DependencySet finalDS = ds.union(edge.getDepends(), abox.doExplanation());
View Full Code Here

Examples of org.mindswap.pellet.EdgeList

    }
    return false;
  }

  public Iterator<WME> getMatches(int argIndex, Node arg) {
    EdgeList edges = ((Individual) arg).getRNeighborEdges(role, arg);

    return toWMEs(edges, EdgeDirection.FORWARD);
  }
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.