public class TripleString extends Object
Constructor and Description |
---|
TripleString() |
TripleString(CharSequence subject,
CharSequence predicate,
CharSequence object)
Basic constructor
|
TripleString(TripleString other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
CharSequence |
asNtriple()
Convert TripleString to NTriple
|
void |
clear()
Set all components to ""
|
void |
dumpNtriple(Appendable out) |
boolean |
equals(TripleString other) |
CharSequence |
getObject() |
CharSequence |
getPredicate() |
CharSequence |
getSubject() |
boolean |
hasEmpty()
Checks whether any component is empty.
|
boolean |
isEmpty()
Checks whether all components are empty.
|
boolean |
match(TripleString pattern)
Check whether this triple matches a pattern.
|
void |
read(String line)
Read from a line, where each component is separated by space.
|
void |
setAll(CharSequence subject,
CharSequence predicate,
CharSequence object)
Sets all components at once.
|
void |
setObject(CharSequence object) |
void |
setPredicate(CharSequence predicate) |
void |
setSubject(CharSequence subject) |
String |
toString() |
public TripleString()
public TripleString(CharSequence subject, CharSequence predicate, CharSequence object)
subject
- The subjectpredicate
- The predicateobject
- The objectpublic TripleString(TripleString other)
public CharSequence getSubject()
public void setSubject(CharSequence subject)
subject
- the subject to setpublic CharSequence getPredicate()
public void setPredicate(CharSequence predicate)
predicate
- the predicate to setpublic CharSequence getObject()
public void setObject(CharSequence object)
object
- the object to setpublic void setAll(CharSequence subject, CharSequence predicate, CharSequence object)
subject
- predicate
- object
- public boolean equals(TripleString other)
public boolean match(TripleString pattern)
pattern
- public void clear()
public boolean isEmpty()
public boolean hasEmpty()
public void read(String line) throws ParserException
line
- ParserException
public CharSequence asNtriple() throws IOException
IOException
public final void dumpNtriple(Appendable out) throws IOException
IOException
Copyright © 2020 DataWeb Research. All rights reserved.