8 package cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes;
13 import java.util.Iterator;
14 import javax.persistence.DiscriminatorValue;
15 import javax.persistence.Entity;
29 @DiscriminatorValue(value=
"Text")
44 this.simpleType =
"Text";
45 this.textValue = value;
46 this.refSuggestion = refSuggestion;
59 this.simpleType =
"Text";
60 this.textValue = value;
61 this.refSuggestion = refSuggestion;
62 this.priority = priority;
72 return this.textValue;
82 this.textValue = (String) value;
118 public String
toXMLString(
boolean proto11,
boolean withOntology) {
119 String ontoString =
"";
122 if(!getTypeOntologyUri().isEmpty()){
123 ontoString +=
" typeOntologyUri=\""+getTypeOntologyUri()+
"\"";
126 Iterator<AnnotTypeAttr> typeAttrIt = refSuggestion.getAnnotType().getAttributes().iterator();
127 while(typeAttrIt.hasNext()){
129 if(name.equals(actualAttr.
getName())){
131 ontoString +=
" ontologyUri=\"" + actualAttr.getUriInOntology() +
"\"";
137 if (this.textValue == null) {
138 return "<a:attribute name=\"" + name +
"\"" + ontoString +
" type=\"" + simpleType +
"\">"
142 + getCommentXmlPart(proto11)
145 return "<a:attribute name=\"" + name +
"\"" + ontoString +
" type=\"" + simpleType +
"\">"
151 + getCommentXmlPart(proto11)
String getCommentXmlPart(boolean proto11)
Class representing attribute of type Text for prupose of suggestion.
Class representing attribute of type of annotation.
String getTypeOntologyUri()
SugTextAttribute(String name, String value, Suggestion refSuggestion, Integer priority)
Class representing attribute of type String for prupose of suggestion.
static final String TEXT_URI
String getUriInOntology()
void setValue(Object value)
Class representing suggestion of annotation.
void setRawValue(String value)
String toXMLString(boolean proto11, boolean withOntology)
SugTextAttribute(String name, String value, Suggestion refSuggestion)