public class AttributeDescriptorImpl extends Object implements AttributeDescriptor
AttributeDescriptor
This class does not have a custom serialization implementation (like some other API classes
such as AttributeImpl) because its physical representation is the same as its logical
representation, which according to Joshua Bloch in Effective Java, Second Edition makes it
a good candidate for the default Java serialization implementation.
For what constitutes a compatible change in serialization, see Sun's Guidelines.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
indexed |
protected boolean |
multivalued |
protected String |
name |
protected boolean |
stored |
protected boolean |
tokenized |
protected AttributeType<?> |
type |
| Constructor and Description |
|---|
AttributeDescriptorImpl(String name,
boolean indexed,
boolean stored,
boolean tokenized,
boolean multivalued,
AttributeType<?> type)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getName()
Returns the name of this
AttributeDescriptor |
AttributeType<?> |
getType()
|
int |
hashCode() |
boolean |
isIndexed()
|
boolean |
isMultiValued()
Returns whether or not
Attributes described by this AttributeDescriptor are
multivalued, that is, Attribute.getValue() returns a List. |
boolean |
isStored()
|
boolean |
isTokenized()
If the
AttributeType.AttributeFormat of this Attribute is
AttributeType.AttributeFormat.STRING, returns whether or not Source implementations should tokenize it; removing stopwords, etc. |
String |
toString() |
protected String name
protected boolean indexed
protected boolean stored
protected boolean tokenized
protected boolean multivalued
protected AttributeType<?> type
public AttributeDescriptorImpl(String name, boolean indexed, boolean stored, boolean tokenized, boolean multivalued, AttributeType<?> type)
name - - the name of this AttributeDescriptorindexed - - whether Attribute values using this AttributeDescriptor should be indexedstored - - whether Attribute values using this AttributeDescriptor should be storedtokenized - - whether Attribute values using this AttributeDescriptor should be tokenizedmultivalued - whether Attribute values using this AttributeDescriptor are multivaluedtype - - the type of this AttributeDescriptorAttributeDescriptor.isIndexed(),
AttributeDescriptor.isStored(),
AttributeDescriptor.isTokenized(),
AttributeDescriptor.isMultiValued()public String getName()
AttributeDescriptorAttributeDescriptorgetName in interface AttributeDescriptorString - the name of this AttributeDescriptorpublic AttributeType<?> getType()
AttributeDescriptorgetType in interface AttributeDescriptorAttributeType - the type of values of Attributes described by this
AttributeDescriptorpublic boolean isIndexed()
AttributeDescriptorAttribute should be indexed by Source
implementations, therefore part of Query evaluation. Attributes may only want to be stored, not indexed.isIndexed in interface AttributeDescriptorAttributeAttributeDescriptor.isStored()public boolean isStored()
AttributeDescriptorSource implementations must store the value
of this Attribute. Some Attributes may only need to be indexed, not stored (or
vice versa).isStored in interface AttributeDescriptorAttributeAttributeDescriptor.isIndexed()public boolean isTokenized()
AttributeDescriptorAttributeType.AttributeFormat of this Attribute is
AttributeType.AttributeFormat.STRING, returns whether or not Source implementations should tokenize it; removing stopwords, etc.
This method is only relevant to Attributes with an AttributeType.AttributeFormat of AttributeType.AttributeFormat.STRING Some Attributes may only
need to be stored, not indexed (or vice versa).
isTokenized in interface AttributeDescriptorAttributesAttributeDescriptor.isStored()public boolean isMultiValued()
AttributeDescriptorAttributes described by this AttributeDescriptor are
multivalued, that is, Attribute.getValue() returns a List.isMultiValued in interface AttributeDescriptorThis work is licensed under a Creative Commons Attribution 4.0 International License.