de.topicmapslab.majortom.redis.store.index
Class RedisLiteralIndex

java.lang.Object
  extended by de.topicmapslab.majortom.index.IndexImpl<RedisTopicMapStore>
      extended by de.topicmapslab.majortom.redis.store.index.RedisLiteralIndex
All Implemented Interfaces:
de.topicmapslab.majortom.model.index.IIndex, de.topicmapslab.majortom.model.index.ILiteralIndex, org.tmapi.index.Index, org.tmapi.index.LiteralIndex

public class RedisLiteralIndex
extends IndexImpl<RedisTopicMapStore>
implements de.topicmapslab.majortom.model.index.ILiteralIndex


Field Summary
private static java.lang.String INDEX_IS_CLOSED
           
private static java.lang.String NULL_IS_AN_INVALID_VALUE
           
private static java.lang.String NULL_IS_AN_INVALID_VALUE_AND_OR_DATATYPE
           
private  RedisHandler redis
           
 
Constructor Summary
RedisLiteralIndex(RedisTopicMapStore store)
          constructor
 
Method Summary
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getBooleans(boolean arg0)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(org.tmapi.core.Locator datatypeLocator)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(java.lang.String arg0)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(java.lang.String value, org.tmapi.core.Locator datatype)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(java.lang.String value, java.lang.String datatype)
          Internal method to get all characteristics by the value and datatype
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsByDatatype(java.lang.String datatype)
          Internal method to get all characteristics by the datatype
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.util.regex.Pattern regex)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.util.regex.Pattern regex, org.tmapi.core.Locator datatype)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.util.regex.Pattern regex, java.lang.String datatype)
          Internal method to get all characteristics by a regexp and the datatype
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.lang.String regex)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.lang.String regex, org.tmapi.core.Locator datatype)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCoordinates(de.topicmapslab.geotype.wgs84.Wgs84Coordinate value)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCoordinates(de.topicmapslab.geotype.wgs84.Wgs84Coordinate value, double diff)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.IDatatypeAware> getDatatypeAwares(org.tmapi.core.Locator datatype)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.IDatatypeAware> getDatatypeAwares(java.lang.String datatype)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDateTime(java.util.Calendar value)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDateTime(java.util.Calendar value, java.util.Calendar deviance)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDoubles(double value)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDoubles(double value, double diff)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getFloats(float value)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getFloats(float value, double diff)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getIntegers(int value)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getIntegers(int value, double diff)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getLongs(long value)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getLongs(long value, double diff)
          
 java.util.Collection<org.tmapi.core.Name> getNames()
          
 java.util.Collection<org.tmapi.core.Name> getNames(java.lang.String value)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.IName> getNamesInternal()
          Internal method to get all names
 java.util.Collection<de.topicmapslab.majortom.model.core.IName> getNamesInternal(java.lang.String value)
          Internal method to get all names by their value
 java.util.Collection<org.tmapi.core.Occurrence> getOccurrences()
          
 java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(org.tmapi.core.Locator locator)
          
 java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(java.lang.String value)
          
 java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(java.lang.String value, org.tmapi.core.Locator datatype)
          
 java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(java.lang.String value, java.lang.String datatype)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.IOccurrence> getOccurrencesInternal()
          Internal method to return all occurrences
 java.util.Collection<de.topicmapslab.majortom.model.core.IOccurrence> getOccurrencesInternal(java.lang.String value, java.lang.String datatype)
          Internal method to return all occurrences by their value and datatype
 java.util.Collection<de.topicmapslab.majortom.model.core.IOccurrence> getOccurrencesInternalByDatatype(java.lang.String datatype)
          Internal method to return all occurrences by their datatype
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getUris(java.net.URI uri)
          
 java.util.Collection<org.tmapi.core.Variant> getVariants()
          
 java.util.Collection<org.tmapi.core.Variant> getVariants(org.tmapi.core.Locator value)
          
 java.util.Collection<org.tmapi.core.Variant> getVariants(java.lang.String value)
          
 java.util.Collection<org.tmapi.core.Variant> getVariants(java.lang.String value, org.tmapi.core.Locator datatype)
          
 java.util.Collection<org.tmapi.core.Variant> getVariants(java.lang.String value, java.lang.String datatype)
          Internal method to all variants by the value and datatype
 java.util.Collection<de.topicmapslab.majortom.model.core.IVariant> getVariantsInternal()
          Internal method to get all variants
 java.util.Collection<de.topicmapslab.majortom.model.core.IVariant> getVariantsInternal(java.lang.String value, java.lang.String datatype)
          Internal method to return all variants by their value and datatype
 java.util.Collection<de.topicmapslab.majortom.model.core.IVariant> getVariantsInternalByDatatype(java.lang.String datatype)
          Internal method to return all variants by their datatype
 
