4A Server -
2.0
|
Base class representing attribute of annotation. More...
Protected Member Functions | |
String | getCommentXmlPart (boolean proto11) |
String | xmlFormatValue () |
Protected Attributes | |
Integer | id |
int | annotation |
String | name |
String | simpleType |
Integer | type |
String | uri |
String | nested |
Integer | linked |
String | stringValue |
String | textValue |
Date | dateValue |
Integer | intValue |
BigDecimal | decValue |
Boolean | boolVAlue |
byte[] | binValue |
Integer | userValue |
BigDecimal | geoLat |
BigDecimal | geoLong |
String | entityType |
String | entityVisualURI |
String | comment |
Integer | priority |
Annotation | refAnnotation |
AnnotType | attributeType |
Annotation | nestedAnnotation |
Annotation | linkedAnnotation |
User | user |
List< EntityAdditionalAttribute > | entityAdditionalAttributes |
Static Protected Attributes | |
static final long | serialVersionUID = 1L |
Private Attributes | |
String | uriInOntology |
Base class representing attribute of annotation.
Base class representing attribute of annotation
Definition at line 57 of file BaseAttribute.java.
cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.BaseAttribute | ( | ) |
Constructor for base attribute. Note: every extended class MUST HAVE default constructor without parameters
Definition at line 200 of file BaseAttribute.java.
cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.BaseAttribute | ( | Integer | id | ) |
Creates new attribute
id | id of new attribute |
Definition at line 207 of file BaseAttribute.java.
int cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.compareTo | ( | Object | o | ) |
Compares attributes according to priority
o | Object to compare with |
Definition at line 550 of file BaseAttribute.java.
boolean cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.contentEquals | ( | Object | obj | ) |
Compares this with other object and returns, whether objects are same type and have same content (id is irrelevant). Contents of nested annotations
are also compared.
obj | Object to compare with |
Definition at line 578 of file BaseAttribute.java.
boolean cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.contentEquals | ( | Object | obj, |
boolean | refAnnot | ||
) |
Compares this with other object and returns, whether objects are same type and have same content (id is irrelevant). Contents of nested annotations are also compared.
obj | Object to compare with |
refAnnot | RefAnnotation will not be checked if the parameter is set to false |
Definition at line 591 of file BaseAttribute.java.
boolean cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.equals | ( | Object | object | ) |
Compares this with other object and returns, whether objects are same type and have same id.
object | Object to compare with |
Definition at line 762 of file BaseAttribute.java.
int cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getAnnotation | ( | ) |
Gets id of annotation to which this attribute belongs
Definition at line 844 of file BaseAttribute.java.
AnnotType cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getAttributeType | ( | ) |
Gets structured type of attribute (type of annotation)
Definition at line 880 of file BaseAttribute.java.
byte [] cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getBinValue | ( | ) |
Gets attribute value of binary
Definition at line 1083 of file BaseAttribute.java.
Boolean cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getBoolValue | ( | ) |
Gets attribute value of boolean
Definition at line 1074 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getComment | ( | ) |
Gets textual comment
Definition at line 778 of file BaseAttribute.java.
|
protected |
Just a helper function,which returns XML part for comments.
proto11 | If true, protocol version is greater then 1.0 |
Definition at line 218 of file BaseAttribute.java.
Date cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getDateValue | ( | ) |
Gets attribute value of date
Definition at line 1092 of file BaseAttribute.java.
BigDecimal cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getDecValue | ( | ) |
Gets attribute value of decimal
Definition at line 1101 of file BaseAttribute.java.
List<EntityAdditionalAttribute> cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getEntityAdditionalAttributes | ( | ) |
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getEntityType | ( | ) |
Gets attribute value of entityType
Definition at line 1038 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getEntityVisualURI | ( | ) |
Gets attribute value of entityVisualURI
Definition at line 1056 of file BaseAttribute.java.
BigDecimal cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getGeoLat | ( | ) |
Gets attribute value of geo latitude
Definition at line 1110 of file BaseAttribute.java.
BigDecimal cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getGeoLong | ( | ) |
Gets attribute value of geo longitude
Definition at line 1119 of file BaseAttribute.java.
Integer cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getId | ( | ) |
Gets id of attribute of annotation
Definition at line 947 of file BaseAttribute.java.
Integer cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getIntValue | ( | ) |
Gets attribute value of integer
Definition at line 1128 of file BaseAttribute.java.
Annotation cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getLinkedAnnotation | ( | ) |
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getName | ( | ) |
Gets name of attribute
Definition at line 808 of file BaseAttribute.java.
Annotation cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getNestedAnnotation | ( | ) |
Gets nested annotation
Definition at line 898 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getNestedID | ( | ) |
Gets tmpID of the nested annotation
Definition at line 907 of file BaseAttribute.java.
Integer cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getPriority | ( | ) |
Gets attribute priority
Definition at line 1168 of file BaseAttribute.java.
Annotation cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getRefAnnotation | ( | ) |
Gets annotation to which this attribute belongs
Definition at line 862 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getSimpleType | ( | ) |
Gets name of simple type of attribute
Definition at line 826 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getStringValue | ( | ) |
Gets attribute value of string
Definition at line 1137 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getTextValue | ( | ) |
Gets attribute value of text
Definition at line 1146 of file BaseAttribute.java.
Integer cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getType | ( | ) |
Gets id of structured type of attribute (type of annotation)
Definition at line 965 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getTypeOntologyUri | ( | ) |
Gets URI of type of attribute in ontology
Definition at line 249 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getTypeUriV2 | ( | ) |
Gets URI of type of attribute for protocol v. 2.0
Definition at line 309 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getUri | ( | ) |
Gets attribute value of uri
Definition at line 1011 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getUriInOntology | ( | ) |
Gets attributes URI in ontology
Definition at line 1029 of file BaseAttribute.java.
Integer cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getUserValue | ( | ) |
Gets attribute value of user
Definition at line 1159 of file BaseAttribute.java.
|
abstract |
Gets value of the attribute
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.getValueType | ( | ) |
Gets value type of attribute
Definition at line 288 of file BaseAttribute.java.
int cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.hashCode | ( | ) |
Definition at line 797 of file BaseAttribute.java.
boolean cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.isEmpty | ( | ) |
Checks if attribute value is empty or default value
Definition at line 750 of file BaseAttribute.java.
boolean cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.isStructured | ( | ) |
Checks if attribute is structured. Structured attribute is for example GeoPointAttribute
Definition at line 984 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setAnnotation | ( | int | annotation | ) |
Sets id of annotation to which this attribute belongs
annotation | id of annotation to which this attribute belongs |
Definition at line 853 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setAttributeType | ( | AnnotType | attributeType | ) |
Sets structured type of attribute (type of annotation)
attributeType | Structured type of attribute (type of annotation) |
Definition at line 889 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setComment | ( | String | comment | ) |
Sets textual comment
comment | Textual comment |
Definition at line 787 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setEntityType | ( | String | entityType | ) |
Sets attribute value of entityType
entityType | Attribute value of entityType |
Definition at line 1047 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setEntityVisualURI | ( | String | entityVisualURI | ) |
Sets attribute value of entityVisualURI
entityVisualURI | New value of entityVisualURI |
Definition at line 1065 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setId | ( | Integer | id | ) |
Sets id of attribute of annotation
id | Id of attribute of annotation |
Definition at line 956 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setLinkedAnnotation | ( | Annotation | linkedAnnotation | ) |
Definition at line 938 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setLinkedID | ( | int | link | ) |
Sets tmpID of the nested annotation
Definition at line 921 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setName | ( | String | name | ) |
Sets name of attribute
name | Name of attribute |
Definition at line 817 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setNestedAnnotation | ( | Annotation | nestedAnnotation | ) |
Sets nested annotation
nestedAnnotation | Nested annotation |
Definition at line 930 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setNestedID | ( | String | nest | ) |
Sets tmpID of the nested annotation
Definition at line 914 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setPriority | ( | Integer | priority | ) |
Sets attribute priority
priority | Attribute priority |
Definition at line 1177 of file BaseAttribute.java.
|
abstract |
Parses provided value and sets that value as a value of attribute
value | new value of the attribute in raw form from XML |
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setRefAnnotation | ( | Annotation | value | ) |
Sets annotation to which this attribute belongs
value | Annotation to which this attribute belongs |
Definition at line 871 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setSimpleType | ( | String | simpleType | ) |
Sets name of simple type of attribute
simpleType | Name of simple type of attribute |
Definition at line 835 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setTextValue | ( | String | textValue | ) |
Definition at line 1150 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setType | ( | Integer | type | ) |
Sets id of structured type of attribute (type of annotation)
type | id of structured type of attribute (type of annotation) |
Definition at line 974 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setUri | ( | String | uri | ) |
Sets attribute value of uri
uri | Attribute value of uri |
Definition at line 1002 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setUriInOntology | ( | String | uriInOntology | ) |
Sets attributes URI in ontology
uriInOntology | Uri in ontology |
Definition at line 1020 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.setUser | ( | User | user | ) |
Sets attribute value of type Person (user)
user | Attribute value of type Person (user) |
Definition at line 993 of file BaseAttribute.java.
|
abstract |
Sets value of the attribute. Value should already be a native java value.
For example, for attribute of type Integer value should be integer, not string. If you want to set value and parse that value, you should use setRawValue
value | new value of the attribute |
EntityAdditionalAttribute cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.toEntityAdditionalAttribute | ( | ) |
Converts this attribute to SugEntityAdditionalAttribute Some conversions are not possible as a values are complex
Definition at line 486 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.toJSONString | ( | ) |
Stores attribute data into the JSON string representation. String could be processed on the NLP server. Method stores IDs of referenced structures, so when creating an object from this representation, one must look up for structures by IDs.
Definition at line 1192 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.toString | ( | ) |
Definition at line 792 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.toSXMLString | ( | ) |
Returns serialized informations about attribute of annotation in SXML for protocol V2
Definition at line 430 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.toXMLString | ( | boolean | proto11, |
boolean | tmpIdForNested, | ||
boolean | withOntology | ||
) |
Returns serialized informations about attribute of annotation in XML
proto11 | If true, protocol version is greater then 1.0 |
tmpIdForNested | If true, nested annotations will have attribute tmpId |
withOntology | If true, URI in ontology will be serialized, if false, it will be omitted |
Definition at line 266 of file BaseAttribute.java.
String cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.toXMLStringV2 | ( | ) |
Returns serialized informations about attribute of annotation in XML for protocol V2
Definition at line 331 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.updateFromBaseAttributeAll | ( | BaseAttribute | ba | ) |
Copies Attribute class attributes to a new instance
ba | attribute of the annotation |
Definition at line 1281 of file BaseAttribute.java.
void cz.vutbr.fit.knot.annotations.entity.attribute.BaseAttribute.updateFromSugBaseAttributeAll | ( | SugBaseAttribute | ba | ) |
Copies SugBaseAttribute class attributes to a Attribute instance
ba | attribute of the suggestion |
Definition at line 1317 of file BaseAttribute.java.
|
protected |
Formats attribute value for XML. Function should provide date converting for date attribute, string escaping for string based attributes...
Definition at line 237 of file BaseAttribute.java.
|
protected |
Id of annotation to which this attribute belongs
Definition at line 73 of file BaseAttribute.java.
|
protected |
Structured type of attribute (type of annotation)
Definition at line 174 of file BaseAttribute.java.
|
protected |
Attribute value of type Binary
Definition at line 135 of file BaseAttribute.java.
|
protected |
Attribute value of type Boolean
Definition at line 130 of file BaseAttribute.java.
|
protected |
Comment
Definition at line 160 of file BaseAttribute.java.
|
protected |
Attribute value of type DateTime, Date or Time
Definition at line 118 of file BaseAttribute.java.
|
protected |
Attribute value of type Decimal
Definition at line 126 of file BaseAttribute.java.
|
protected |
List of entity additional attribute
Definition at line 194 of file BaseAttribute.java.
|
protected |
type of vocalbulary entity
Definition at line 150 of file BaseAttribute.java.
|
protected |
uri of image that entity represents
Definition at line 154 of file BaseAttribute.java.
|
protected |
Attribute value of type GeoPoint - latitude
Definition at line 143 of file BaseAttribute.java.
|
protected |
Attribute value of type GeoPoint - longitude
Definition at line 146 of file BaseAttribute.java.
|
protected |
Id of attribute of annotation
Definition at line 67 of file BaseAttribute.java.
|
protected |
Attribute value of type integer
Definition at line 122 of file BaseAttribute.java.
|
protected |
Id of linked annotation (can be null in case of foreign annotation)
Definition at line 103 of file BaseAttribute.java.
|
protected |
Linked annotation (can be null in case of foreign annotation)
Definition at line 184 of file BaseAttribute.java.
|
protected |
Name of attribute
Definition at line 78 of file BaseAttribute.java.
|
protected |
Id of nested annotation (structured value)
Definition at line 99 of file BaseAttribute.java.
|
protected |
Nested annotation (structured value)
Definition at line 179 of file BaseAttribute.java.
|
protected |
Attribute priority (for order)
Definition at line 164 of file BaseAttribute.java.
|
protected |
Annotation to which this attribute belongs
Definition at line 169 of file BaseAttribute.java.
|
staticprotected |
Definition at line 59 of file BaseAttribute.java.
|
protected |
Name of simple type of attribute (set in structured attributes too)
Definition at line 82 of file BaseAttribute.java.
|
protected |
Attribute value of type String
Definition at line 108 of file BaseAttribute.java.
|
protected |
Attribute value of type Text
Definition at line 113 of file BaseAttribute.java.
|
protected |
Id of structured type of attribute (type of annotation)
Definition at line 86 of file BaseAttribute.java.
|
protected |
Value of attribute type URI or URI of linked annotation or Image
Definition at line 90 of file BaseAttribute.java.
|
private |
URI in ontology
Definition at line 95 of file BaseAttribute.java.
|
protected |
Attribute value of type Person (user)
Definition at line 189 of file BaseAttribute.java.
|
protected |
Attribute value of type Person (id of user)
Definition at line 139 of file BaseAttribute.java.