4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
P2BaseTrix.java
Go to the documentation of this file.
1 /*
2  * Project: Server for annotations sharing
3  * Author: Ing. Jaroslav Dytrych idytrych@fit.vutbr.cz
4  * File: P2BaseTrix.java
5  * Description: Class that represents base trix triple.
6  */
7 
8 /**
9  * @file P2BaseTrix.java
10  *
11  * @brief Class that represents base trix triple.
12  */
13 
14 /**
15  * @package cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2Trix
16  *
17  * @brief Classes which represents trix triples.
18  */
19 package cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2Trix;
20 
24 import java.util.ArrayList;
25 
26 /**
27  * Class that represents base trix triple.
28  *
29  * @brief Class that represents base trix triple.
30  */
31 public class P2BaseTrix {
32 
33  public P2BaseTrix(String destinationUri){
34  this.destinationUri = destinationUri;
35  }
36 
37  /** Destination of trix triple */
38  protected String destinationUri;
39 
40  /** Attributes name */
41  protected String name;
42 
43  /** URI in ontology */
44  protected String uriInOntology;
45 
46  /** Type of annotation that is linked/nested */
47  protected String annotType;
48 
49  /** Attribute name is from ontology | default value: false */
50  protected boolean fromOntology = false;
51 
52  /** Priority of attribute within annotation */
53  protected String priority;
54 
55  /** Method that creates Annotation Attribute from trix */
56  public ArrayList<BaseAttribute> trixToAnnotAtt(Annotation annot, RequestInfo requestInfo, Integer sparePriority){return null;}
57 
58  /**
59  * Gets destination of trix triple
60  * @return The destination Uri of trix triple
61  */
62  public String getDestinationUri() {
63  return destinationUri;
64  }
65 
66  /**
67  * Sets destination of trix triple
68  * @param destinationUri The destination Uri of trix triple
69  */
70  public void setDestinationUri(String destinationUri) {
71  this.destinationUri = destinationUri;
72  }
73 
74  /**
75  * Gets attributes name
76  * @return The name of attribute
77  */
78  public String getName() {
79  return name;
80  }
81 
82  /**
83  * Sets attributes name
84  * @param name The name of attribute to set
85  */
86  public void setName(String name) {
87  this.name = name;
88  }
89 
90  /**
91  * Gets attributes URI in ontology
92  *
93  * @return URI in ontology
94  */
95  public String getUriInOntology(){
96  return uriInOntology;
97  }
98 
99  /**
100  * Sets attributes URI in ontology
101  *
102  * @param uriInOntology Uri in ontology
103  */
104  public void setUriInOntology(String uriInOntology){
105  this.uriInOntology = uriInOntology;
106  }
107 
108  /**
109  * Gets type of annotation that is nested
110  * @return The type of annotation that is nested
111  */
112  public String getAnnotType() {
113  return annotType;
114  }
115 
116  /**
117  * Sets type of annotation that is nested
118  * @param annotType The type of annotation to set
119  */
120  public void setAnnotType(String annotType) {
121  this.annotType = annotType;
122  }
123 
124  /**
125  * Gets boolean value that indicates if name of attribute is from ontology
126  * @return true if name is from ontology, false otherwise
127  */
128  public boolean isFromOntology() {
129  return fromOntology;
130  }
131 
132  /**
133  * Sets boolean value that indicates that name of attribute is from ontology
134  * @param fromOntology Boolean value that indicates that name of attribute is from ontology
135  */
136  public void setFromOntology(boolean fromOntology) {
137  this.fromOntology = fromOntology;
138  }
139 
140  /**
141  * Gets attributes priority
142  * @return The priority of attribute within annotation
143  */
144  public String getPriority(){
145  return priority;
146  }
147 
148  /**
149  * Sets attributes priority
150  * @param priority The priority of attribute within annotation
151  */
152  public void setPriority(String priority){
153  this.priority = priority;
154  }
155 
156 }
ArrayList< BaseAttribute > trixToAnnotAtt(Annotation annot, RequestInfo requestInfo, Integer sparePriority)
Definition: P2BaseTrix.java:56
Base class representing attribute of annotation.
Processed informations about client request.