class: MetadataSearchCriterion

public class: MetadataSearchCriterion
Author: endres
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 16.07.2009 15:19:46; Modified: 16.07.2009 15:19:46;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {859C19CF-2C59-4011-8B72-81D06D2E3A96}
The Metadata search criterion defines a query to a specific index with a given value. One metadata search criterion can query multiple indices. This is defined by the criterion type.
 

Goto: Custom Properties, Fields, Methods

See also: MetadataDateSearchCriterion, BooleanOperator, LogicalOperator

Appears in: query

Connections
 
Custom Properties
 
MetadataSearchCriterion Attributes
Attribute Details
private static const String
  BOOLEAN_EQUALS
Initial: "="
private static const String
  BOOLEAN_GREATER
Initial: ">"
private static const String
  BOOLEAN_GREATER_THAN_EQUALS
Initial: ">="
private static const String
  BOOLEAN_LESS_THAN_EQUALS
Initial: "<="
protected static const String
  CQL_AND
Initial: "and"
Notes: The cql AND constant.
protected static const String
  CQL_NOT
Initial: "not"
Notes: The cql NOT constant.
protected static const String
  CQL_OR
Initial: "or"
Notes: The cql OR constant.
private BooleanOperator
  cqlOperator
Initial: null
private static const String
  EMPTY_SEARCH_TERM
Initial: "''"
Notes: String to be used to represent an empty search term.
private static const String
  INDEX_COMPONENT_ACCESSIBILITY
Initial: "escidoc.component.creation-date"
Notes: Index for component availability.
private static const String
  INDEX_COMPONENT_CONTENT_CATEGORY
Initial: "escidoc.component.content-category"
Notes: Index for component content category.
private static const String
  INDEX_COMPONENT_VISIBILITY
Initial: "escidoc.component.visibility"
Notes: Index for component visibility.
private static const String
  INDEX_CONTENT_TYPE
Initial: "escidoc.content-model.objid"
Notes: Index for the content-type.
private static const String
  INDEX_CONTEXT_OBJECTID
Initial: "escidoc.context.objid"
Notes: Index for object ids of contexts.
private static const String
  INDEX_COPYRIGHT_DATE
Initial: "escidoc.component.file.dateCopyrighted"
Notes: Index for copyright date.
private static const String
  INDEX_CREATED_BY_OBJECTID
Initial: "escidoc.created-by.objid"
Notes: Index for the created-by object id.
private static const String
  INDEX_DATE_ACCEPTED
Initial: "escidoc.publication.dateAccepted"
Notes: Index for the accepted date.
private static const String
  INDEX_DATE_ANY
Initial: "escidoc.publication.any-dates"
Notes: Index for dates.
private static const String
  INDEX_DATE_CREATED
Initial: "escidoc.publication.created"
Notes: Index for creation date.
private static const String
  INDEX_DATE_ISSUED
Initial: "escidoc.publication.issued"
Notes: Index for the issued date.
private static const String
  INDEX_DATE_MODIFIED
Initial: "escidoc.publication.modified"
Notes: Index for the modified date.
private static const String
  INDEX_DATE_PUBLISHED_ONLINE
Initial: "escidoc.publication.published-online"
Notes: Index for the published online date.
private static const String
  INDEX_DATE_SUBMITTED
Initial: "escidoc.publication.dateSubmitted"
Notes: Index for the submitted date.
private static const String
  INDEX_EVENT
Initial: "escidoc.any-event"
Notes: Index for events.
private static const String
  INDEX_FULLTEXT
Initial: "escidoc.fulltext"
Notes: Index for fulltexts.
private static const String
  INDEX_GENRE
Initial: "escidoc.publication.type"
Notes: Index for genre.
private static const String
  INDEX_IDENTIFIER
Initial: "escidoc.any-identifier"
Notes: Index for identifiers.
private static const String
  INDEX_LANGUAGE
Initial: "escidoc.publication.language"
Notes: Index for languages.
private static const String
  INDEX_LOCAL_TAG
Initial: "escidoc.property.content-model-specific.local-tags.local-tag"
Notes: Index for local tags.
private static const String
  INDEX_METADATA
Initial: "escidoc.metadata"
Notes: Index for metadata.
private static const String
  INDEX_OBJECT_TYPE
Initial: "escidoc.objecttype"
Notes: Index for object types.
private static const String
  INDEX_ORGANIZATION
