public class RdfTriple extends java.lang.Object implements java.lang.Comparable<RdfTriple>
Modifier and Type | Class and Description |
---|---|
static class |
RdfTriple.TripleType
This enumeration specifies the type of a relationship, as defined by the
source of the relationship definition.
|
Constructor and Description |
---|
RdfTriple(RdfThing thing,
Property relationProperty,
RdfThing relatedThing,
RdfTriple.TripleType relationType)
Create an RDF triple that relates the specified thing to the related
thing with the specified property.
|
RdfTriple(RdfThing thing,
java.lang.String relationName,
RdfThing relatedThing,
RdfTriple.TripleType relationType)
Create an RDF triple that relates the specified thing to the related
thing with the specified property.
|
RdfTriple(java.lang.String subj,
java.lang.String pred,
java.lang.String obj)
Create a simple RdfThing from three string arguments.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RdfTriple triple)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object obj)
Returns whether another object is the same as this one.
|
RdfThing |
getObject()
Get the object for this triple
|
Property |
getProperty()
Get the property, or predicate, of this triple
|
RdfThing |
getSubject()
Get the subject for this triple.
|
RdfTriple.TripleType |
getType()
Get the relationship type
|
int |
hashCode()
Get the hash code for this object.
|
boolean |
matches(RdfTriple other)
Return if this triple matches another triple.
|
java.lang.String |
toString()
Return a string representation of this OwlRelation
|
public RdfTriple(RdfThing thing, Property relationProperty, RdfThing relatedThing, RdfTriple.TripleType relationType)
thing
- corresponds to the subject of the RDF triplerelationProperty
- property of the RDF triplerelatedThing
- the Object of the RDF triplerelationType
- the relation type.public RdfTriple(RdfThing thing, java.lang.String relationName, RdfThing relatedThing, RdfTriple.TripleType relationType)
thing
- corresponds to the subject of the RDF triplerelationName
- the name of the property in the RDF triplerelatedThing
- the Object of the RDF triplerelationType
- the relation type.public RdfTriple(java.lang.String subj, java.lang.String pred, java.lang.String obj)
subj
- the subject of the RDF triplepred
- the predicate of the RDF tripleobj
- the object of the RDF triplepublic int compareTo(RdfTriple triple)
compareTo
in interface java.lang.Comparable<RdfTriple>
triple
- the other triple to compare tojava.lang.ClassCastException
- if an object other than an RdfTriple is being
compared to this object.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to compare tojava.lang.ClassCastException
- if an object other than an OwlRelation is
being compared to this object.public RdfThing getObject()
public Property getProperty()
public RdfThing getSubject()
public RdfTriple.TripleType getType()
public int hashCode()
hashCode
in class java.lang.Object
public boolean matches(RdfTriple other)
other
- the other RdfTriple to match this triple to.public java.lang.String toString()
toString
in class java.lang.Object