|
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.RecordAccessor
public class RecordAccessor
methods to make reading of literals and annotations a bit easier, similar to blackboard.
| Constructor Summary | |
|---|---|
RecordAccessor(Record record)
create accessor for record. |
|
| Method Summary | ||
|---|---|---|
int |
annotationSize(java.lang.String annotationName)
get number of record annotations. |
|
int |
annotationSize(java.lang.String attributeName,
java.lang.String annotationName)
get number of attribute annotations with a given name. |
|
Annotation |
getAnnotation(java.lang.String annotationName)
get a record annotation. |
|
Annotation |
getAnnotation(java.lang.String attributeName,
java.lang.String annotationName)
get first attribute annotation with a given name. |
|
java.util.List<Annotation> |
getAnnotations(java.lang.String annotationName)
get list of record annotations. |
|
java.util.List<Annotation> |
getAnnotations(java.lang.String attributeName,
java.lang.String annotationName)
get all attribute annotations with a given name. |
|
java.lang.String |
getAnnotationValue(java.lang.String annotationName,
java.lang.String valueName)
get a named value of record annotation. |
|
java.util.List<java.lang.String> |
getAnnotationValues(java.lang.String annotationName)
get anonymous value list of record annotation. |
|
Literal |
getLiteral(java.lang.String attributeName)
get a literal attribute value. |
|
java.util.List<Literal> |
getLiterals(java.lang.String attributeName)
get literal attribute values. |
|
Record |
getRecord()
|
|
java.lang.Double |
getResultAnnotationFloatValue(java.lang.String valueName)
get named value of result annotation, converted to an Double. |
|
java.lang.Integer |
getResultAnnotationIntValue(java.lang.String valueName)
get named value of result annotation, converted to an Integer. |
|
java.lang.String |
getResultAnnotationValue(java.lang.String valueName)
get named value of result annotation. |
|
Terms |
getTerms(java.lang.String attributeName)
get terms list for an attribute. |
|
boolean |
hasAnnotation(java.lang.String annotationName)
check if a record annotation exists. |
|
boolean |
hasAnnotation(java.lang.String attributeName,
java.lang.String annotationName)
check if an attribute annotation exists. |
|
boolean |
hasAttribute(java.lang.String attributeName)
check if an attribute exists. |
|
boolean |
hasLiterals(java.lang.String attributeName)
|
|
int |
literalSize(java.lang.String attributeName)
get number of literals in an attribute. |
|
static
|
unmodifiableList(java.util.Collection<? extends T> collection)
convert the collection to a list, if it is not actually a list already, and create a unmodifiable list from it. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RecordAccessor(Record record)
record - a record.| Method Detail |
|---|
public boolean hasAttribute(java.lang.String attributeName)
attributeName - an attribute name.
public boolean hasLiterals(java.lang.String attributeName)
attributeName - an attribute name.
public int literalSize(java.lang.String attributeName)
attributeName - an attribute name.
public Literal getLiteral(java.lang.String attributeName)
attributeName - an attribute name.
public java.util.List<Literal> getLiterals(java.lang.String attributeName)
attributeName - an attribute name.
public boolean hasAnnotation(java.lang.String annotationName)
annotationName - an annotation name
public int annotationSize(java.lang.String annotationName)
annotationName - an annotation name
public Annotation getAnnotation(java.lang.String annotationName)
annotationName - an annotation name
public java.util.List<Annotation> getAnnotations(java.lang.String annotationName)
annotationName - an annotation name
public java.lang.String getAnnotationValue(java.lang.String annotationName,
java.lang.String valueName)
annotationName - annotation name.valueName - value name
public java.util.List<java.lang.String> getAnnotationValues(java.lang.String annotationName)
annotationName - annotation name.
public boolean hasAnnotation(java.lang.String attributeName,
java.lang.String annotationName)
attributeName - an attribute nameannotationName - an annotation name
public int annotationSize(java.lang.String attributeName,
java.lang.String annotationName)
attributeName - attribute nameannotationName - annotation name
public Annotation getAnnotation(java.lang.String attributeName,
java.lang.String annotationName)
attributeName - attribute nameannotationName - annotation name
public java.util.List<Annotation> getAnnotations(java.lang.String attributeName,
java.lang.String annotationName)
attributeName - attribute nameannotationName - annotation name
public Terms getTerms(java.lang.String attributeName)
attributeName - name of attribute.
public Record getRecord()
public java.lang.String getResultAnnotationValue(java.lang.String valueName)
valueName - value name.
public java.lang.Integer getResultAnnotationIntValue(java.lang.String valueName)
valueName - value name.
public java.lang.Double getResultAnnotationFloatValue(java.lang.String valueName)
valueName - value name.
public static <T> java.util.List<T> unmodifiableList(java.util.Collection<? extends T> collection)
T - type of collection elements.collection - a collection
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||