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
-
- Enclosing class:
- AbstractLiteral
static class AbstractLiteral.BooleanLiteral extends 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
Fields Modifier and Type Field Description private static longserialVersionUIDprivate booleanvalue
-
Constructor Summary
Constructors Constructor Description BooleanLiteral(boolean value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbooleanValue()Returns the boolean value of this literal.CoreDatatype.XSDgetCoreDatatype()CoreDatatype is an interface for natively supported datatypes in RDF4J.IRIgetDatatype()Gets the datatype for this literal.java.lang.StringgetLabel()Gets the label (the lexical value) of this literal.java.util.Optional<java.lang.String>getLanguage()Gets the language tag for this literal, normalized to lower case.(package private) static java.lang.BooleanparseBoolean(java.lang.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 Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
value
private final boolean value
-
-
Method Detail
-
parseBoolean
static java.lang.Boolean parseBoolean(java.lang.String label)
-
getLabel
public java.lang.String getLabel()
Description copied from interface:LiteralGets the label (the lexical value) of this literal.- Returns:
- The literal's label.
-
getLanguage
public java.util.Optional<java.lang.String> getLanguage()
Description copied from interface:LiteralGets 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
public IRI getDatatype()
Description copied from interface:LiteralGets 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
public CoreDatatype.XSD getCoreDatatype()
Description copied from interface:LiteralCoreDatatype 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 constant {@link CoreDatatype#NONE)} is used to represent a datatype that is not one of the supported core datatypes.- Returns:
- The CoreDatatype or {@link CoreDatatype#NONE)} if the datatype matches none of the core datatypes. This method will not return null.
-
booleanValue
public boolean booleanValue()
Description copied from interface:LiteralReturns the boolean value of this literal.- Specified by:
booleanValuein interfaceLiteral- Overrides:
booleanValuein classAbstractLiteral- Returns:
- The boolean value of the literal.
-
-