Class W3CRDFSyntax
- All Implemented Interfaces:
RDFSyntax
This defines the W3C standardized RDF 1.1 syntaxes like TURTLE
and
JSONLD
. Note the existence of other RDF syntaxes that are not
included here, e.g. N3 and
TriX.
This class is package-protected, its static constants are exposed through
RDFSyntax
.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final IRI
(package private) static final RDFSyntax
private final String
private final String
(package private) static final RDFSyntax
(package private) static final RDFSyntax
(package private) static final RDFSyntax
(package private) static final RDFSyntax
private final boolean
private final String
(package private) static final RDFSyntax
(package private) static final RDFSyntax
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
W3CRDFSyntax
(String name, String title, String mediaType, String fileExtension, boolean supportsDataset) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compare this RDFSyntax with another object.The IANA-registered file extension.int
hashCode()
The hash code of an RDFSyntax is equivalent to the hash code of theRDFSyntax.mediaType()
in lower case according toString.toLowerCase(Locale)
with the localeLocale.ROOT
.iri()
Return theIRI
that identifies the RDF syntax.The IANA media type for the RDF syntax.name()
A short name of the RDF Syntax e.g.boolean
Indicate if this RDF syntax supports RDF Datasets.title()
The title of the RDF Syntax.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.rdf.api.RDFSyntax
fileExtensions, mediaTypes
-
Field Details
-
JSONLD
-
TURTLE
-
NQUADS
-
NTRIPLES
-
RDFA
-
RDFXML
-
TRIG
-
syntaxes
-
title
-
mediaType
-
fileExtension
-
supportsDataset
private final boolean supportsDataset -
name
-
iri
-
-
Constructor Details
-
W3CRDFSyntax
-
-
Method Details
-
mediaType
The IANA media type for the RDF syntax.The media type can be used as part of
Content-Type
andAccept
for content negotiation in the HTTP protocol.W3CRDFSyntax
always defines media type in lower case, soString.toLowerCase(Locale)
need not be called. -
fileExtension
The IANA-registered file extension.The file extension includes the leading period, e.g.
.jsonld
W3CRDFSyntax
always defines file extensions in lower case, soString.toLowerCase(Locale)
need not be called.- Specified by:
fileExtension
in interfaceRDFSyntax
- Returns:
- The registered file extension of the RDF Syntax
-
supportsDataset
public boolean supportsDataset()Description copied from interface:RDFSyntax
Indicate if this RDF syntax supports RDF Datasets.- Specified by:
supportsDataset
in interfaceRDFSyntax
- Returns:
- true if this RDF Syntax supports datasets; false otherwise
-
title
Description copied from interface:RDFSyntax
The title of the RDF Syntax.This is generally the title of the corresponding standard, e.g. RDF 1.1 Turtle.
-
name
Description copied from interface:RDFSyntax
A short name of the RDF Syntax e.g.JSONLD
.The name is specific to Commons RDF and carries no particular meaning.
-
iri
Description copied from interface:RDFSyntax
Return theIRI
that identifies the RDF syntax.Note that the identifying IRI is generally distinct from the IRI of the document that specifies the RDF syntax.
-
equals
Description copied from interface:RDFSyntax
Compare this RDFSyntax with another object.Two
RDFSyntax
es are considered equal if theirRDFSyntax.mediaType()
s are equal when compared as lower case strings according toString.toLowerCase(Locale)
with the localeLocale.ROOT
. -
hashCode
public int hashCode()Description copied from interface:RDFSyntax
The hash code of an RDFSyntax is equivalent to the hash code of theRDFSyntax.mediaType()
in lower case according toString.toLowerCase(Locale)
with the localeLocale.ROOT
. -
toString
-