Package no.hasmac.rdf
Interface RdfValue
-
- All Known Subinterfaces:
RdfLiteral
,RdfResource
- All Known Implementing Classes:
RdfLiteralImpl
,RdfResourceImpl
public interface RdfValue
An immutable RDF statement's value. Represents an absolute IRI or blank node identifier or RDF literal.- Since:
- 0.8.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RdfLiteral
asLiteral()
Return the RdfValue as a RdfLiteralboolean
equals(java.lang.Object o)
java.lang.String
getValue()
Returns rawString
representation of the value.int
hashCode()
default boolean
isBlankNode()
Indicates if the value type is blank node identifier.default boolean
isIRI()
Indicates if the value type is an absolute IRI.default boolean
isLiteral()
Indicates if the value type is RDF literal.java.lang.String
toString()
-
-
-
Method Detail
-
isLiteral
default boolean isLiteral()
Indicates if the value type is RDF literal.- Returns:
true
if the value type is literal,false
otherwise.
-
isIRI
default boolean isIRI()
Indicates if the value type is an absolute IRI.- Returns:
true
if the value type is IRI,false
otherwise.
-
isBlankNode
default boolean isBlankNode()
Indicates if the value type is blank node identifier.- Returns:
true
if the value type is blank node,false
otherwise.
-
asLiteral
RdfLiteral asLiteral()
Return the RdfValue as a RdfLiteral- Returns:
- the RdfValue as a RdfLiteral
- Throws:
java.lang.ClassCastException
- if the RdfValue is not a RdfLiteral
-
getValue
java.lang.String getValue()
Returns rawString
representation of the value.- Returns:
- text representing the value.
-
equals
boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-