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 Stringprivate final IRI(package private) static final RDFSyntaxprivate final Stringprivate final String(package private) static final RDFSyntax(package private) static final RDFSyntax(package private) static final RDFSyntax(package private) static final RDFSyntaxprivate final booleanprivate final String(package private) static final RDFSyntax(package private) static final RDFSyntax -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateW3CRDFSyntax(String name, String title, String mediaType, String fileExtension, boolean supportsDataset) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare this RDFSyntax with another object.The IANA-registered file extension.inthashCode()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 theIRIthat identifies the RDF syntax.The IANA media type for the RDF syntax.name()A short name of the RDF Syntax e.g.booleanIndicate 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, waitMethods 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-TypeandAcceptfor content negotiation in the HTTP protocol.W3CRDFSyntaxalways 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.
.jsonldW3CRDFSyntaxalways defines file extensions in lower case, soString.toLowerCase(Locale)need not be called.- Specified by:
fileExtensionin interfaceRDFSyntax- Returns:
- The registered file extension of the RDF Syntax
-
supportsDataset
public boolean supportsDataset()Description copied from interface:RDFSyntaxIndicate if this RDF syntax supports RDF Datasets.- Specified by:
supportsDatasetin interfaceRDFSyntax- Returns:
- true if this RDF Syntax supports datasets; false otherwise
-
title
Description copied from interface:RDFSyntaxThe 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:RDFSyntaxA 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:RDFSyntaxReturn theIRIthat 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:RDFSyntaxCompare this RDFSyntax with another object.Two
RDFSyntaxes 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:RDFSyntaxThe 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
-