com.upokecenter.util.RDFTerm
com.upokecenter.util.RDFTerm
public final class RDFTerm extends java.lang.Object
Fields
static RDFTerm A
Predicate for RDF types.static int BLANK
Type value for a blank node.static RDFTerm FALSE
object for false.static RDFTerm FIRST
Predicate for the first object in a list.static int IRI
Type value for an IRI (Internationalized Resource Identifier.).static int LANGSTRING
Type value for a string with a language tag.static RDFTerm NIL
object for nil, the end of a list, or an empty list.static RDFTerm REST
Predicate for the remaining objects in a list.static RDFTerm TRUE
object for true.static int TYPEDSTRING
Type value for a piece of data serialized to a string.
Methods
boolean equals(java.lang.Object obj)
Not documented yet.static RDFTerm fromBlankNode(java.lang.String name)
Not documented yet.static RDFTerm fromIRI(java.lang.String iri)
Not documented yet.static RDFTerm fromLangString(java.lang.String str, java.lang.String languageTag)
Not documented yet.static RDFTerm fromTypedString(java.lang.String str)
Not documented yet.static RDFTerm fromTypedString(java.lang.String str, java.lang.String iri)
Not documented yet.int getKind()
Not documented yet.java.lang.String getTypeOrLanguage()
Gets the language tag or data type for this RDF literal.java.lang.String getValue()
Gets the IRI, blank node identifier, or lexical form of an RDF literal.int hashCode()
Not documented yet.boolean isBlank()
Gets a value indicating whether this term is a blank node.boolean isIRI(java.lang.String str)
Not documented yet.boolean isOrdinaryString()
Not documented yet.java.lang.String toString()
Gets a string representation of this RDF term in N-Triples format.
Field Details
BLANK
public static final int BLANK
Type value for a blank node.
IRI
public static final int IRI
Type value for an IRI (Internationalized Resource Identifier.).
LANGSTRING
public static final int LANGSTRING
Type value for a string with a language tag.
TYPEDSTRING
public static final int TYPEDSTRING
Type value for a piece of data serialized to a string.
A
public static final RDFTerm A
Predicate for RDF types.
FIRST
public static final RDFTerm FIRST
Predicate for the first object in a list.
NIL
public static final RDFTerm NIL
object for nil, the end of a list, or an empty list.
REST
public static final RDFTerm REST
Predicate for the remaining objects in a list.
FALSE
public static final RDFTerm FALSE
object for false.
TRUE
public static final RDFTerm TRUE
object for true.
Method Details
fromBlankNode
public static RDFTerm fromBlankNode(java.lang.String name)
Not documented yet.
Parameters:
name
- The parametername
is not documented yet.
Returns:
- A RDFTerm object.
Throws:
java.lang.NullPointerException
- The parametername
is null.java.lang.IllegalArgumentException
- Name is empty.
fromIRI
public static RDFTerm fromIRI(java.lang.String iri)
Not documented yet.
Parameters:
iri
- The parameteriri
is not documented yet.
Returns:
- A RDFTerm object.
Throws:
java.lang.NullPointerException
- The parameteriri
is null.
fromLangString
public static RDFTerm fromLangString(java.lang.String str, java.lang.String languageTag)
Not documented yet.
Parameters:
str
- The parameterstr
is not documented yet.languageTag
- The parameterlanguageTag
is not documented yet.
Returns:
- A RDFTerm object.
Throws:
java.lang.NullPointerException
- The parameterstr
orlanguageTag
is null.java.lang.IllegalArgumentException
- LanguageTag is empty.
fromTypedString
public static RDFTerm fromTypedString(java.lang.String str)
Not documented yet.
Parameters:
str
- The parameterstr
is not documented yet.
Returns:
- A RDFTerm object.
fromTypedString
public static RDFTerm fromTypedString(java.lang.String str, java.lang.String iri)
Not documented yet.
Parameters:
str
- The parameterstr
is not documented yet.iri
- The parameteriri
is not documented yet.
Returns:
- A RDFTerm object.
Throws:
java.lang.NullPointerException
- The parameterstr
oriri
is null.java.lang.IllegalArgumentException
- Iri is empty.
equals
public final boolean equals(java.lang.Object obj)
Not documented yet.
Overrides:
equals
in classjava.lang.Object
Parameters:
obj
- The parameterobj
is not documented yet.obj
- The parameterobj
is not documented yet.
Returns:
- The return value is not documented yet.
getKind
public int getKind()
Not documented yet.
Returns:
- A 32-bit signed integer.
getTypeOrLanguage
public java.lang.String getTypeOrLanguage()
Gets the language tag or data type for this RDF literal.
Returns:
- A text string.
getValue
public java.lang.String getValue()
Gets the IRI, blank node identifier, or lexical form of an RDF literal.
Returns:
- A text string.
hashCode
public final int hashCode()
Not documented yet.
Overrides:
hashCode
in classjava.lang.Object
Returns:
- The return value is not documented yet.
isBlank
public boolean isBlank()
Gets a value indicating whether this term is a blank node.
Returns:
- Either
true
orfalse
.
isIRI
public boolean isIRI(java.lang.String str)
Not documented yet.
Parameters:
str
- The parameterstr
is not documented yet.
Returns:
- Either
true
orfalse
.
isOrdinaryString
public boolean isOrdinaryString()
Not documented yet.
Returns:
- Either
true
orfalse
.
toString
public final java.lang.String toString()
Gets a string representation of this RDF term in N-Triples format. The string will not end in a line break.
Overrides:
toString
in classjava.lang.Object
Returns:
- A string representation of this object.