77 |
*/ |
*/ |
78 |
private RDFObject object; |
private RDFObject object; |
79 |
|
|
80 |
|
/** |
81 |
|
* Constructs a new <code>Triple</code> using the specified |
82 |
|
* subject, predicate and object. |
83 |
|
* |
84 |
|
* @param subject the new subject. |
85 |
|
* @param predicate the new predicate. |
86 |
|
* @param object the new object. |
87 |
|
*/ |
88 |
|
public Triple(Subject subject, Predicate predicate, RDFObject object) |
89 |
|
{ |
90 |
|
this.subject = subject; |
91 |
|
this.predicate = predicate; |
92 |
|
this.object = object; |
93 |
|
} |
94 |
|
|
95 |
|
/** |
96 |
|
* Returns a textual representation of the triple. |
97 |
|
* |
98 |
|
* @return a textual representation. |
99 |
|
*/ |
100 |
|
public String toString() |
101 |
|
{ |
102 |
|
return getClass().getName() + |
103 |
|
"[subject = " + |
104 |
|
subject + |
105 |
|
", predicate = " + |
106 |
|
predicate + |
107 |
|
", object = " + |
108 |
|
object + |
109 |
|
"]"; |
110 |
|
} |
111 |
|
|
112 |
} |
} |