Class JsonQueryEntitySchema
java.lang.Object
org.gcube.informationsystem.resourceregistry.queries.json.base.JsonQueryElement
org.gcube.informationsystem.resourceregistry.queries.json.base.standalone.JsonQueryEntitySchema
Translates a JSON query subtree representing an entity Type definition
(
ResourceSchema or FacetSchema).
Entity Type definitions are flat, standalone vertex records with no graph relations
to traverse relative to each other: always the entry point of the query, hence extending
JsonQueryElement directly rather than JsonQueryERElement.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields inherited from class org.gcube.informationsystem.resourceregistry.queries.json.base.JsonQueryElement
accessType, alias, breadcrumb, entryPoint, fieldNamesToRemove, fieldsToEmit, jsonNode, logger, objectMapper, polymorphic, position, projection, queryParameterIndex, queryParameters, size, type -
Constructor Summary
ConstructorsConstructorDescriptionJsonQueryEntitySchema(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonQuery) Creates a newJsonQueryEntitySchemainstance for the specified JSON query subtree. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuffergetSpecificMatchQuery(List<JsonQueryElement> childrenBreadcrumb) Generates the specific MATCH query snippet for this element's subclass (subclass hook).Methods inherited from class org.gcube.informationsystem.resourceregistry.queries.json.base.JsonQueryElement
addConstraints, addFieldToEmit, createMatchQuery, createQuery, evaluateNode, generateAlias, getAlias, getAlias, getBreadcrumb, getChildrenBreadcrumb, getKey, getPosition, getQueryParameters, getScalarValue, getType, getValue, isEntryPoint, isProjection, setBreadcrumb, setEntryPoint, setPolymorphic, setPosition, setProjection, validateType, wrapMatchQuery
-
Constructor Details
-
JsonQueryEntitySchema
public JsonQueryEntitySchema(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 newJsonQueryEntitySchemainstance for the specified JSON query subtree.- Parameters:
jsonQuery- the JSON query node representing the entity Type definition- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException- if schema validation failsorg.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:JsonQueryElementGenerates the specific MATCH query snippet for this element's subclass (subclass hook).- Specified by:
getSpecificMatchQueryin classJsonQueryElement- 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 failsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- on database error
-