Interface EdgeQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidRelationshipQuery, OsidTemporalQuery, Suppliable

public interface EdgeQuery extends OsidRelationshipQuery

This is the query for searching edges. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchSourceNodeId

      void matchSourceNodeId(Id nodeId, boolean match)
      Sets the node Id for this query to match edges assigned to nodes.
      Parameters:
      nodeId - the node Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - nodeId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSourceNodeIdTerms

      void clearSourceNodeIdTerms()
      Clears the node Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSourceNodeQuery

      boolean supportsSourceNodeQuery()
      Tests if a NodeQuery is available.
      Returns:
      true if a node query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSourceNodeQuery

      NodeQuery getSourceNodeQuery()
      Gets the query for a node. Multiple retrievals produce a nested OR term.
      Returns:
      the node query
      Throws:
      UnimplementedException - supportsSourceNodeQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSourceNodeQuery()} is {@code true} .
    • clearSourceNodeTerms

      void clearSourceNodeTerms()
      Clears the node terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDestinationNodeId

      void matchDestinationNodeId(Id nodeId, boolean match)
      Sets the related node Id for this query to match edges assigned to nodes.
      Parameters:
      nodeId - the node Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - nodeId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDestinationNodeIdTerms

      void clearDestinationNodeIdTerms()
      Clears the related node Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDestinationNodeQuery

      boolean supportsDestinationNodeQuery()
      Tests if a NodeQuery is available.
      Returns:
      true if a node query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDestinationNodeQuery

      NodeQuery getDestinationNodeQuery()
      Gets the query for a related node. Multiple retrievals produce a nested OR term.
      Returns:
      the node query
      Throws:
      UnimplementedException - supportsDestinationNodeQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDestinationNodeQuery()} is {@code true} .
    • clearDestinationNodeTerms

      void clearDestinationNodeTerms()
      Clears the related node terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSameNode

      void matchSameNode(boolean match)
      Matches edges between the same node.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearSameNodeTerms

      void clearSameNodeTerms()
      Clears the same node terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDirectional

      void matchDirectional(boolean match)
      Matches directional edges.
      Parameters:
      match - true to match directional edges, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • clearDirectionalTerms

      void clearDirectionalTerms()
      Clears the directional terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBiDirectional

      void matchBiDirectional(boolean match)
      Matches bi-directional edges.
      Parameters:
      match - true to match bi-directional edges, false to match uni-directional edges
      Compliance:
      mandatory - This method must be implemented.
    • clearBiDirectionalTerms

      void clearBiDirectionalTerms()
      Clears the directional terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCost

      void matchCost(BigDecimal from, BigDecimal to, boolean match)
      Matches edges that have the specified cost inclusive.
      Parameters:
      from - starting range
      to - ending range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - to is less than from
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCost

      void matchAnyCost(boolean match)
      Matches edges that has any cost assigned.
      Parameters:
      match - true to match edges with any cost, false to match edges with no cost assigned
      Compliance:
      mandatory - This method must be implemented.
    • clearCostTerms

      void clearCostTerms()
      Clears the cost terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDistance

      void matchDistance(BigDecimal from, BigDecimal to, boolean match)
      Matches edges that have the specified distance inclusive.
      Parameters:
      from - starting range
      to - ending range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - to is less than from
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyDistance

      void matchAnyDistance(boolean match)
      Matches edges that has any distance assigned.
      Parameters:
      match - true to match edges with any distance, false to match edges with no distance assigned
      Compliance:
      mandatory - This method must be implemented.
    • clearDistanceTerms

      void clearDistanceTerms()
      Clears the distance terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchGraphId

      void matchGraphId(Id graphId, boolean match)
      Sets the graph Id for this query to match edges assigned to graphs.
      Parameters:
      graphId - the graph Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - graphId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearGraphIdTerms

      void clearGraphIdTerms()
      Clears the graph Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsGraphQuery

      boolean supportsGraphQuery()
      Tests if a GraphQuery is available.
      Returns:
      true if a graph query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getGraphQuery

      GraphQuery getGraphQuery()
      Gets the query for a graph. Multiple retrievals produce a nested OR term.
      Returns:
      the graph query
      Throws:
      UnimplementedException - supportsGraphQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsGraphQuery()} is {@code true} .
    • clearGraphTerms

      void clearGraphTerms()
      Clears the graph terms.
      Compliance:
      mandatory - This method must be implemented.
    • getEdgeQueryRecord

      EdgeQueryRecord getEdgeQueryRecord(Type edgeRecordType) throws OperationFailedException
      Gets the edge query record corresponding to the given Edge record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      edgeRecordType - an edge record type
      Returns:
      the edge query record
      Throws:
      NullArgumentException - edgeRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(edgeRecordType) is false
      Compliance:
      mandatory - This method must be implemented.