Methods inherited from class de.topicmapslab.majortom.index.IndexImpl
clear, close, getTopicMapStore, isAutoUpdated, isOpen, open, reindex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.topicmapslab.majortom.model.index.IIndex
clear
 
Methods inherited from interface org.tmapi.index.Index
close, isAutoUpdated, isOpen, open, reindex
 

Field Detail

NULL_IS_AN_INVALID_VALUE_AND_OR_DATATYPE

private static final java.lang.String NULL_IS_AN_INVALID_VALUE_AND_OR_DATATYPE
See Also:
Constant Field Values

NULL_IS_AN_INVALID_VALUE

private static final java.lang.String NULL_IS_AN_INVALID_VALUE
See Also:
Constant Field Values

INDEX_IS_CLOSED

private static final java.lang.String INDEX_IS_CLOSED
See Also:
Constant Field Values

redis

private RedisHandler redis
Constructor Detail

RedisLiteralIndex

public RedisLiteralIndex(RedisTopicMapStore store)
constructor

Parameters:
store - the store
Method Detail

getNames

public java.util.Collection<org.tmapi.core.Name> getNames(java.lang.String value)

Specified by:
getNames in interface org.tmapi.index.LiteralIndex

getNamesInternal

public java.util.Collection<de.topicmapslab.majortom.model.core.IName> getNamesInternal(java.lang.String value)
Internal method to get all names by their value

Parameters:
value - the value
Returns:
the names

getNamesInternal

public java.util.Collection<de.topicmapslab.majortom.model.core.IName> getNamesInternal()
Internal method to get all names

Returns:
the names

getOccurrences

public java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(java.lang.String value)

Specified by:
getOccurrences in interface org.tmapi.index.LiteralIndex

getOccurrences

public java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(org.tmapi.core.Locator locator)

Specified by:
getOccurrences in interface org.tmapi.index.LiteralIndex

getOccurrences

public java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(java.lang.String value,
                                                                      org.tmapi.core.Locator datatype)

Specified by:
getOccurrences in interface org.tmapi.index.LiteralIndex

getOccurrences

public java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(java.lang.String value,
                                                                      java.lang.String datatype)


getOccurrencesInternal

public java.util.Collection<de.topicmapslab.majortom.model.core.IOccurrence> getOccurrencesInternal(java.lang.String value,
                                                                                                    java.lang.String datatype)
Internal method to return all occurrences by their value and datatype

Parameters:
value - the value
datatype - the datatype
Returns:
the occurrences

getOccurrencesInternalByDatatype

public java.util.Collection<de.topicmapslab.majortom.model.core.IOccurrence> getOccurrencesInternalByDatatype(java.lang.String datatype)
Internal method to return all occurrences by their datatype

Parameters:
datatype - the datatype
Returns:
the occurrences

getVariantsInternalByDatatype

public java.util.Collection<de.topicmapslab.majortom.model.core.IVariant> getVariantsInternalByDatatype(java.lang.String datatype)
Internal method to return all variants by their datatype

Parameters:
datatype - the datatype
Returns:
the variants

getOccurrencesInternal

public java.util.Collection<de.topicmapslab.majortom.model.core.IOccurrence> getOccurrencesInternal()
Internal method to return all occurrences

Returns:
the occurrences

getVariants

public java.util.Collection<org.tmapi.core.Variant> getVariants(java.lang.String value)

Specified by:
getVariants in interface org.tmapi.index.LiteralIndex

getVariants

public java.util.Collection<org.tmapi.core.Variant> getVariants(org.tmapi.core.Locator value)

Specified by:
getVariants in interface org.tmapi.index.LiteralIndex

getVariants

public java.util.Collection<org.tmapi.core.Variant> getVariants(java.lang.String value,
                                                                org.tmapi.core.Locator datatype)

Specified by:
getVariants in interface org.tmapi.index.LiteralIndex

getVariants

public java.util.Collection<org.tmapi.core.Variant> getVariants(java.lang.String value,
                                                                java.lang.String datatype)
