Examples of edgeAt()


Examples of org.mindswap.pellet.EdgeList.edgeAt()

    // which is blockable and has successor x
    // (so y is an inv(r) predecessor of x)
    boolean apply = false;
    EdgeList edges = x.getRPredecessorEdges(r.getInverse());
    for (int e = 0; e < edges.size(); e++) {
      Edge edge = edges.edgeAt(e);
      Individual pred = edge.getFrom();
      if (pred.isBlockable()) {
        apply = true;
        break;
      }
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

    // TODO not clear what the correct ds is so be pessimistic and include everything
    DependencySet ds = x.getDepends(mc);
    edges = x.getRNeighborEdges(r);
    for (int e = 0; e < edges.size(); e++) {
      Edge edge = edges.edgeAt(e);
      ds = ds.union(edge.getDepends(), strategy.getABox().doExplanation());
    }

    GuessBranch newBranch = new GuessBranch(strategy.getABox(), strategy, x, r, guessMin, n, c, ds);
    strategy.addBranch(newBranch);
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

                                      fds = role.getExplainSuper(f.getName());
                                    } else {
                                      fds = role.getExplainSub(f.getName());
                                    }
                                  }
                                    Edge otherEdge = edges.edgeAt( 0 );
                                    Node otherNode = otherEdge.getNeighbor( x );
                                    DependencySet d = ds.union( edge.getDepends(), strategy.getABox().doExplanation() ).union(
                                        otherEdge.getDepends(), strategy.getABox().doExplanation() ).union(fds, strategy.getABox().doExplanation());
                                    strategy.mergeTo( y, otherNode, d );
                                }
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

                                        otherEdge.getDepends(), strategy.getABox().doExplanation() ).union(fds, strategy.getABox().doExplanation());
                                    strategy.mergeTo( y, otherNode, d );
                                }
                                else {
                                    useExistingNode = true;
                                    edge = edges.edgeAt( 0 );
                                    y = edge.getNeighbor( x );
                                }
                            }
                        }
                        if( y != null )
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

          return;
        }
   
    EdgeList edges = x.getRNeighborEdges( s );
    for( int e = 0; e < edges.size(); e++ ) {
      Edge edgeToY = edges.edgeAt( e );
      Node y = edgeToY.getNeighbor( x );
      DependencySet finalDS = ds.union( edgeToY.getDepends(), strategy.getABox().doExplanation() );
      if( strategy.getABox().doExplanation() ) {
        Role edgeRole = edgeToY.getRole();
        DependencySet subDS = s.getExplainSubOrInv( edgeRole );
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

      for( Role r : s.getTransitiveSubRoles() ) {
        ATermAppl allRC = ATermUtils.makeAllValues( r.getName(), c );

        edges = x.getRNeighborEdges( r );
        for( int e = 0; e < edges.size(); e++ ) {
          Edge edgeToY = edges.edgeAt( e );
          Node y = edgeToY.getNeighbor( x );
          DependencySet finalDS = ds.union( edgeToY.getDepends(), strategy.getABox().doExplanation() );
          if( strategy.getABox().doExplanation() ) {
            finalDS = finalDS.union( r.getExplainTransitive().getExplain(), true );
            finalDS = finalDS.union( s.getExplainSubOrInv( edgeToY.getRole() ), true );
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

        // if restriction was maxCardinality 0 then having any R-neighbor
        // violates the restriction. no merge can fix this. compute the
        // dependency and return
        if( k == 0 && n > 0 ) {
            for( int e = 0; e < edges.size(); e++ ) {
                Edge edge = edges.edgeAt( e );
                Node neighbor = edge.getNeighbor( x );
                DependencySet typeDS = neighbor.getDepends( c );
                if( typeDS != null ) {
                  Role edgeRole = edge.getRole();
            DependencySet subDS = r.getExplainSubOrInv( edgeRole );
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

            // find the head and its corresponding dependency information.
            // since head is not necessarily the first element in the
            // neighbor list we need to first find the un-pruned node
            for( ; edgeIndex < edgeCount; edgeIndex++ ) {
                Edge edge = edges.edgeAt( edgeIndex );
                head = edge.getNeighbor( x );

                if( head.isPruned() || !neighbors.contains( head ) )
                    continue;
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

            // now iterate through the rest of the elements in the neighbors
            // and merge them to the head node. it is possible that we will
            // switch the head at some point because of merging rules such
            // that you always merge to a nominal of higher level
            for( edgeIndex++; edgeIndex < edgeCount; edgeIndex++ ) {
                Edge edge = edges.edgeAt( edgeIndex );
                Node next = edge.getNeighbor( x );

                if( next.isPruned() || !neighbors.contains( next ) )
                    continue;
View Full Code Here

Examples of org.mindswap.pellet.EdgeList.edgeAt()

    Role role = kb.getRole( theEdge.getRole().getName() );
 
    // loop over all edges for the subject
    EdgeList edges = subj.getEdgesTo( obj, role );
    for( int i = 0; i < edges.size(); i++ ) {
      Edge edge = edges.edgeAt( i );
      if( edge.getRole().equals( role ) ) {
        // get dependency set for the edge
        DependencySet ds = edge.getDepends();
 
        // clean it
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.