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_TYPESprivate IRIfieldstatic TypesRDF_HTMLhttp://www.w3.org/1999/02/22-rdf-syntax-ns#HTMLstatic TypesRDF_LANGSTRINGhttp://www.w3.org/1999/02/22-rdf-syntax-ns#langStringstatic TypesRDF_PLAINLITERALDeprecated.Not used in RDF-1.1static TypesRDF_XMLLITERALhttp://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteralstatic TypesXSD_ANYURIhttp://www.w3.org/2001/XMLSchema#anyURIstatic TypesXSD_BASE64BINARYhttp://www.w3.org/2001/XMLSchema#base64Binarystatic TypesXSD_BOOLEANhttp://www.w3.org/2001/XMLSchema#booleanstatic TypesXSD_BYTEhttp://www.w3.org/2001/XMLSchema#bytestatic TypesXSD_DATEhttp://www.w3.org/2001/XMLSchema#datestatic TypesXSD_DATETIMEhttp://www.w3.org/2001/XMLSchema#dateTimestatic TypesXSD_DAYTIMEDURATIONhttp://www.w3.org/2001/XMLSchema#dayTimeDurationstatic TypesXSD_DECIMALhttp://www.w3.org/2001/XMLSchema#decimalstatic TypesXSD_DOUBLEhttp://www.w3.org/2001/XMLSchema#doublestatic TypesXSD_DURATIONhttp://www.w3.org/2001/XMLSchema#durationstatic TypesXSD_FLOAThttp://www.w3.org/2001/XMLSchema#floatstatic TypesXSD_GDAYhttp://www.w3.org/2001/XMLSchema#gDaystatic TypesXSD_GMONTHhttp://www.w3.org/2001/XMLSchema#gMonthstatic TypesXSD_GMONTHDAYhttp://www.w3.org/2001/XMLSchema#gMonthDaystatic TypesXSD_GYEARhttp://www.w3.org/2001/XMLSchema#gYearstatic TypesXSD_GYEARMONTHhttp://www.w3.org/2001/XMLSchema#gYearMonthstatic TypesXSD_HEXBINARYhttp://www.w3.org/2001/XMLSchema#hexBinarystatic TypesXSD_INThttp://www.w3.org/2001/XMLSchema#intstatic TypesXSD_INTEGERhttp://www.w3.org/2001/XMLSchema#integerstatic TypesXSD_LANGUAGEhttp://www.w3.org/2001/XMLSchema#languagestatic TypesXSD_LONGhttp://www.w3.org/2001/XMLSchema#longstatic TypesXSD_NAMEhttp://www.w3.org/2001/XMLSchema#Namestatic TypesXSD_NCNAMEhttp://www.w3.org/2001/XMLSchema#NCNamestatic TypesXSD_NEGATIVEINTEGERhttp://www.w3.org/2001/XMLSchema#negativeIntegerstatic TypesXSD_NMTOKENhttp://www.w3.org/2001/XMLSchema#NMTOKENstatic TypesXSD_NONNEGATIVEINTEGERhttp://www.w3.org/2001/XMLSchema#nonNegativeIntegerstatic TypesXSD_NONPOSITIVEINTEGERhttp://www.w3.org/2001/XMLSchema#nonPositiveIntegerstatic TypesXSD_NORMALIZEDSTRINGhttp://www.w3.org/2001/XMLSchema#normalizedStringstatic TypesXSD_POSITIVEINTEGERhttp://www.w3.org/2001/XMLSchema#positiveIntegerstatic TypesXSD_SHORThttp://www.w3.org/2001/XMLSchema#shortstatic TypesXSD_STRINGhttp://www.w3.org/2001/XMLSchema#stringstatic TypesXSD_TIMEhttp://www.w3.org/2001/XMLSchema#timestatic TypesXSD_TOKENhttp://www.w3.org/2001/XMLSchema#tokenstatic TypesXSD_UNSIGNEDBYTEhttp://www.w3.org/2001/XMLSchema#unsignedBytestatic TypesXSD_UNSIGNEDINThttp://www.w3.org/2001/XMLSchema#unsignedIntstatic TypesXSD_UNSIGNEDLONGhttp://www.w3.org/2001/XMLSchema#unsignedLongstatic TypesXSD_UNSIGNEDSHORThttp://www.w3.org/2001/XMLSchema#unsignedShort
-
Constructor Summary
Constructors Modifier Constructor Description privateTypes(java.lang.String field)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(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.StringgetIRIString()Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.inthashCode()Calculate a hash code for this IRI.java.lang.StringntriplesString()Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.java.lang.StringtoString()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:IRIReturn the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.- Specified by:
getIRIStringin interfaceIRI- Returns:
- The IRI encoded as a native Unicode String.
-
ntriplesString
public java.lang.String ntriplesString()
Description copied from interface:RDFTermReturn the term serialised as specified by the RDF-1.1 N-Triples Canonical form.- Specified by:
ntriplesStringin 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:IRICheck 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:IRICalculate 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:
toStringin 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
Setcontaining all of the IRIs in this collection.
-
-