Internal method to all variants by the value and datatype

Parameters:
value - the value
datatype - the datatype
Returns:
the variants

getVariantsInternal

public java.util.Collection<de.topicmapslab.majortom.model.core.IVariant> getVariantsInternal(java.lang.String value,
                                                                                              java.lang.String datatype)
Internal method to return all variants by their value and datatype

Parameters:
value - the value
datatype - the datatype
Returns:
the variants

getVariantsInternal

public java.util.Collection<de.topicmapslab.majortom.model.core.IVariant> getVariantsInternal()
Internal method to get all variants

Returns:
the variants

getBooleans

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getBooleans(boolean arg0)

Specified by:
getBooleans in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristics

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(java.lang.String arg0)

Specified by:
getCharacteristics in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristics

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(org.tmapi.core.Locator datatypeLocator)

Specified by:
getCharacteristics in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristicsByDatatype

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsByDatatype(java.lang.String datatype)
Internal method to get all characteristics by the datatype

Parameters:
datatype - the datatype
Returns:
the characteristics

getCharacteristics

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(java.lang.String value,
                                                                                                     org.tmapi.core.Locator datatype)

Specified by:
getCharacteristics in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristics

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(java.lang.String value,
                                                                                                     java.lang.String datatype)
Internal method to get all characteristics by the value and datatype

Parameters:
value - the value
datatype - the datatype
Returns:
the characteristics

getCharacteristicsMatches

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.lang.String regex)

Specified by:
getCharacteristicsMatches in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristicsMatches

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.util.regex.Pattern regex)

Specified by:
getCharacteristicsMatches in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristicsMatches

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.lang.String regex,
                                                                                                            org.tmapi.core.Locator datatype)

Specified by:
getCharacteristicsMatches in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristicsMatches

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.util.regex.Pattern regex,
                                                                                                            org.tmapi.core.Locator datatype)

Specified by:
getCharacteristicsMatches in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCharacteristicsMatches

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristicsMatches(java.util.regex.Pattern regex,
                                                                                                            java.lang.String datatype)
Internal method to get all characteristics by a regexp and the datatype

Parameters:
regex - the regular expression
datatype - the datatype
Returns:
the characteristics

getCoordinates

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCoordinates(de.topicmapslab.geotype.wgs84.Wgs84Coordinate value)

Specified by:
getCoordinates in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getCoordinates

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCoordinates(de.topicmapslab.geotype.wgs84.Wgs84Coordinate value,
                                                                                                 double diff)

Specified by:
getCoordinates in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getDatatypeAwares

public java.util.Collection<de.topicmapslab.majortom.model.core.IDatatypeAware> getDatatypeAwares(org.tmapi.core.Locator datatype)

Specified by:
getDatatypeAwares in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getDatatypeAwares

public java.util.Collection<de.topicmapslab.majortom.model.core.IDatatypeAware> getDatatypeAwares(java.lang.String datatype)


getDateTime

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDateTime(java.util.Calendar value)

Specified by:
getDateTime in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getDateTime

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDateTime(java.util.Calendar value,
                                                                                              java.util.Calendar deviance)

Specified by:
getDateTime in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getDoubles

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDoubles(double value)

Specified by:
getDoubles in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getDoubles

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getDoubles(double value,
                                                                                             double diff)

Specified by:
getDoubles in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getFloats

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getFloats(float value)

Specified by:
getFloats in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getFloats

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getFloats(float value,
                                                                                            double diff)

Specified by:
getFloats in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getIntegers

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getIntegers(int value)

Specified by:
getIntegers in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getIntegers

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getIntegers(int value,
                                                                                              double diff)

Specified by:
getIntegers in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getLongs

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getLongs(long value)

Specified by:
getLongs in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getLongs

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getLongs(long value,
                                                                                           double diff)

Specified by:
getLongs in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getNames

public java.util.Collection<org.tmapi.core.Name> getNames()

Specified by:
getNames in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getOccurrences

public java.util.Collection<org.tmapi.core.Occurrence> getOccurrences()

Specified by:
getOccurrences in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getUris

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getUris(java.net.URI uri)

Specified by:
getUris in interface de.topicmapslab.majortom.model.index.ILiteralIndex

getVariants

public java.util.Collection<org.tmapi.core.Variant> getVariants()

Specified by:
getVariants in interface de.topicmapslab.majortom.model.index.ILiteralIndex