org.gcube.indexmanagement.common
Class IndexType

java.lang.Object
  extended by org.gcube.indexmanagement.common.IndexType
Direct Known Subclasses:
ForwardIndexType, FullTextIndexType, GeoIndexType

public class IndexType
extends Object


Field Summary
static String APXCOUNT
           
static String COLLECTION_FIELD
          The field name for the collection id of a record
static String DOCID_FIELD
          The field name of an index type that indicates the document id of a record
static String DOCNR
           
static String[] GEODEFAULT
           
static String GEOFIELD
          Default searchable field for Geo Index
protected  String indexType
          The definition of this index type
protected  String indexTypeID
          The name of this index type
static String LANGUAGE_FIELD
          The field name for the collection language of a record
static String MBR
           
static String PAYLOAD_FIELD
          The field name of an index type that indicates the full payload of a record
static String PRESENTABLE_TAG
          Tag for presentable fields in the field info published
static String RATIO
          Optional Default Fields for geo results
static String RESULTSNO_EVENT
           
static String RESULTSNOFINAL_EVENT
           
static String SCORE_FIELD
          The field name of an index type that indicates the ranking of a record
static String SEARCHABLE_TAG
          Tag for searchable fields in the field info published
static String SEPERATOR_FIELD_INFO
          Seperator for the field info published
static String SNIPPET
          Snippet character
static String STATS_FIELD
          The field name of an index type that indicates the docStatistics of a record
static String WILDCARD
          Wildcard character
 
Constructor Summary
protected IndexType(String indexTypeName)
          Class constructor.
 
Method Summary
 String getIndexTypeAsString()
          Returns the index type XML definition
 String getIndexTypeName()
          Returns the index type name.
 String retrieveIndexTypeGenericResource(org.gcube.common.core.scope.GCUBEScope scope)
          Retrieves an index type definition stored as a generic resource in the DIS and returns it as a string.
static boolean sendIndication(long retrieved)
          Checks if an indication must be sent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCID_FIELD

public static final String DOCID_FIELD
The field name of an index type that indicates the document id of a record

See Also:
Constant Field Values

PAYLOAD_FIELD

public static final String PAYLOAD_FIELD
The field name of an index type that indicates the full payload of a record

See Also:
Constant Field Values

STATS_FIELD

public static final String STATS_FIELD
The field name of an index type that indicates the docStatistics of a record

See Also:
Constant Field Values

SCORE_FIELD

public static final String SCORE_FIELD
The field name of an index type that indicates the ranking of a record

See Also:
Constant Field Values

COLLECTION_FIELD

public static final String COLLECTION_FIELD
The field name for the collection id of a record

See Also:
Constant Field Values

LANGUAGE_FIELD

public static final String LANGUAGE_FIELD
The field name for the collection language of a record

See Also:
Constant Field Values

SEPERATOR_FIELD_INFO

public static final String SEPERATOR_FIELD_INFO
Seperator for the field info published

See Also:
Constant Field Values

WILDCARD

public static final String WILDCARD
Wildcard character

See Also:
Constant Field Values

SNIPPET

public static final String SNIPPET
Snippet character

See Also:
Constant Field Values

PRESENTABLE_TAG

public static final String PRESENTABLE_TAG
Tag for presentable fields in the field info published

See Also:
Constant Field Values

SEARCHABLE_TAG

public static final String SEARCHABLE_TAG
Tag for searchable fields in the field info published

See Also:
Constant Field Values

RESULTSNO_EVENT

public static final String RESULTSNO_EVENT
See Also:
Constant Field Values

RESULTSNOFINAL_EVENT

public static final String RESULTSNOFINAL_EVENT
See Also:
Constant Field Values

GEOFIELD

public static final String GEOFIELD
Default searchable field for Geo Index

See Also:
Constant Field Values

RATIO

public static final String RATIO
Optional Default Fields for geo results

See Also:
Constant Field Values

APXCOUNT

public static final String APXCOUNT
See Also:
Constant Field Values

DOCNR

public static final String DOCNR
See Also:
Constant Field Values

MBR

public static final String MBR
See Also:
Constant Field Values

GEODEFAULT

public static final String[] GEODEFAULT

indexTypeID

protected String indexTypeID
The name of this index type


indexType

protected String indexType
The definition of this index type

Constructor Detail

IndexType

protected IndexType(String indexTypeName)
Class constructor.

Parameters:
indexTypeName - the name of this index type
Method Detail

getIndexTypeName

public String getIndexTypeName()
Returns the index type name.

Returns:

getIndexTypeAsString

public String getIndexTypeAsString()
Returns the index type XML definition

Returns:

retrieveIndexTypeGenericResource

public String retrieveIndexTypeGenericResource(org.gcube.common.core.scope.GCUBEScope scope)
                                        throws Exception
Retrieves an index type definition stored as a generic resource in the DIS and returns it as a string.

Parameters:
indexTypeName - the name of the index type to retrieve
scope - the scope that the index type belongs to
Returns:
the contents of the generic resource
Throws:
Exception

sendIndication

public static boolean sendIndication(long retrieved)
Checks if an indication must be sent

Parameters:
retrieved - - the results retrieved so far by an Index Searcher
Returns:


Copyright © 2012. All Rights Reserved.