Interface GraphQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidCatalogQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface GraphQuery extends OsidCatalogQuery

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

  • Method Details

    • matchNodeId

      void matchNodeId(Id nodeId, boolean match)
      Sets the node Id for this query to match graphs that have a related node.
      Parameters:
      nodeId - a node Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - nodeId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearNodeIdTerms

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

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

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

      void matchAnyNode(boolean match)
      Matches graphs that have any node.
      Parameters:
      match - true to match graphs with any node, false to match graphs with no node
      Compliance:
      mandatory - This method must be implemented.
    • clearNodeTerms

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

      void matchEdgeId(Id edgeId, boolean match)
      Sets the edge Id for this query to match graphs containing edges.
      Parameters:
      edgeId - the edge Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - edgeId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearEdgeIdTerms

      void clearEdgeIdTerms()
      Clears the edge Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsEdgeQuery

      boolean supportsEdgeQuery()
      Tests if an EdgeQuery is available.
      Returns:
      true if an edge query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getEdgeQuery

      EdgeQuery getEdgeQuery()
      Gets the query for an edge. Multiple retrievals produce a nested OR term.
      Returns:
      the edge query
      Throws:
      UnimplementedException - supportsEdgeQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsEdgeQuery()} is {@code true} .
    • matchAnyEdge

      void matchAnyEdge(boolean match)
      Matches graphs that have any edge.
      Parameters:
      match - true to match graphs with any edge, false to match graphs with no edge
      Compliance:
      mandatory - This method must be implemented.
    • clearEdgeTerms

      void clearEdgeTerms()
      Clears the edge terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorGraphId

      void matchAncestorGraphId(Id graphId, boolean match)
      Sets the graph Id for this query to match graphs that have the specified graph as an ancestor.
      Parameters:
      graphId - a 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.
    • clearAncestorGraphIdTerms

      void clearAncestorGraphIdTerms()
      Clears the ancestor graph Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorGraphQuery

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

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

      void matchAnyAncestorGraph(boolean match)
      Matches graphs with any ancestor.
      Parameters:
      match - true to match graphs with any ancestor, false to match root graphs
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorGraphTerms

      void clearAncestorGraphTerms()
      Clears the ancestor graph terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantGraphId

      void matchDescendantGraphId(Id graphId, boolean match)
      Sets the graph Id for this query to match graphs that have the specified graph as a descendant.
      Parameters:
      graphId - a 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.
    • clearDescendantGraphIdTerms

      void clearDescendantGraphIdTerms()
      Clears the descendant graph Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantGraphQuery

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

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

      void matchAnyDescendantGraph(boolean match)
      Matches graphs with any descendant.
      Parameters:
      match - true to match graphs with any descendant, false to match leaf graphs
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantGraphTerms

      void clearDescendantGraphTerms()
      Clears the descendant graph terms.
      Compliance:
      mandatory - This method must be implemented.
    • getGraphQueryRecord

      GraphQueryRecord getGraphQueryRecord(Type graphRecordType) throws OperationFailedException
      Gets the graph query record corresponding to the given Graph record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      graphRecordType - a graph record type
      Returns:
      the graph query record
      Throws:
      NullArgumentException - graphRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(graphRecordType) is false
      Compliance:
      mandatory - This method must be implemented.