Class JsonQueryERElement
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.queries.json.base.JsonQueryERElement
-
- Direct Known Subclasses:
JsonQueryEntity,JsonQueryRelation
public abstract class JsonQueryERElement extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.gcube.informationsystem.base.reference.AccessTypeaccessTypeprotected org.gcube.informationsystem.base.reference.Directiondirectionprotected booleanentryPointprotected Set<String>fieldNamesToRemoveprotected org.gcube.com.fasterxml.jackson.databind.JsonNodejsonNodeprotected org.gcube.com.fasterxml.jackson.databind.ObjectMapperobjectMapperprotected Stringtype
-
Constructor Summary
Constructors Constructor Description JsonQueryERElement(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonQuery, org.gcube.informationsystem.base.reference.AccessType accessType)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringBufferaddCondition(QueryConditionalOperator queryConditionalOperator, StringBuffer key, StringBuffer value)protected StringBufferaddConstraints(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode, QueryLogicalOperator queryLogicalOperator, String fieldNamePrefix)abstract StringBufferanalize(StringBuffer stringBuffer)protected StringBufferevaluateNode(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName, String fieldNamePrefix)org.gcube.informationsystem.base.reference.DirectiongetDirection()protected StringBuffergetKey(String fieldName, String fieldNamePrefix)StringgetType()protected StringBuffergetValue(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)booleanisEntryPoint()voidsetDirection(org.gcube.informationsystem.base.reference.Direction direction)voidsetEntryPoint(boolean entryPoint)static voidvalidateType(String type, org.gcube.informationsystem.base.reference.AccessType requiredAccessType)
-
-
-
Field Detail
-
objectMapper
protected final org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
type
protected final String type
-
jsonNode
protected final org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode
-
accessType
protected final org.gcube.informationsystem.base.reference.AccessType accessType
-
direction
protected org.gcube.informationsystem.base.reference.Direction direction
-
entryPoint
protected boolean entryPoint
-
-
Constructor Detail
-
JsonQueryERElement
public JsonQueryERElement(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonQuery, org.gcube.informationsystem.base.reference.AccessType accessType) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
-
Method Detail
-
validateType
public static void validateType(String type, org.gcube.informationsystem.base.reference.AccessType requiredAccessType) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getType
public String getType()
-
getDirection
public org.gcube.informationsystem.base.reference.Direction getDirection()
-
setDirection
public void setDirection(org.gcube.informationsystem.base.reference.Direction direction)
-
isEntryPoint
public boolean isEntryPoint()
-
setEntryPoint
public void setEntryPoint(boolean entryPoint)
-
analize
public abstract StringBuffer analize(StringBuffer stringBuffer) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
addConstraints
protected StringBuffer addConstraints(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode, QueryLogicalOperator queryLogicalOperator, String fieldNamePrefix) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
-
evaluateNode
protected StringBuffer evaluateNode(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName, String fieldNamePrefix) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
-
addCondition
protected StringBuffer addCondition(QueryConditionalOperator queryConditionalOperator, StringBuffer key, StringBuffer value)
-
getKey
protected StringBuffer getKey(String fieldName, String fieldNamePrefix)
-
getValue
protected StringBuffer getValue(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
-
-