Package org.apache.commons.rdf.simple
Class Types
- java.lang.Object
-
- org.apache.commons.rdf.simple.Types
-
- All Implemented Interfaces:
BlankNodeOrIRI
,IRI
,RDFTerm
,SimpleRDF.SimpleRDFTerm
public final class Types extends java.lang.Object implements IRI, SimpleRDF.SimpleRDFTerm
Types from the RDF and XML Schema vocabularies.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<IRI>
ALL_TYPES
private IRI
field
static Types
RDF_HTML
http://www.w3.org/1999/02/22-rdf-syntax-ns#HTMLstatic Types
RDF_LANGSTRING
http://www.w3.org/1999/02/22-rdf-syntax-ns#langStringstatic Types
RDF_PLAINLITERAL
Deprecated.Not used in RDF-1.1static Types
RDF_XMLLITERAL
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteralstatic Types
XSD_ANYURI
http://www.w3.org/2001/XMLSchema#anyURIstatic Types
XSD_BASE64BINARY
http://www.w3.org/2001/XMLSchema#base64Binarystatic Types
XSD_BOOLEAN
http://www.w3.org/2001/XMLSchema#booleanstatic Types
XSD_BYTE
http://www.w3.org/2001/XMLSchema#bytestatic Types
XSD_DATE
http://www.w3.org/2001/XMLSchema#datestatic Types
XSD_DATETIME
http://www.w3.org/2001/XMLSchema#dateTimestatic Types
XSD_DAYTIMEDURATION
http://www.w3.org/2001/XMLSchema#dayTimeDurationstatic Types
XSD_DECIMAL
http://www.w3.org/2001/XMLSchema#decimalstatic Types
XSD_DOUBLE
http://www.w3.org/2001/XMLSchema#doublestatic Types
XSD_DURATION
http://www.w3.org/2001/XMLSchema#durationstatic Types
XSD_FLOAT
http://www.w3.org/2001/XMLSchema#floatstatic Types
XSD_GDAY
http://www.w3.org/2001/XMLSchema#gDaystatic Types
XSD_GMONTH
http://www.w3.org/2001/XMLSchema#gMonthstatic Types
XSD_GMONTHDAY
http://www.w3.org/2001/XMLSchema#gMonthDaystatic Types
XSD_GYEAR
http://www.w3.org/2001/XMLSchema#gYearstatic Types
XSD_GYEARMONTH
http://www.w3.org/2001/XMLSchema#gYearMonthstatic Types
XSD_HEXBINARY
http://www.w3.org/2001/XMLSchema#hexBinarystatic Types
XSD_INT
http://www.w3.org/2001/XMLSchema#intstatic Types
XSD_INTEGER
http://www.w3.org/2001/XMLSchema#integerstatic Types
XSD_LANGUAGE
http://www.w3.org/2001/XMLSchema#languagestatic Types
XSD_LONG
http://www.w3.org/2001/XMLSchema#longstatic Types
XSD_NAME
http://www.w3.org/2001/XMLSchema#Namestatic Types
XSD_NCNAME
http://www.w3.org/2001/XMLSchema#NCNamestatic Types
XSD_NEGATIVEINTEGER
http://www.w3.org/2001/XMLSchema#negativeIntegerstatic Types
XSD_NMTOKEN
http://www.w3.org/2001/XMLSchema#NMTOKENstatic Types
XSD_NONNEGATIVEINTEGER
http://www.w3.org/2001/XMLSchema#nonNegativeIntegerstatic Types
XSD_NONPOSITIVEINTEGER
http://www.w3.org/2001/XMLSchema#nonPositiveIntegerstatic Types
XSD_NORMALIZEDSTRING
http://www.w3.org/2001/XMLSchema#normalizedStringstatic Types
XSD_POSITIVEINTEGER
http://www.w3.org/2001/XMLSchema#positiveIntegerstatic Types
XSD_SHORT
http://www.w3.org/2001/XMLSchema#shortstatic Types
XSD_STRING
http://www.w3.org/2001/XMLSchema#stringstatic Types
XSD_TIME
http://www.w3.org/2001/XMLSchema#timestatic Types
XSD_TOKEN
http://www.w3.org/2001/XMLSchema#tokenstatic Types
XSD_UNSIGNEDBYTE
http://www.w3.org/2001/XMLSchema#unsignedBytestatic Types
XSD_UNSIGNEDINT
http://www.w3.org/2001/XMLSchema#unsignedIntstatic Types
XSD_UNSIGNEDLONG
http://www.w3.org/2001/XMLSchema#unsignedLongstatic Types
XSD_UNSIGNEDSHORT
http://www.w3.org/2001/XMLSchema#unsignedShort
-
Constructor Summary
Constructors Modifier Constructor Description private
Types(java.lang.String field)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Check it this IRI is equal to another IRI.static java.util.Optional<IRI>
get(IRI nextIRI)
Get the IRI from this collection if it is present, or returnOptional.empty()
otherwise.java.lang.String
getIRIString()
Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.int
hashCode()
Calculate a hash code for this IRI.java.lang.String
ntriplesString()
Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.java.lang.String
toString()
static java.util.Set<IRI>
values()
Get an immutable set of the IRIs used by the RDF-1.1 specification to define types, from the RDF and XML Schema vocabularies.
-
-
-
Field Detail
-
RDF_HTML
public static final Types RDF_HTML
http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML
-
RDF_LANGSTRING
public static final Types RDF_LANGSTRING
http://www.w3.org/1999/02/22-rdf-syntax-ns#langString
-
RDF_PLAINLITERAL
@Deprecated public static final Types RDF_PLAINLITERAL
Deprecated.Not used in RDF-1.1http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral
-
RDF_XMLLITERAL
public static final Types RDF_XMLLITERAL
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral
-
XSD_ANYURI
public static final Types XSD_ANYURI
http://www.w3.org/2001/XMLSchema#anyURI
-
XSD_BASE64BINARY
public static final Types XSD_BASE64BINARY
http://www.w3.org/2001/XMLSchema#base64Binary
-
XSD_BOOLEAN
public static final Types XSD_BOOLEAN
http://www.w3.org/2001/XMLSchema#boolean
-
XSD_BYTE
public static final Types XSD_BYTE
http://www.w3.org/2001/XMLSchema#byte
-
XSD_DATE
public static final Types XSD_DATE
http://www.w3.org/2001/XMLSchema#date
-
XSD_DATETIME
public static final Types XSD_DATETIME
http://www.w3.org/2001/XMLSchema#dateTime
-
XSD_DAYTIMEDURATION
public static final Types XSD_DAYTIMEDURATION
http://www.w3.org/2001/XMLSchema#dayTimeDuration
-
XSD_DECIMAL
public static final Types XSD_DECIMAL
http://www.w3.org/2001/XMLSchema#decimal
-
XSD_DOUBLE
public static final Types XSD_DOUBLE
http://www.w3.org/2001/XMLSchema#double
-
XSD_DURATION
public static final Types XSD_DURATION
http://www.w3.org/2001/XMLSchema#duration
-
XSD_FLOAT
public static final Types XSD_FLOAT
http://www.w3.org/2001/XMLSchema#float
-
XSD_GDAY
public static final Types XSD_GDAY
http://www.w3.org/2001/XMLSchema#gDay
-
XSD_GMONTH
public static final Types XSD_GMONTH
http://www.w3.org/2001/XMLSchema#gMonth
-
XSD_GMONTHDAY
public static final Types XSD_GMONTHDAY
http://www.w3.org/2001/XMLSchema#gMonthDay
-
XSD_GYEAR
public static final Types XSD_GYEAR
http://www.w3.org/2001/XMLSchema#gYear
-
XSD_GYEARMONTH
public static final Types XSD_GYEARMONTH
http://www.w3.org/2001/XMLSchema#gYearMonth
-
XSD_HEXBINARY
public static final Types XSD_HEXBINARY
http://www.w3.org/2001/XMLSchema#hexBinary
-
XSD_INT
public static final Types XSD_INT
http://www.w3.org/2001/XMLSchema#int
-
XSD_INTEGER
public static final Types XSD_INTEGER
http://www.w3.org/2001/XMLSchema#integer
-
XSD_LANGUAGE
public static final Types XSD_LANGUAGE
http://www.w3.org/2001/XMLSchema#language
-
XSD_LONG
public static final Types XSD_LONG
http://www.w3.org/2001/XMLSchema#long
-
XSD_NAME
public static final Types XSD_NAME
http://www.w3.org/2001/XMLSchema#Name
-
XSD_NCNAME
public static final Types XSD_NCNAME
http://www.w3.org/2001/XMLSchema#NCName
-
XSD_NEGATIVEINTEGER
public static final Types XSD_NEGATIVEINTEGER
http://www.w3.org/2001/XMLSchema#negativeInteger
-
XSD_NMTOKEN
public static final Types XSD_NMTOKEN
http://www.w3.org/2001/XMLSchema#NMTOKEN
-
XSD_NONNEGATIVEINTEGER
public static final Types XSD_NONNEGATIVEINTEGER
http://www.w3.org/2001/XMLSchema#nonNegativeInteger
-
XSD_NONPOSITIVEINTEGER
public static final Types XSD_NONPOSITIVEINTEGER
http://www.w3.org/2001/XMLSchema#nonPositiveInteger
-
XSD_NORMALIZEDSTRING
public static final Types XSD_NORMALIZEDSTRING
http://www.w3.org/2001/XMLSchema#normalizedString
-
XSD_POSITIVEINTEGER
public static final Types XSD_POSITIVEINTEGER
http://www.w3.org/2001/XMLSchema#positiveInteger
-
XSD_SHORT
public static final Types XSD_SHORT
http://www.w3.org/2001/XMLSchema#short
-
XSD_STRING
public static final Types XSD_STRING
http://www.w3.org/2001/XMLSchema#string
-
XSD_TIME
public static final Types XSD_TIME
http://www.w3.org/2001/XMLSchema#time
-
XSD_TOKEN
public static final Types XSD_TOKEN
http://www.w3.org/2001/XMLSchema#token
-
XSD_UNSIGNEDBYTE
public static final Types XSD_UNSIGNEDBYTE
http://www.w3.org/2001/XMLSchema#unsignedByte
-
XSD_UNSIGNEDINT
public static final Types XSD_UNSIGNEDINT
http://www.w3.org/2001/XMLSchema#unsignedInt
-
XSD_UNSIGNEDLONG
public static final Types XSD_UNSIGNEDLONG
http://www.w3.org/2001/XMLSchema#unsignedLong
-
XSD_UNSIGNEDSHORT
public static final Types XSD_UNSIGNEDSHORT
http://www.w3.org/2001/XMLSchema#unsignedShort
-
ALL_TYPES
private static final java.util.Set<IRI> ALL_TYPES
-
field
private final IRI field
-
-
Method Detail
-
getIRIString
public java.lang.String getIRIString()
Description copied from interface:IRI
Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.- Specified by:
getIRIString
in interfaceIRI
- Returns:
- The IRI encoded as a native Unicode String.
-
ntriplesString
public java.lang.String ntriplesString()
Description copied from interface:RDFTerm
Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.- Specified by:
ntriplesString
in interfaceRDFTerm
- Returns:
- The term serialised as RDF-1.1 N-Triples.
- See Also:
- RDF-1.1 N-Triples Canonical form
-
equals
public boolean equals(java.lang.Object other)
Description copied from interface:IRI
Check it this IRI is equal to another IRI.IRI equality: Two IRIs are equal if and only if they are equivalent under Simple String Comparison according to section 5.1 of [RFC3987]. Further normalization MUST NOT be performed when comparing IRIs for equality.
Two IRI instances are equal if and only if theirIRI.getIRIString()
are equal. Implementations MUST also overrideIRI.hashCode()
so that two equal IRIs produce the same hash code.
-
hashCode
public int hashCode()
Description copied from interface:IRI
Calculate a hash code for this IRI.The returned hash code MUST be equal to the
String.hashCode()
of theIRI.getIRIString()
.This method MUST be implemented in conjunction with
IRI.equals(Object)
so that two equal IRIs produce the same hash code.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
values
public static java.util.Set<IRI> values()
Get an immutable set of the IRIs used by the RDF-1.1 specification to define types, from the RDF and XML Schema vocabularies.- Returns:
- A
Set
containing all of the IRIs in this collection.
-
-