Class DeclaredPropertyResolver
java.lang.Object
org.gcube.informationsystem.resourceregistry.queries.json.base.DeclaredPropertyResolver
Resolves the domain a Type definition declares for the property addressed by a query path.
The Type definitions are read through CachedType. A Type the model defines without
a stored Type definition (Context, QueryTemplate, the Type-definition schemas and the embedded
values they hold) is described by the definition its model class produces, the one its storage
was created from. The properties a Type inherits are those its extended Types declare, up to
the root of the hierarchy.
A path is followed through embedded Property values and through Lists and Sets of embedded values; a path through a List or Set denotes the collection of the values its last field takes across the elements. A path that leaves the declared properties, or reaches a Type that is not known, has no domain.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe declared and inherited property types already read, by Type name and property name.Whether the Property types already met are Encrypted, by Type name.static final StringThe separator of the fields of a query path. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves the declared domain of a property path.
-
Field Details
-
PATH_SEPARATOR
The separator of the fields of a query path.- See Also:
-
declaredTypes
protected final Map<String,Map<String, declaredTypesorg.gcube.informationsystem.types.PropertyTypeName>> The declared and inherited property types already read, by Type name and property name. -
encryptedTypes
Whether the Property types already met are Encrypted, by Type name.
-
-
Constructor Details
-
DeclaredPropertyResolver
public DeclaredPropertyResolver()Creates a newDeclaredPropertyResolver.
-
-
Method Details
-
resolve
public PropertyDomain resolve(String typeName, String path) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException Resolves the declared domain of a property path.- Parameters:
typeName- the Type the path starts frompath- the dot-separated property path- Returns:
- the declared domain, or
nullif the Type definitions do not declare the path - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if a Type definition cannot be read
-