19 package cz.vutbr.fit.knot.annotations.entity.attribute;
 
   29 import java.io.Serializable;
 
   30 import java.math.BigDecimal;
 
   31 import java.util.ArrayList;
 
   32 import java.util.Arrays;
 
   33 import java.util.Date;
 
   34 import java.util.Iterator;
 
   35 import java.util.List;
 
   36 import java.util.logging.Level;
 
   37 import java.util.logging.Logger;
 
   38 import javax.persistence.*;
 
   45 @Entity(name=
"Attribute")
 
   46 @Inheritance(strategy= InheritanceType.SINGLE_TABLE)
 
   47 @Table(name = 
"attribute")
 
   48 @DiscriminatorColumn(name=
"simpleType",discriminatorType=DiscriminatorType.STRING)
 
   50   @NamedQuery(name = 
"Attribute.findAll", query = 
"SELECT a FROM Attribute a"),
 
   51   @NamedQuery(name = 
"Attribute.findById", query = 
"SELECT a FROM Attribute a WHERE a.id = :id"),
 
   52   @NamedQuery(name = 
"Attribute.findByName", query = 
"SELECT a FROM Attribute a WHERE a.name = :name"),
 
   53   @NamedQuery(name = 
"Attribute.findBySimpleType", query = 
"SELECT a FROM Attribute a WHERE a.simpleType = :simpleType"),
 
   54   @NamedQuery(name = 
"Attribute.findByType", query = 
"SELECT a FROM Attribute a WHERE a.type = :type"),
 
   55   @NamedQuery(name = 
"Attribute.findByAnnotation", query = 
"SELECT a FROM Attribute a WHERE a.annotation = :annotation"),
 
   57 public abstract class BaseAttribute implements Serializable, Comparable<Object> {
 
   59   protected static final long serialVersionUID = 1L;
 
   64   @GeneratedValue(strategy = GenerationType.IDENTITY)
 
   65   @Basic(optional = 
false)
 
   71   @Basic(optional = false)
 
   72   @Column(name = "annotation", nullable = false, insertable = false, updatable = false)
 
   73   protected 
int annotation;
 
   76   @Basic(optional = false)
 
   77   @Column(name = "name")
 
   78   protected String name;
 
   81   @Column(name = "simpleType")
 
   82   protected String simpleType;
 
   85   @Column(name = "type", insertable = false, updatable = false)
 
   86   protected Integer type;
 
   93   @Basic(optional = true)
 
   94   @Column(name = "uriInOntology")
 
   95   private String uriInOntology;
 
   98   @Column(name = "nested", insertable = false, updatable = false)
 
   99   protected String nested;
 
  102   @Column(name = "linked", insertable = false, updatable = false)
 
  103   protected Integer linked;
 
  107   @Column(name = "stringValue")
 
  108   protected String stringValue;
 
  112   @Column(name = "textValue")
 
  113   protected String textValue;
 
  116   @Column(name = "dateValue")
 
  117   @Temporal(TemporalType.TIMESTAMP)
 
  118   protected Date dateValue;
 
  121   @Column(name = "intValue")
 
  122   protected Integer intValue;
 
  125   @Column(name = "decValue")
 
  126   protected BigDecimal decValue;
 
  129   @Column(name = "boolVAlue")
 
  130   protected Boolean boolVAlue;
 
  134   @Column(name = "binValue")
 
  135   protected byte[] binValue;
 
  138   @Column(name = "userValue", insertable = false, updatable = false)
 
  139   protected Integer userValue;
 
  142   @Column(name = "geoLat")
 
  143   protected BigDecimal geoLat;
 
  145   @Column(name = "geoLong")
 
  146   protected BigDecimal geoLong;
 
  149   @Column(name = "entityType")
 
  150   protected String entityType;
 
  153   @Column(name = "entityVisualURI")
 
  154   protected String entityVisualURI;
 
  157   @Basic(optional = true)
 
  159   @Column(name = "commentary")
 
  160   protected String comment;
 
  163   @Column(name = "priority")
 
  164   protected Integer priority;
 
  167   @ManyToOne(optional = false)
 
  168   @JoinColumn(name = "annotation", referencedColumnName = "
id")
 
  172   @OneToOne(optional = true)
 
  173   @JoinColumn(name = "type", referencedColumnName = "
id")
 
  177   @OneToOne(optional = true, cascade = CascadeType.ALL)
 
  178   @JoinColumn(name = "nested", referencedColumnName = "
id")
 
  182   @OneToOne(optional = true)
 
  183   @JoinColumn(name = "linked", referencedColumnName = "
id")
 
  187   @OneToOne(optional = true)
 
  188   @JoinColumn(name = "userValue", referencedColumnName = "
id")
 
  192   @OneToMany(mappedBy = "refEntityAttribute", cascade = CascadeType.ALL,
 
  220     if (proto11 && comment != null && !comment.isEmpty()) {
 
  221       sCom = 
"><a:comment>" 
  225               + 
"</a:comment></a:attribute";
 
  238     if (this.getValue() == null) {
 
  241     return Util.escapeForXml(this.getValue().toString());
 
  250     if (this.attributeType != null) {
 
  251       if (this.attributeType.getUriInOntology() != null) {
 
  252         return this.attributeType.getUriInOntology();
 
  266   public String 
toXMLString(
boolean proto11, 
boolean tmpIdForNested, 
boolean withOntology) {
 
  267     String sCom = this.getCommentXmlPart(proto11);
 
  268     String escapedVal = xmlFormatValue();
 
  269     String ontoString = 
"";
 
  271     if (escapedVal == null) {
 
  276       ontoString += 
" typeOntologyUri=\"" + getTypeOntologyUri() + 
"\"";
 
  277       ontoString += 
" ontologyUri=\"" + getUriInOntology() + 
"\"";
 
  279     return "<a:attribute name=\"" + name + 
"\"" + ontoString + 
" type=\"" + simpleType + 
"\" rdf:value=\"" + escapedVal + 
"\"" + sCom + 
">";
 
  289     if (this.simpleType != null && !this.simpleType.isEmpty()) {
 
  290       if (this.simpleType.equals(
"annotationLink")) {
 
  292       } 
else if (this.simpleType.equals(
"nestedAnnotation")) {
 
  298     if (this.nestedAnnotation != null) {
 
  310     int typeIndex = Constants.SIMPLE_TYPES_NAMES_V2.indexOf(simpleType);
 
  311     if (typeIndex != -1) {
 
  312       return Constants.SIMPLE_TYPES_URI_V2.get(typeIndex);
 
  314       if (this.attributeType != null) {
 
  315         return this.attributeType.getUri();
 
  317       typeIndex = Constants.SIMPLE_TYPES_NAMES_V2.indexOf(
"AnyAnnotation");
 
  318       if (typeIndex == -1) {
 
  321       return Constants.SIMPLE_TYPES_URI_V2.get(typeIndex);
 
  332     StringBuilder result = 
new StringBuilder();
 
  333     String escapedVal = xmlFormatValue();
 
  334     String ontoString = getUriInOntology();
 
  335     String docUri = refAnnotation.getSource() + refAnnotation.getFragmentXpointersV2();
 
  338     result.append(
"<trix:triple>");
 
  341     result.append(
"<trix:uri>");
 
  342     result.append(docUri);
 
  343     result.append(
"</trix:uri>");
 
  346     if (ontoString == null || ontoString.isEmpty()) {
 
  348       result.append(
"<trix:name>");
 
  349       result.append(Util.toHTMLString(name));
 
  350       result.append(
"</trix:name>");
 
  353       result.append(
"<trix:uri>");
 
  354       result.append(Util.toHTMLString(ontoString));
 
  355       result.append(
"</trix:uri>");
 
  359     if (simpleType.equals(
"NestedAnnotation")) {
 
  361     } 
else if (simpleType.equals(
"AnnotationLink")) {
 
  364     } 
else if (simpleType.equalsIgnoreCase(
"Entity")) {
 
  367       result.append(entity.toXMLStringWHV2());
 
  368     } 
else if (simpleType.equalsIgnoreCase(
"GeoPoint")) {
 
  370       result.append(
"<trix:typedLiteral datatype=\"http://www.w3.org/2003/01/geo/wgs84_pos#Point\">");
 
  372       result.append(
"</trix:typedLiteral>");
 
  375       result.append(
"</trix:triple>");
 
  376     } 
else if (simpleType.equals(
"AnyAnnotation")) {
 
  378       result.append(anyAnnot.toXMLStringWHV2(ontoString));
 
  381       int index = Constants.SIMPLE_TYPES_NAMES_V2.indexOf(simpleType);
 
  383       result.append(
"<trix:typedLiteral datatype=\"");
 
  384       result.append(Constants.SIMPLE_TYPES_URI_V2.get(index));
 
  386       if (escapedVal == null) {
 
  388         result.append(
"\"/>");
 
  390         result.append(
"\">");
 
  392         result.append(escapedVal);
 
  393         result.append(
"</trix:typedLiteral>");
 
  397       result.append(
"</trix:triple>");
 
  400     if (priority != null) {
 
  401       result.append(
"<trix:triple>");
 
  402         result.append(
"<trix:uri>");
 
  403         result.append(docUri);
 
  404         result.append(
"</trix:uri>");
 
  405         if (ontoString == null || ontoString.isEmpty()) {
 
  407           result.append(
"<trix:name>");
 
  408           result.append(Util.toHTMLString(name));
 
  409           result.append(
"</trix:name>");
 
  412           result.append(
"<trix:uri>");
 
  413           result.append(Util.toHTMLString(ontoString));
 
  414           result.append(
"</trix:uri>");
 
  416         result.append(
"<trix:typedLiteral datatype=\"http://knot.fit.vutbr.cz/annotations/knotOAExtension#attributePriority\">");
 
  417         result.append(priority);
 
  418         result.append(
"</trix:typedLiteral>");
 
  419       result.append(
"</trix:triple>");
 
  422     return result.toString();
 
  431     StringBuilder sb = 
new StringBuilder();
 
  432     String escapedVal = xmlFormatValue();
 
  434     sb.append(
"<attribute name=\"").append(name);
 
  435     sb.append(
"\" type=\"").append(simpleType).append(
"\">");
 
  437     if (simpleType.equalsIgnoreCase(
"GeoPoint")) {
 
  439     } 
else if (simpleType.equalsIgnoreCase(
"NestedAnnotation")) {
 
  441       sb.deleteCharAt(sb.length() - 1);
 
  442       sb.append(
" annotType=\"").append(attributeType.getLinearizedName()).append(
"\">");
 
  443       if (nestedAnnotation != null) {
 
  444         sb.append(nestedAnnotation.getURI());
 
  446     } 
else if (simpleType.equalsIgnoreCase(
"LinkedAnnotation") || simpleType.equalsIgnoreCase(
"AnnotationLink")) {
 
  448       sb.deleteCharAt(sb.length() - 1);
 
  449       sb.append(
" annotType=\"").append(attributeType.getLinearizedName()).append(
"\">");
 
  450       if (linkedAnnotation != null) {
 
  451         sb.append(linkedAnnotation.getURI());
 
  453     } 
else if (simpleType.equalsIgnoreCase(
"Entity")) {
 
  454       if (entityAdditionalAttributes != null) {
 
  455         Iterator<EntityAdditionalAttribute> enIt = entityAdditionalAttributes.iterator();
 
  456         while (enIt.hasNext()) {
 
  458           sb.append(
"<entityAttribute name=\"").append(tmpAtt.
getName()).append(
"\">");
 
  460             sb.append(tmpAtt.getStringValue());
 
  462           sb.append(
"</entityAttribute>");
 
  465     } 
else if (simpleType.equalsIgnoreCase(
"Text")) {
 
  466       if (this.textValue != null) {
 
  467         sb.append(
"<![CDATA[").append(this.textValue).append(
"]]>");
 
  470       if (escapedVal != null) {
 
  471         sb.append(escapedVal);
 
  475     sb.append(
"</attribute>");
 
  477     return sb.toString();
 
  489     result.setName(name);
 
  491     result.setStringValue(
"");
 
  493     if (simpleType.equals(
"NestedAnnotation")) {
 
  495     } 
else if (simpleType.equals(
"AnnotationLink") || simpleType.equals(
"LinkedAnnotation")) {
 
  497     } 
else if (simpleType.equalsIgnoreCase(
"Entity")) {
 
  499     } 
else if (simpleType.equalsIgnoreCase(
"GeoPoint")) {
 
  500       if (this.getGeoLat() != null && this.getGeoLong() != null) {
 
  501         result.setStringValue(this.getGeoLat().toString() + 
", " + this.getGeoLong().toString());
 
  503     } 
else if (simpleType.equals(
"AnyAnnotation")) {
 
  505     } 
else if (simpleType.equals(
"Date")) {
 
  506       if (this.getDateValue() != null) {
 
  507         result.setStringValue(Util.toRFC3339DateOnlyWTZ(this.getDateValue()));
 
  509     } 
else if (simpleType.equals(
"DateTime")) {
 
  510       if (this.getDateValue() != null) {
 
  511         result.setStringValue(Util.toRFC3339Date(this.getDateValue()));
 
  513     } 
else if (simpleType.equals(
"Time")) {
 
  514       if (this.getDateValue() != null) {
 
  515         result.setStringValue(Util.toRFC3339Time(this.getDateValue()));
 
  517     } 
else if (simpleType.equals(
"URI")) {
 
  518       if (this.getValue() != null) {
 
  519         result.setStringValue(this.getValue().toString());
 
  520         result.setType(
"URI");
 
  524       int index = Constants.SIMPLE_TYPES_NAMES_V2.indexOf(simpleType);
 
  527             String msg = 
"Unknown type of attribute of suggestion: " + simpleType;
 
  528             Logger.getLogger(BaseAttribute.class.getName()).log(Level.SEVERE, msg);
 
  533       Object val = this.getValue();
 
  535         result.setStringValue(val.toString());
 
  555       throw new UnsupportedOperationException(
"Not supported yet.");
 
  557     BaseAttribute other = (BaseAttribute) o;
 
  558     if (this.priority == null && other.
getPriority() == null) {
 
  561     if (this.priority == null && other.
getPriority() != null) {
 
  564     if (this.priority != null && other.
getPriority() == null) {
 
  567     return this.priority.compareTo(other.getPriority());
 
  579     return contentEquals(obj,
true);
 
  596       final BaseAttribute other = (BaseAttribute) obj;
 
  598       if ((this.name == null) ? (other.name != null) : !this.name.equals(other.
name)) {
 
  601       if (this.userValue != other.
userValue && (
this.userValue == null || !
this.userValue.equals(other.
userValue))) {
 
  604       if (this.geoLat != other.
geoLat && (
this.geoLat == null || !
this.geoLat.equals(other.
geoLat))) {
 
  607       if (this.geoLong != other.
geoLong && (
this.geoLong == null || !
this.geoLong.equals(other.
geoLong))) {
 
  610       if (this.attributeType != other.
attributeType && (
this.attributeType == null || !
this.attributeType.equals(other.
attributeType))) {
 
  613       if (this.comment == null ? other.
comment != null : !
this.comment.equals(other.
comment)) {
 
  616       if (this.priority == null ? other.
priority != null : !
this.priority.equals(other.
priority)) {
 
  621         if (this.refAnnotation != other.
refAnnotation && (
this.refAnnotation == null || !
this.refAnnotation.equals(other.
refAnnotation))) {
 
  626       if ((this.simpleType == null) ? (other.simpleType != null) : !this.simpleType.equalsIgnoreCase(other.
simpleType)) {
 
  629       if(this.simpleType != null){
 
  630         if(this.simpleType.equalsIgnoreCase(
"String") || this.simpleType.equalsIgnoreCase(
"Duration")){
 
  631           if ((this.stringValue == null) ? (other.stringValue != null) : !this.stringValue.equals(other.
stringValue)) {
 
  635         else if(this.simpleType.equalsIgnoreCase(
"Binary")){
 
  636            if (!Arrays.equals(
this.binValue, other.
binValue)) {
 
  640         else if(this.simpleType.equalsIgnoreCase(
"Date") ||
 
  641                 this.simpleType.equalsIgnoreCase(
"DateTime") ||
 
  642                 this.simpleType.equalsIgnoreCase(
"Time") ||
 
  643                 this.simpleType.equalsIgnoreCase(
"Integer") ||
 
  644                 this.simpleType.equalsIgnoreCase(
"Decimal") ||
 
  645                 this.simpleType.equalsIgnoreCase(
"Boolean")){
 
  646           if (this.getValue() != other.getValue() && (this.getValue() == null || !this.getValue().equals(other.
getValue()))) {
 
  650         else if(this.simpleType.equalsIgnoreCase(
"AnnotationLink")){
 
  652                   (
this.linkedAnnotation == null || !
this.linkedAnnotation.equals(other.
linkedAnnotation))) {
 
  656         else if(this.simpleType.equalsIgnoreCase(
"NestedAnnotation")){
 
  658                   (
this.nestedAnnotation == null || !
this.nestedAnnotation.equals(other.
nestedAnnotation))) {
 
  668         else if(this.simpleType.equalsIgnoreCase(
"Person")){
 
  669           if (this.user != other.
user && (
this.user == null || !
this.user.equals(other.
user))) {
 
  673         else if(this.simpleType.equalsIgnoreCase(
"GeoPoint")){
 
  674           if (this.geoLat != other.
geoLat && (
this.geoLat == null || !
this.geoLat.equals(other.
geoLat))) {
 
  677           if (this.geoLong != other.
geoLong && (
this.geoLong == null || !
this.geoLong.equals(other.
geoLong))) {
 
  681         else if (this.simpleType.equalsIgnoreCase(
"Entity")) {
 
  682           if (this.uri != other.
uri && (
this.uri == null || !
this.uri.equals(other.
uri))) {
 
  685           if (this.entityType != other.
entityType && (
this.entityType == null || !
this.entityType.equals(other.
entityType))) {
 
  688           if (this.stringValue != other.
stringValue && (
this.stringValue == null || !
this.stringValue.equals(other.
stringValue))) {
 
  691           if (this.entityType != other.
entityType && (
this.entityType == null || !
this.entityType.equals(other.
entityType))) {
 
  697           if (this.textValue != other.
textValue && (
this.textValue == null || !
this.textValue.equals(other.
textValue))) {
 
  703           if ((this.getValue() == null) ? (other.
getValue() != null) : (!this.getValue().equals(other.getValue()))) {
 
  709         if ((this.getValue() == null) ? (other.
getValue() != null) : (!this.getValue().equals(other.getValue()))) {
 
  723   public abstract Object getValue();
 
  735   public abstract void setValue(Object value);
 
  743   public abstract void setRawValue(String value) 
throws IllegalArgumentException;
 
  751     return this.getValue() == null;
 
  766     BaseAttribute other = (BaseAttribute) 
object;
 
  767     if ((this.
id == null && other.
id != null) || (this.id != null && !this.id.equals(other.id))) {
 
  788     this.comment = comment;
 
  793     return "cz.vutbr.fit.knot.annotations.entity.Attribute[id=" + 
id + 
"]";
 
  799     hash += (
id != null ? id.hashCode() : 0);
 
  836     this.simpleType = simpleType;
 
  854     this.annotation = annotation;
 
  863     return refAnnotation;
 
  872     this.refAnnotation = value;
 
  881     return attributeType;
 
  890     this.attributeType = attributeType;
 
  899     return nestedAnnotation;
 
  931     this.nestedAnnotation = nestedAnnotation;
 
  935     return linkedAnnotation;
 
  939     this.linkedAnnotation = linkedAnnotation;
 
 1021     this.uriInOntology = uriInOntology;
 
 1030     return uriInOntology;
 
 1039     return this.entityType;
 
 1048     this.entityType = entityType;
 
 1057     return this.entityVisualURI;
 
 1066     this.entityVisualURI = entityVisualURI;
 
 1075     return this.boolVAlue;
 
 1084     return this.binValue;
 
 1093     return this.dateValue;
 
 1102     return this.decValue;
 
 1120     return this.geoLong;
 
 1129     return this.intValue;
 
 1138     return this.stringValue;
 
 1147     return this.textValue;
 
 1151     this.textValue = textValue;
 
 1160     return this.userValue;
 
 1178     this.priority = priority;
 
 1182     return entityAdditionalAttributes;
 
 1193     StringBuilder sb = 
new StringBuilder(
"{\"attName\":\"");
 
 1194     sb.append(this.name);
 
 1195     sb.append(
"\",\"simpleType\":\"");
 
 1196     sb.append(this.simpleType);
 
 1198     sb.append(
"\",\"attValue\":\"");
 
 1199     if (this.simpleType.equals(
"String")) {
 
 1200       if (this.stringValue != null) {
 
 1201         sb.append(this.stringValue);        
 
 1203     } 
else if (this.simpleType.equals(
"Image") || this.simpleType.equals(
"URI")) {
 
 1204       if (this.uri != null) {
 
 1205         sb.append(this.uri);
 
 1207     } 
else if (this.simpleType.equals(
"Integer") && this.intValue != null) {
 
 1208       sb.append(this.intValue.toString());
 
 1209     } 
else if (this.simpleType.equals(
"Boolean") && this.boolVAlue != null) {
 
 1210       sb.append(this.boolVAlue.toString());
 
 1211     } 
else if (this.simpleType.equals(
"Text") && this.textValue != null) {
 
 1212       sb.append(this.textValue);
 
 1213     } 
else if (this.simpleType.equals(
"Decimal") && this.decValue != null) {
 
 1214       sb.append(this.decValue.toString());
 
 1215     } 
else if (this.dateValue != null) {
 
 1216       if (simpleType.equals(
"DateTime")) {
 
 1217         sb.append(Util.toRFC3339Date(dateValue));
 
 1218       } 
else if (simpleType.equals(
"Date")) {
 
 1219         sb.append(Util.toRFC3339DateOnly(dateValue));
 
 1220       } 
else if (simpleType.equals(
"Time")) {
 
 1221         sb.append(Util.toRFC3339Time(dateValue));
 
 1223     } 
else if (this.simpleType.equals(
"Binary") && this.binValue != null) {
 
 1224       sb.append(org.apache.commons.codec.binary.Base64.encodeBase64String(this.binValue));
 
 1225     } 
else if (this.simpleType.equals(
"AnyAnnotation")) {
 
 1227     } 
else if (this.simpleType.equals(
"GeoPoint") || this.simpleType.equals(
"geoPoint")) {
 
 1229       if (this.geoLat == null || this.geoLong == null) {
 
 1233         sb.append(this.geoLat.toString());
 
 1235         sb.append(this.geoLong.toString());
 
 1237     } 
else if(this.simpleType.equals(
"entity") || this.simpleType.equals(
"Entity")){
 
 1238       if(this.uri.isEmpty() || this.uri == null){
 
 1241         sb.append(((EntityAttribute.Entity)getValue()).toJSONString());
 
 1243     }
else if (this.simpleType.equals(
"Duration")) {
 
 1244       sb.append(this.stringValue);
 
 1246     sb.append(
"\",\"nestedURI\":\"");
 
 1247     if (this.nestedAnnotation != null) {
 
 1248       sb.append(this.nestedAnnotation.getURI());
 
 1249       this.nested = this.nestedAnnotation.getId().toString();
 
 1254     sb.append(
"\",\"nestedID\":\"null\",\"linkedURI\":\"");
 
 1255     if (this.linkedAnnotation != null) {
 
 1256       sb.append(this.linkedAnnotation.getURI());
 
 1257       this.linked = this.linkedAnnotation.getId();
 
 1262     sb.append(
"\",\"linkedID\":\"null\",\"structuredType\":");
 
 1263     if (this.linkedAnnotation != null && this.linkedAnnotation.getAnnotType() != null) {
 
 1264       sb.append(
"\"").append(this.linkedAnnotation.getAnnotType().getUri().split(
AppBean.
getBaseTypeUri())[1].split(
"g[0-9]*/", 2)[1]).append(
"\"");
 
 1266     else if (this.nestedAnnotation != null && this.nestedAnnotation.getAnnotType() != null) {
 
 1267       sb.append(
"\"").append(this.nestedAnnotation.getAnnotType().getUri().split(
AppBean.
getBaseTypeUri())[1].split(
"g[0-9]*/", 2)[1]).append(
"\"");
 
 1273     return sb.toString();
 
 1282     this.annotation = ba.annotation;
 
 1283     this.attributeType = ba.getAttributeType();
 
 1284     this.binValue = ba.getBinValue();
 
 1285     this.boolVAlue = ba.getBoolValue();
 
 1286     this.comment = ba.getComment();
 
 1287     this.dateValue = ba.getDateValue();
 
 1288     this.decValue = ba.getDecValue();
 
 1289     this.entityType = ba.getEntityType();
 
 1290     this.entityVisualURI = ba.getEntityVisualURI();
 
 1291     this.geoLat = ba.getGeoLat();
 
 1292     this.geoLong = ba.getGeoLong();
 
 1293     this.id = ba.getId();
 
 1294     this.intValue = ba.getIntValue();
 
 1295     this.linked= ba.linked;
 
 1296     this.linkedAnnotation = ba.linkedAnnotation;
 
 1297     this.name = ba.getName();
 
 1298     this.nested = ba.nested;
 
 1299     this.nestedAnnotation = ba.getNestedAnnotation();
 
 1300     this.priority = ba.priority;
 
 1301     this.refAnnotation = ba.refAnnotation;
 
 1302     this.stringValue = ba.getStringValue();
 
 1303     this.textValue = ba.getTextValue();
 
 1304     this.type = ba.getType();
 
 1305     this.uri = ba.getUri();
 
 1306     this.uriInOntology = ba.getUriInOntology();
 
 1307     this.user = ba.user;
 
 1308     this.userValue = ba.getUserValue();
 
 1309     this.entityAdditionalAttributes = ba.getEntityAdditionalAttributes();
 
 1318     this.attributeType = ba.getAttributeType();
 
 1319     this.binValue = ba.getBinValue();
 
 1320     this.boolVAlue = ba.getBoolValue();
 
 1321     this.comment = ba.getComment();
 
 1322     this.dateValue = ba.getDateValue();
 
 1323     this.decValue = ba.getDecValue();
 
 1324     this.entityType = ba.getEntityType();
 
 1325     this.entityVisualURI = ba.getEntityVisualURI();
 
 1326     this.geoLat = ba.getGeoLat();
 
 1327     this.geoLong = ba.getGeoLong();
 
 1328     this.id = ba.getId();
 
 1329     this.intValue = ba.getIntValue();
 
 1331       this.uri = ba.getLinkedSuggestion().getURIV2();
 
 1333     this.name = ba.getName();
 
 1335       this.uri = ba.getNestedSuggestion().getURIV2();
 
 1337     this.priority = ba.getPriority();
 
 1338     this.stringValue = ba.getStringValue();
 
 1339     this.textValue = ba.getTextValue();
 
 1340     this.type = ba.getType();
 
 1341     this.uri = ba.getUri();
 
 1342     this.uriInOntology = ba.getUriInOntology();
 
 1343     this.user = ba.getUser();
 
 1344     this.userValue = ba.getUserValue();
 
 1345     this.entityAdditionalAttributes = 
new ArrayList<EntityAdditionalAttribute>();
 
 1347       Iterator<SugEntityAdditionalAttribute> seatit = ba.getEntityAdditionalAttributes().iterator(); 
 
 1349         while (seatit.hasNext()) { 
 
 1352           nAt.setPriority(seat.getPriority()); 
 
 1353           this.entityAdditionalAttributes.add(nAt); 
 
 1357           Logger.getLogger(BaseAttribute.class.getName()).log(Level.SEVERE, 
"Trying to update attribute using attribute with different type."); 
 
boolean equals(Object object)
void setLinkedAnnotation(Annotation linkedAnnotation)
Annotation getRefAnnotation()
Annotation getNestedAnnotation()
Annotation getNestedAnnotation()
Additional attribute of entity in suggestion attribute. 
void updateFromBaseAttributeAll(BaseAttribute ba)
boolean contentEquals(Object obj)
Additional attribute of entity in annotation attribute. 
List< EntityAdditionalAttribute > getEntityAdditionalAttributes()
void setEntityType(String entityType)
void setPriority(Integer priority)
Class representing attribute of type NestedAnnotation. 
void setAttributeType(AnnotType attributeType)
Singleton for storing global variables. 
static String getBaseTypeUri()
void setNestedAnnotation(Annotation nestedAnnotation)
boolean contentEquals(Object obj, boolean refAnnot)
void setName(String name)
Class representing vocabulary entity attribute. 
Class representing attribute of type AnnotationLink. 
void setUriInOntology(String uriInOntology)
Class representing attribute of suggestion. 
void setLinkedID(int link)
String getEntityVisualURI()
Class representing attribute of type AnyAnnotation. 
String getUriInOntology()
Annotation nestedAnnotation
String getCommentXmlPart(boolean proto11)
void setType(Integer type)
void setAnnotation(int annotation)
AnnotType getAttributeType()
void setNestedID(String nest)
String toXMLString(boolean proto11, boolean tmpIdForNested, boolean withOntology)
Base class representing attribute of annotation. 
List< SugEntityAdditionalAttribute > getEntityAdditionalAttributes()
static final int LOG_LEVEL
EntityAdditionalAttribute toEntityAdditionalAttribute()
Class representing type of annotation. 
static final String DEFAULT_SIMPLE_TYPE_FOR_ENT_AD_AT
String getTypeOntologyUri()
Annotation getLinkedAnnotation()
static final int LOG_LEVEL_SERVER_ERRORS
void setEntityVisualURI(String entityVisualURI)
Annotation linkedAnnotation
void updateFromSugBaseAttributeAll(SugBaseAttribute ba)
void setComment(String comment)
Annotation getLinkedAnnotation()
Class representing attribute of type GeoPoint. 
Utility class (manipulates RFC 3339 dates) 
Class representing annotation. 
void setTextValue(String textValue)
void setSimpleType(String simpleType)
void setRefAnnotation(Annotation value)
BaseAttribute(Integer id)
abstract Object getValue()