Package com.stardog.stark
Enum Datatype
- java.lang.Object
-
- java.lang.Enum<Datatype>
-
- com.stardog.stark.Datatype
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Datatype>
public enum Datatype extends java.lang.Enum<Datatype>
Object representing the
datatype of a Literal
.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
datatypesEqual(Literal theLeft, Literal theRight)
Return whether or not the twodatatypes
are equalint
getId()
IRI
iri()
The IRI of the `Datatype`static Datatype
of(int theId)
Return theDatatype
associated with the id.static Datatype
of(IRI theIRI)
java.lang.String
toString()
static Datatype
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Datatype[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final Datatype BOOLEAN
-
INT
public static final Datatype INT
-
INTEGER
public static final Datatype INTEGER
-
LONG
public static final Datatype LONG
-
FLOAT
public static final Datatype FLOAT
-
DOUBLE
public static final Datatype DOUBLE
-
BYTE
public static final Datatype BYTE
-
SHORT
public static final Datatype SHORT
-
STRING
public static final Datatype STRING
-
TIME
public static final Datatype TIME
-
DATE
public static final Datatype DATE
-
GYEARMONTH
public static final Datatype GYEARMONTH
-
GYEAR
public static final Datatype GYEAR
-
GMONTHDAY
public static final Datatype GMONTHDAY
-
GDAY
public static final Datatype GDAY
-
GMONTH
public static final Datatype GMONTH
-
BASE64BINARY
public static final Datatype BASE64BINARY
-
HEXBINARY
public static final Datatype HEXBINARY
-
DECIMAL
public static final Datatype DECIMAL
-
ANYURI
public static final Datatype ANYURI
-
QNAME
public static final Datatype QNAME
-
NOTATION
public static final Datatype NOTATION
-
NORMALIZEDSTRING
public static final Datatype NORMALIZEDSTRING
-
TOKEN
public static final Datatype TOKEN
-
LANGUAGE
public static final Datatype LANGUAGE
-
NMTOKEN
public static final Datatype NMTOKEN
-
NMTOKENS
public static final Datatype NMTOKENS
-
NAME
public static final Datatype NAME
-
NCNAME
public static final Datatype NCNAME
-
ID
public static final Datatype ID
-
IDREF
public static final Datatype IDREF
-
IDREFS
public static final Datatype IDREFS
-
ENTITY
public static final Datatype ENTITY
-
ENTITIES
public static final Datatype ENTITIES
-
NON_POSITIVE_INTEGER
public static final Datatype NON_POSITIVE_INTEGER
-
NEGATIVE_INTEGER
public static final Datatype NEGATIVE_INTEGER
-
NON_NEGATIVE_INTEGER
public static final Datatype NON_NEGATIVE_INTEGER
-
POSITIVE_INTEGER
public static final Datatype POSITIVE_INTEGER
-
UNSIGNED_LONG
public static final Datatype UNSIGNED_LONG
-
UNSIGNED_INT
public static final Datatype UNSIGNED_INT
-
UNSIGNED_SHORT
public static final Datatype UNSIGNED_SHORT
-
UNSIGNED_BYTE
public static final Datatype UNSIGNED_BYTE
-
DATETIME
public static final Datatype DATETIME
-
DATETIMESTAMP
public static final Datatype DATETIMESTAMP
-
DURATION
public static final Datatype DURATION
-
DURATION_DAYTIME
public static final Datatype DURATION_DAYTIME
-
DURATION_YEARMONTH
public static final Datatype DURATION_YEARMONTH
-
LANG_STRING
public static final Datatype LANG_STRING
-
UDF
public static final Datatype UDF
-
-
Method Detail
-
values
public static Datatype[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Datatype c : Datatype.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Datatype valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
of
@Nonnull public static Datatype of(@Nonnull IRI theIRI)
Return theDatatype
associated with theIRI
. If the `IRI` does not denote a native XML or RDF datatype,UDF
will be returned.- Parameters:
theIRI
- the datatype IRI- Returns:
- the
Datatype
-
of
@Nonnull public static Datatype of(@Nonnull int theId)
Return theDatatype
associated with the id.- Parameters:
theId
- the id of IRI- Returns:
- the
Datatype
-
datatypesEqual
public static boolean datatypesEqual(@Nonnull Literal theLeft, @Nonnull Literal theRight)
Return whether or not the twodatatypes
are equal- Parameters:
theLeft
- the first typetheRight
- the other type- Returns:
- `true` if equal, `false` otherwise
-
iri
@Nonnull public IRI iri()
The IRI of the `Datatype`- Returns:
- the IRI
-
getId
public int getId()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<Datatype>
-
-