public class Predicate extends Object
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| Modifier | Constructor and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
KnowledgeChunk |
getBelongKc()
Getter for the kc which is the starting point of this properties path.
|
Double |
getConfidence()
Getter for the
confidence field. |
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 |
getValueText()
Getter for the full-text value of this predicate.
|
String |
getValueType()
Getter for the
valueType field. |
void |
setConfidence(Double conf)
Setter for the
confidence 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 |
setValueText(String valueText)
Setter for the full-text value of this predicate.
|
void |
setValueType(String valueType)
Setter for the
valueType field. |
String |
toString()
Get a string representation of the current
Predicate. |
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)public String toString()
Get a string representation of the current Predicate.
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.
KnowledgeChunkpublic 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.
valuepublic void setValueType(String valueType)
Setter for the valueType field.
valueType - a string representation of the type of the literal property valuepublic Double getConfidence()
Getter for the confidence field.
confidence of this property (usually computed as the frequency
of the current value associated with the current property p1).public void setConfidence(Double conf)
Setter for the confidence field.
conf - the value of confidence of this property (usually computed as the frequency
of the current value associated with the current property p1).public String getValueText()
Predicate points to another
KnowledgeChunk or to a simple (short) value then this filed will be null and the pointed value
will be in the value or value_kc fields.Predicate points to a full text value,
null otherwise.public void setValueText(String valueText)
Predicate points to another
KnowledgeChunk or to a simple (short) value then this filed will be null and the pointed value
will be in the value or value_kc fields.
value_text the full text pointed by this predicate