java.lang.Object
org.gcube.informationsystem.resourceregistry.queries.json.base.JsonQueryElement
org.gcube.informationsystem.resourceregistry.queries.json.base.standalone.JsonQueryRelationSchema

public class JsonQueryRelationSchema extends JsonQueryElement
Translates a JSON query subtree representing a relation Type definition (IsRelatedToSchema or ConsistsOfSchema).

Although these definitions are persisted as OrientDB edges connecting ResourceSchema vertices (source/target), queries against them are treated as flat/standalone: the query targets the relation Type definition itself (e.g. by name or property), with no traversal into its source/target entity Type definitions. Hence extending JsonQueryElement directly rather than JsonQueryERElement.

Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • JsonQueryRelationSchema

      public JsonQueryRelationSchema(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonQuery) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Creates a new JsonQueryRelationSchema instance for the specified JSON query subtree.
      Parameters:
      jsonQuery - the JSON query node representing the relation Type definition
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException - if schema validation fails
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - on database or lookup error
  • Method Details

    • getSpecificMatchQuery

      protected StringBuffer getSpecificMatchQuery(List<JsonQueryElement> childrenBreadcrumb) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Description copied from class: JsonQueryElement
      Generates the specific MATCH query snippet for this element's subclass (subclass hook).
      Specified by:
      getSpecificMatchQuery in class JsonQueryElement
      Parameters:
      childrenBreadcrumb - the list of child query elements visited
      Returns:
      the MATCH query snippet string buffer
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException - if schema validation fails
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - on database error