public class CruxQuery extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<clojure.lang.IPersistentCollection> |
conditions |
static clojure.lang.Symbol |
CREATE_TIME |
static clojure.lang.Symbol |
DOC_ID |
protected List<clojure.lang.IPersistentCollection> |
rules |
static clojure.lang.Keyword |
SORT_ASCENDING |
static clojure.lang.Keyword |
SORT_DESCENDING |
static clojure.lang.Symbol |
SORT_PROPERTY |
static clojure.lang.Symbol |
UPDATE_TIME |
| Constructor and Description |
|---|
CruxQuery()
Default constructor for a new query.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClassificationConditions(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications searchClassifications,
Set<String> typeNames,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper,
String repositoryName,
boolean luceneEnabled,
boolean luceneRegexes)
Retrieve the set of conditions appropriate to Crux for the provided Egeria conditions.
|
void |
addConditions(List<clojure.lang.IPersistentCollection> cruxConditions)
Add the provided list of conditions to those to be included in the query.
|
protected void |
addFindElement(clojure.lang.Symbol element)
Add the specified symbol to the list of those that are discovered by the search conditions (if not already in
the list)
|
protected void |
addPropertyBasedSorting(Set<clojure.lang.Keyword> qualifiedSortProperties,
clojure.lang.Keyword order)
Add the necessary conditions for sorting based on a property: somewhat complex as we need to ensure that the
property being used in the sort is included in the search results themselves, and given the qualification of
property names this could mean several different properties we ultimately need to attempt to sort by, and hence
this separate method.
|
void |
addPropertyConditions(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties searchProperties,
String namespace,
Set<String> typeNames,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper,
String repositoryName,
boolean luceneEnabled,
boolean luceneRegexes)
Retrieve the set of conditions appropriate to Crux for the provided Egeria conditions.
|
void |
addRelationshipEndpointConditions(String reference)
Add a condition to match either endpoint of a relationship to the provided reference (primary key).
|
void |
addSequencing(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder,
String sequencingProperty,
String namespace,
Set<String> typeNames,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper,
String repositoryName)
Add the sequencing information onto the query.
|
void |
addStatusLimiters(List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus,
clojure.lang.Symbol toLimit)
Add the provided statuses as limiters on which results should be retrieved from the query.
|
void |
addTypeCondition(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category,
String typeGuid,
List<String> subtypeLimits)
Add a condition to limit the type of the results by their TypeDef GUID.
|
protected List<clojure.lang.IPersistentCollection> |
getClassificationConditions(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications searchClassifications,
Set<String> typeNames,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper,
String repositoryName,
boolean luceneEnabled,
boolean luceneRegexes)
Retrieve a set of translated Crux conditions appropriate to the provided Egeria conditions.
|
clojure.lang.IPersistentMap |
getQuery()
Retrieve the query object, as ready-to-be-submitted to Crux API's query method.
|
protected clojure.lang.PersistentVector |
getReferenceCondition(clojure.lang.Keyword property,
String reference)
Add a condition to match the value of a property to a reference (primary key).
|
protected List<clojure.lang.IPersistentCollection> |
getStatusLimiters(clojure.lang.Symbol variable,
List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus)
Retrieve the status condition(s) for the provided status limiters.
|
protected List<clojure.lang.IPersistentCollection> |
getTypeCondition(clojure.lang.Symbol variable,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category,
String typeGuid,
List<String> subtypeLimits)
Add a condition to limit the type of the results by their TypeDef GUID.
|
public static final clojure.lang.Symbol DOC_ID
public static final clojure.lang.Symbol CREATE_TIME
public static final clojure.lang.Symbol UPDATE_TIME
public static final clojure.lang.Symbol SORT_PROPERTY
public static final clojure.lang.Keyword SORT_ASCENDING
public static final clojure.lang.Keyword SORT_DESCENDING
protected final List<clojure.lang.IPersistentCollection> conditions
protected final List<clojure.lang.IPersistentCollection> rules
public void addRelationshipEndpointConditions(String reference)
reference - the primary key value of an entity, used to match either end of a relationshipprotected clojure.lang.PersistentVector getReferenceCondition(clojure.lang.Keyword property,
String reference)
property - to matchreference - the primary key value to which the property should referpublic void addTypeCondition(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category,
String typeGuid,
List<String> subtypeLimits)
category - by which to limit resultstypeGuid - by which to limit the results (if null, will be ignored)subtypeLimits - limit the results to only these subtypes (if provided: ignored if typeGuid is null)protected List<clojure.lang.IPersistentCollection> getTypeCondition(clojure.lang.Symbol variable, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, List<String> subtypeLimits)
variable - to resolve against the typecategory - by which to limit resultstypeGuid - by which to limit the resultssubtypeLimits - limit the results to only these subtypes (if provided)List<IPersistentCollection> of the conditionspublic void addConditions(List<clojure.lang.IPersistentCollection> cruxConditions)
cruxConditions - list of conditions to addpublic void addPropertyConditions(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties searchProperties,
String namespace,
Set<String> typeNames,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper,
String repositoryName,
boolean luceneEnabled,
boolean luceneRegexes)
searchProperties - to translatenamespace - by which to qualify propertiestypeNames - of all of the types we are including in the searchrepositoryHelper - through which we can lookup type information and propertiesrepositoryName - of the repository (for logging)luceneEnabled - indicates whether Lucene search index is configured (true) or not (false)luceneRegexes - indicates whether unquoted regexes should be treated as Lucene compatible (true) or not (false)public void addClassificationConditions(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications searchClassifications,
Set<String> typeNames,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper,
String repositoryName,
boolean luceneEnabled,
boolean luceneRegexes)
searchClassifications - to translatetypeNames - of all of the types we are including in the searchrepositoryHelper - through which we can lookup type information and propertiesrepositoryName - of the repository (for logging)luceneEnabled - indicates whether Lucene search index is configured (true) or not (false)luceneRegexes - indicates whether unquoted regexes should be treated as Lucene compatible (true) or not (false)protected List<clojure.lang.IPersistentCollection> getClassificationConditions(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications searchClassifications, Set<String> typeNames, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String repositoryName, boolean luceneEnabled, boolean luceneRegexes)
searchClassifications - to translatetypeNames - of all of the types we are including in the searchrepositoryHelper - through which we can lookup type information and propertiesrepositoryName - of the repository (for logging)luceneEnabled - indicates whether Lucene search index is configured (true) or not (false)luceneRegexes - indicates whether unquoted regexes should be treated as Lucene compatible (true) or not (false)List<IPersistentCollection>public void addStatusLimiters(List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, clojure.lang.Symbol toLimit)
limitResultsByStatus - list of statuses by which to limit resultstoLimit - variable by which to limit by status (e.g. entity or relationship)protected List<clojure.lang.IPersistentCollection> getStatusLimiters(clojure.lang.Symbol variable, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus)
variable - that should be limitedlimitResultsByStatus - list of statuses by which to limit resultsList<IPersistentCollection> of the condition(s)public void addSequencing(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder,
String sequencingProperty,
String namespace,
Set<String> typeNames,
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper,
String repositoryName)
sequencingOrder - by which to sequence the resultssequencingProperty - by which to sequence the results (required if sorting by property, otherwise ignored)namespace - by which to qualify the sorting property (required if sorting by property, otherwise ignored)typeNames - of all of the types we are including in the search (required if sorting by property, otherwise ignored)repositoryHelper - through which we can lookup type information and properties (required if sorting by property, otherwise ignored)repositoryName - of the repository (for logging)protected void addPropertyBasedSorting(Set<clojure.lang.Keyword> qualifiedSortProperties, clojure.lang.Keyword order)
qualifiedSortProperties - the set of properties by which we will sortorder - indicating ascending or descendingpublic clojure.lang.IPersistentMap getQuery()
protected void addFindElement(clojure.lang.Symbol element)
element - to add (if not already in the list)Copyright © 2021 ODPi. All rights reserved.