Initial: "escidoc.any-organizations"
Notes: Index for organizations.
private static const String
  INDEX_ORGANIZATION_PIDS
Initial: "escidoc.any-organization-pids"
Notes: Index for organization pids.
private static const String
  INDEX_PERSON
Initial: "escidoc.publication.creator.person.compound.person-complete-name"
Notes: Index for persons.
private static const String
  INDEX_PERSON_ROLE
Initial: "escidoc.creator.role"
Notes: Index for creator roles.
private static const String
  INDEX_SOURCE
Initial: "escidoc.any-source"
Notes: Index for sources.
private static const String
  INDEX_TITLE
Initial: "escidoc.any-title"
Notes: Index for any-title.
private static const String
  INDEX_TOPIC
Initial: "escidoc.publication.subject"
Notes: Index for topics.
private LogicalOperator
  logicalOperator
Initial: null
private ArrayList
  searchIndexes
Initial: null
private String
  searchTerm
Initial: null
private static const long
  serialVersionUID
Initial: 1L
Notes: Serializable identifier.
private ArrayList
  subCriteria
Initial: new ArrayList()
Notes: subcriteria for this criterion.
private ArrayList
  typeList
Initial: null
 
MetadataSearchCriterion Methods
Operation Details
public
addSubCriteria(
   MetadataSearchCriterion criterion):void
Sequential
Notes: Adds a subCriteria to this criteria.
public
addSubCriteria(
   ArrayList criteria):void
Sequential
Notes: Adds a subCriteria to this criteria.
@param criterion sub criteria
protected
booleanOperatorToString(
   BooleanOperator operator):String
Sequential
Tags: throws=TechnicalException
Notes: Return the boolean operator as string.
@return boolean operator as string
public
generateCqlQuery():String
Sequential
Tags: throws=ParseException,TechnicalException
Notes: Generate a Cql query string of the criteria.
@return cql query
public
generateCqlTree():CQLNode
Sequential
Tags: throws=CQLParseException,IOException,ParseException,TechnicalException
Notes: Generate a Cql tree structure.
@return root node of the cql tree
protected
getCqlQueryFromSubCriteria():String
Sequential
Tags: throws=TechnicalException,ParseException
Notes: Get the cql query from all the subcriteria.
@return cql query
public
getLogicalOperator():LogicalOperator
Sequential
Notes: Getter for logical operator.
@return logical operator
public
getLogicalOperatorAsString():String
Sequential
Tags: throws=TechnicalException
Notes: Return the last logical operator as string. If there are sub criteria for this criteria, take the logicoperator from the last subcriteria in the list.
@return logical operator as string
public
getSearchIndexes():ArrayList
Sequential
public
getSearchTerm():String
Sequential
public
getSubCriteriaList():ArrayList
Sequential
public
MetadataSearchCriterion(
   CriterionType type):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with criterion type and empty search term. The search term is empty, because this criterion shall be used to verify if a index is present.
public
MetadataSearchCriterion(
   CriterionType type,
   LogicalOperator operator):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with criterion type, logical operator and empty search term. The search term is empty, because this criterion shall be used to verify if a index is present.
public
MetadataSearchCriterion(
   CriterionType type,
   String searchTerm):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with criterion type and search term.
public
MetadataSearchCriterion(
   CriterionType type,
   String searchTerm,
   BooleanOperator booleanOperator):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with criterion type, search term and boolean operator.
public
MetadataSearchCriterion(
   CriterionType type,
   String searchTerm,
   BooleanOperator booleanOperator,
   LogicalOperator operator):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with criterion type, search term, boolean operator and logical operator.
public
MetadataSearchCriterion(
   CriterionType type,
   String searchTerm,
   LogicalOperator operator):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with criterion type, search term and logical operator.
public
MetadataSearchCriterion(
   ArrayList types,
   String searchTerm):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with list of criteria and a searchterm.
protected
MetadataSearchCriterion(
   ArrayList types,
   String searchTerm,
   LogicalOperator operator):
Sequential
Tags: throws=TechnicalException
Notes: Constructor with list of criteria, searchterm and logical operator for the criteria before.
private
setIndexByEnum(
   CriterionType type):ArrayList
Sequential
Tags: throws=TechnicalException
Notes: Return an array list with indices based on the criterion type.
@return array list with indices
public
setLogicalOperator(
   LogicalOperator operator):void
Sequential
Notes: Setter for logical operator.