|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.dico.islab.idbs2.kc.Predicate
public class Predicate
This class represents a property value (or an inferred property value) attached to a KnowledgeChunk
.
More in detail, this is a representation of a path of properties in a knowledge graph where belongKc
is the starting node, p1
is the first edge (property) in the path, pn
is the last property and valueKc
is the last object
in the path (if the last object is a literal then valueKc
will be empty and the value will be in the
value
field).
The following image shows the relations between the fields of this object and the fields of the wrapped database
table (fields with the same color represents a mapping between relational schema and the corresponding object).
KnowledgeChunk
Constructor Summary | |
---|---|
protected |
Predicate()
Only Hibernate and KnowledgeChunk are able to instantiate this object. |
protected |
Predicate(KnowledgeChunk belongKc,
KnowledgeChunk p1,
KnowledgeChunk pn,
KnowledgeChunk valueKc,
String value,
int pathLength,
String valueType,
int valueLength)
Direct use of this constructor is discouraged. |
Method Summary | |
---|---|
KnowledgeChunk |
getBelongKc()
Getter for the kc which is the starting point of this properties path. |
Integer |
getId()
Getter for the identifier of this object (database purpose). |
KnowledgeChunk |
getP1()
Getter for the first property of this path. |
Integer |
getPathLength()
Getter for the pathLength field. |
KnowledgeChunk |
getPn()
Getter for the last property of this path. |
String |
getValue()
Getter for the literal representation of the object of this predicate. |
KnowledgeChunk |
getValueKc()
Getter for the kc which is the ending point of this properties path. |
Integer |
getValueLength()
Getter for the valueLength field. |
String |
getValueType()
Getter for the valueType field. |
void |
setPathLength(Integer pathLength)
Setter for the pathLength field. |
void |
setValue(String value)
Setter for the literal representation of the object of this predicate. |
void |
setValueLength(Integer valueLength)
Setter for the valueLength field. |
void |
setValueType(String valueType)
Setter for the valueType field. |
String |
toString()
Get a string representation of the current Predicate . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Predicate()
protected Predicate(KnowledgeChunk belongKc, KnowledgeChunk p1, KnowledgeChunk pn, KnowledgeChunk valueKc, String value, int pathLength, String valueType, int valueLength)
Direct use of this constructor is discouraged. Use the KnowledgeChunk.addLink
method instead.
belongKc
- the knowledge chunk that is the starting point of this properties path.p1
- the knowledge chunk (of type P) which is the first property in the properties path.pn
- the knowledge chunk (of type P) which is the last property in the properties path.valueKc
- the knowledge chunk which is the final object of the properties path.value
- the value of the last object of the properties path. Could be the name of valueKc
or a literal
(depending on the nature of the last object).pathLength
- the number of properties encountered in the path.valueType
- a string representation of the domain of the value
.valueLength
- the number of characters of the value
, materialized for performance purposes.KnowledgeChunk.addLink(KnowledgeChunk, KnowledgeChunk, KnowledgeChunk, String, int, String, int)
Method Detail |
---|
public String toString()
Get a string representation of the current Predicate
.
toString
in class Object
public Integer getId()
Getter for the identifier of this object (database purpose).
public KnowledgeChunk getBelongKc()
Getter for the kc which is the starting point of this properties path.
KnowledgeChunk
public KnowledgeChunk getP1()
Getter for the first property of this path.
KnowledgeChunk
that represents the first property of this path.public KnowledgeChunk getPn()
Getter for the last property of this path.
KnowledgeChunk
that represents the last property of this path.public KnowledgeChunk getValueKc()
Getter for the kc which is the ending point of this properties path.
KnowledgeChunk
of this predicate.public String getValue()
Getter for the literal representation of the object of this predicate.
public void setValue(String value)
Setter for the literal representation of the object of this predicate.
value
- literal representation of the object of this predicate.public Integer getPathLength()
Getter for the pathLength
field.
public void setPathLength(Integer pathLength)
Setter for the pathLength
field.
pathLength
- the length of the path of this predicate (expressed as the number of encountered properties).public Integer getValueLength()
Getter for the valueLength
field.
value
field (expressed as the number of its characters).public void setValueLength(Integer valueLength)
Setter for the valueLength
field.
valueLength
- the length of the value
field (expressed as the number of its characters).public String getValueType()
Getter for the valueType
field.
value
public void setValueType(String valueType)
Setter for the valueType
field.
valueType
- a string representation of the type of the literal property value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |