Package org.eclipse.rdf4j.model.base
Class AbstractLiteral.BooleanLiteral
java.lang.Object
org.eclipse.rdf4j.model.base.AbstractLiteral
org.eclipse.rdf4j.model.base.AbstractLiteral.BooleanLiteral
- All Implemented Interfaces:
Serializable
,Literal
,Value
- Enclosing class:
AbstractLiteral
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.rdf4j.model.base.AbstractLiteral
AbstractLiteral.BooleanLiteral, AbstractLiteral.CalendarLiteral, AbstractLiteral.DecimalLiteral, AbstractLiteral.IntegerLiteral, AbstractLiteral.NumberLiteral, AbstractLiteral.TaggedLiteral, AbstractLiteral.TemporalAccessorLiteral, AbstractLiteral.TemporalAmountLiteral, AbstractLiteral.TypedLiteral
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the boolean value of this literal.CoreDatatype is an interface for natively supported datatypes in RDF4J.Gets the datatype for this literal.getLabel()
Gets the label (the lexical value) of this literal.Gets the language tag for this literal, normalized to lower case.(package private) static Boolean
parseBoolean
(String label) Methods inherited from class org.eclipse.rdf4j.model.base.AbstractLiteral
byteValue, calendarValue, decimalValue, doubleValue, equals, floatValue, hashCode, integerValue, intValue, longValue, reserved, reserved, shortValue, stringValue, temporalAccessorValue, temporalAmountValue, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.model.Value
isBNode, isIRI, isResource, isTriple
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
value
private final boolean value
-
-
Constructor Details
-
BooleanLiteral
BooleanLiteral(boolean value)
-
-
Method Details
-
parseBoolean
-
getLabel
Description copied from interface:Literal
Gets the label (the lexical value) of this literal.- Returns:
- The literal's label.
-
getLanguage
Description copied from interface:Literal
Gets the language tag for this literal, normalized to lower case.- Returns:
- The language tag for this literal, or
Optional.empty()
if it doesn't have one.
-
getDatatype
Description copied from interface:Literal
Gets the datatype for this literal.If
Literal.getLanguage()
returns a non-empty value than this must returnrdf:langString
. If no datatype was assigned to this literal by the creator, then this method must returnxsd:string
.- Returns:
- The datatype for this literal.
-
getCoreDatatype
Description copied from interface:Literal
CoreDatatype is an interface for natively supported datatypes in RDF4J. This includes, among others, the XML Schema datatypes and rdf:langString. CoreDatatypes are implemented as enums and more performant and convenient to work with than IRI-based datatypes. The constantinvalid @link
{@link CoreDatatype#NONE)
- Returns:
- The CoreDatatype or
invalid @link
{@link CoreDatatype#NONE)
-
booleanValue
public boolean booleanValue()Description copied from interface:Literal
Returns the boolean value of this literal.- Specified by:
booleanValue
in interfaceLiteral
- Overrides:
booleanValue
in classAbstractLiteral
- Returns:
- The boolean value of the literal.
-