|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.search.api.helper.AnnotationListAccessor
public class AnnotationListAccessor
base class for wrappers of list of attribute annotations (like terms or facets). Provides index based methods to the elements in the list and their values and subannotations. Includes a few type conversion helper methods, too.
| Constructor Summary | |
|---|---|
AnnotationListAccessor(java.lang.String attributeName,
java.util.Collection<Annotation> annotations)
create instance from given data. the collection is copied to a list (based on iteration order) if it is not an instance of List already. |
|
AnnotationListAccessor(java.lang.String attributeName,
java.util.List<Annotation> annotations)
create instance from given data. |
|
| Method Summary | |
|---|---|
Annotation |
getAnnotation(int index,
java.lang.String name)
get the named subannotation of the n'th annotation from the list. |
java.util.List<Annotation> |
getAnnotations(int index,
java.lang.String name)
get list of named subannotations of the n'th annotation from the list. |
java.lang.String |
getAttributeName()
|
java.lang.Double |
getFloatProperty(int index,
java.lang.String name)
access named value of n'th annotation in list and convert it to an floating point value. |
java.lang.Integer |
getIntProperty(int index,
java.lang.String name)
access named value of n'th annotation in list and convert it to an integer. |
java.lang.String |
getProperty(int index,
java.lang.String name)
access named value of n'th annotation in list. |
java.util.List<Annotation> |
getSource()
|
int |
length()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationListAccessor(java.lang.String attributeName,
java.util.List<Annotation> annotations)
attributeName - name of annotated attribute.annotations - list of annotations.
public AnnotationListAccessor(java.lang.String attributeName,
java.util.Collection<Annotation> annotations)
List already.
attributeName - name of annotated attribute.annotations - collection of annotations.| Method Detail |
|---|
public java.lang.String getAttributeName()
public int length()
public Annotation getAnnotation(int index,
java.lang.String name)
index - position in listname - name of subannotation.
public java.util.List<Annotation> getAnnotations(int index,
java.lang.String name)
index - position in listname - name of subannotation.
public java.lang.String getProperty(int index,
java.lang.String name)
index - position in listname - name of named value.
public java.lang.Integer getIntProperty(int index,
java.lang.String name)
index - position in listname - name of named value.
public java.lang.Double getFloatProperty(int index,
java.lang.String name)
index - position in listname - name of named value.
public java.util.List<Annotation> getSource()
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||