Class EdgeList

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Edge>, java.util.Collection<Edge>, java.util.List<Edge>, java.util.RandomAccess

    public class EdgeList
    extends java.util.ArrayList<Edge>
    Author:
    Evren Sirin
    See Also:
    Serialized Form
    • Constructor Detail

      • EdgeList

        public EdgeList()
      • EdgeList

        public EdgeList​(int n)
      • EdgeList

        public EdgeList​(EdgeList edges)
    • Method Detail

      • addEdgeList

        @Deprecated
        public void addEdgeList​(EdgeList edges)
        Deprecated.
      • addEdge

        @Deprecated
        public void addEdge​(Edge e)
        Deprecated.
      • removeEdge

        public boolean removeEdge​(Edge edge)
        Remove an element by replacing it by the last element. Order isn't preserved.
        Parameters:
        edge - to remove
        Returns:
        true if removing occured
      • edgeAt

        public Edge edgeAt​(int i)
      • getRoles

        public java.util.Set<Role> getRoles()
      • getNeighbors

        public java.util.Set<Node> getNeighbors​(Node node)
      • getFilteredNeighbors

        public java.util.Set<Node> getFilteredNeighbors​(Individual node,
                                                        openllet.aterm.ATermAppl c)
        Find the neighbors of a _node that has a certain type. For literals, we collect only the ones with the same language tag.
        Parameters:
        node - The _node whose neighbors are being sought
        c - The concept (or datatype) that each _neighbor should belong to
        Returns:
        Set of _nodes
      • hasEdgeFrom

        public boolean hasEdgeFrom​(Individual from)
      • hasEdgeTo

        public boolean hasEdgeTo​(Node to)
      • hasEdge

        public boolean hasEdge​(Role role)
      • hasEdge

        public boolean hasEdge​(Individual from,
                               Role role,
                               Node to)
        Checks if this list contains an edge matching the given subject, predicate and object. A null parameter is treated as a wildcard matching every value and predicates are matched by considering the subproperty hierarchy, i.e. passing the parameter sup to this function will return true if an edge with subproperty sub exists.
        Parameters:
        from -
        role -
        to -
        Returns:
        true if contains an edge that match
      • hasExactEdge

        public boolean hasExactEdge​(Individual from,
                                    Role role,
                                    Node to)
        Similar to hasEdge(Individual, Role, Node) but does not consider subproperty hierarchy for matching so only exact predicate matches are considered.
        Parameters:
        from -
        role -
        to -
        Returns:
        true if contains an edge that match
      • hasEdge

        public boolean hasEdge​(Edge e)
      • getDepends

        public DependencySet getDepends​(boolean doExplanation)
      • reset

        public void reset()
        Resets the edges in this list to only asserted edges.