14 package cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2Trix;
 
   25 import java.util.ArrayList;
 
   26 import java.util.Iterator;
 
   27 import java.util.logging.Level;
 
   28 import java.util.logging.Logger;
 
   42     super(destinationUri);
 
   47     this.name = trix.name;
 
   48     this.annotType = trix.annotType;
 
   49     this.priority = trix.priority;
 
   50     this.fromOntology = trix.fromOntology;
 
   51     this.uriInOntology = trix.uriInOntology;
 
   85     nestedAnnotUris.add(nestedAnnotUri);
 
   94       this.nestedAnnotUris = 
new ArrayList<String>();
 
   96     nestedAnnotUris.addAll(allNestedAnnotUris);
 
  117     ArrayList<BaseAttribute> atList = 
new ArrayList<BaseAttribute>();
 
  122       int langNum = requestInfo.getSession().getLanguageNum();
 
  123       int lod = requestInfo.getSession().getProtocolLOD();
 
  125       String info = 
"<attribute annotationUri=\"" + annot.getURIV2();
 
  130         info += 
"\" name=\"" + 
name;
 
  132       info += 
"\" invalidProperty=\"name\"/>";
 
  136           Logger.getLogger(P2NestedTrix.class.getName()).log(Level.SEVERE, null);
 
  145     Iterator<String> nestedAnnUrisIt = nestedAnnotUris.iterator();
 
  151       } 
catch (ClassNotFoundException ex) {
 
  152         int langNum = requestInfo.getSession().getLanguageNum();
 
  153         int lod = requestInfo.getSession().getProtocolLOD();
 
  155         String info = 
"<attribute annotationUri=\"" + annot.getURIV2();
 
  160           info += 
"\" name=\"" + 
name;
 
  162         info += 
"\" invalidProperty=\"type\"/>";
 
  166             Logger.getLogger(P2NestedTrix.class.getName()).log(Level.SEVERE, 
"Unable to create nested attribute", ex);
 
  176       AnnotType type = P2AnnotTypeProcessor.searchAnnotType(
annotType, requestInfo.getFlier().getAddedTypes());
 
  178         int langNum = requestInfo.getSession().getLanguageNum();
 
  179         int lod = requestInfo.getSession().getProtocolLOD();
 
  181         String info = 
"<attribute annotationUri=\"" + annot.getURIV2() 
 
  183                       + 
"\" name=\"" + newAtt.getName() 
 
  185                       + 
"\" type=\"" + annotType + 
"\"/>";
 
  188             Logger.getLogger(P2NestedTrix.class.getName()).log(Level.SEVERE, 
"Unable to search for attribute type");
 
  197       if (nestedAnnUrisIt.hasNext()) {
 
  198         newAtt.setUri(nestedAnnUrisIt.next());
 
  200       newAtt.setAttributeType(type);
 
  203       Integer newPriority = null;
 
  206           newPriority = Integer.parseInt(
priority);
 
  207         }
catch(NumberFormatException ex){
 
  208           int langNum = requestInfo.getSession().getLanguageNum();
 
  209           int lod = requestInfo.getSession().getProtocolLOD();
 
  211           String info = 
"<attribute annotationUri=\"" + annot.getURIV2();
 
  216             info += 
"\" name=\"" + 
name;
 
  218           info += 
"\" invalidProperty=\"priority\"/>";
 
  222               Logger.getLogger(P2NestedTrix.class.getName()).log(Level.SEVERE, null, ex);
 
  229         newAtt.setPriority(newPriority);
 
  231         newAtt.setPriority(sparePriority);
 
  236     } 
while (nestedAnnUrisIt.hasNext());
 
ArrayList< BaseAttribute > trixToAnnotAtt(Annotation annot, RequestInfo requestInfo, Integer sparePriority)
static final int ERROR_15_ATTRIBUTE_TYPE_UNAVAILABLE
String getDestinationUri()
static final int LOG_LEVEL_ALL_ERRORS
ArrayList< String > getNestedAnnotUris()
Class representing attribute of type NestedAnnotation. 
void addNestedAnnotUri(String nestedAnnotUri)
static final int ERROR_26_ATTRIBUTE_MALFORMED
String getUriInOntology()
P2NestedTrix(String destinationUri)
void setRefAnnotUri(String refAnnotUri)
Class which parses and process XML with messages with types for protocol version 2. 
void addAllNestedAnnotUris(ArrayList< String > allNestedAnnotUris)
Base class representing attribute of annotation. 
static final int LOG_LEVEL
Class representing type of annotation. 
P2NestedTrix(P2BaseTrix trix)
void setNestedAnnotUri(ArrayList< String > nestedAnnotUris)
static BaseAttribute createAttribute()
Class that represents nested trix triple. 
Class attribute manager provides a way how to create new attributes. 
Processed informations about client request. 
Class that represents base trix triple. 
ArrayList< String > nestedAnnotUris
Class responsible for localised strings. 
Class representing annotation.