|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.io.file.FileFormat
org.openrdf.rio.RDFFormat
public class RDFFormat
Represents the concept of an RDF data serialization format. RDF formats are
identified by a name and can have one or more associated
MIME types, zero or more associated file extensions and can specify a
(default) character encoding. Some formats are able to encode context
information while other are not; this is indicated by the value of
supportsContexts.
| Field Summary | |
|---|---|
static RDFFormat |
N3
The N3/Notation3 file format. |
static RDFFormat |
NTRIPLES
The N-Triples file format. |
static RDFFormat |
RDFA
|
static RDFFormat |
RDFXML
The RDF/XML file format. |
static RDFFormat |
TRIG
The TriG file format. |
static RDFFormat |
TRIX
The TriX file format. |
static RDFFormat |
TURTLE
The Turtle file format. |
| Constructor Summary | |
|---|---|
RDFFormat(String name,
Collection<String> mimeTypes,
Charset charset,
Collection<String> fileExtensions,
boolean supportsNamespaces,
boolean supportsContexts)
Creates a new RDFFormat object. |
|
RDFFormat(String name,
String mimeType,
Charset charset,
Collection<String> fileExtensions,
boolean supportsNamespaces,
boolean supportsContexts)
Creates a new RDFFormat object. |
|
RDFFormat(String name,
String mimeType,
Charset charset,
String fileExtension,
boolean supportsNamespaces,
boolean supportsContexts)
Creates a new RDFFormat object. |
|
| Method Summary | |
|---|---|
static RDFFormat |
forFileName(String fileName)
Tries to determine the appropriate RDF file format based on the extension of a file name. |
static RDFFormat |
forFileName(String fileName,
RDFFormat fallback)
Tries to determine the appropriate RDF file format based on the extension of a file name. |
static RDFFormat |
forMIMEType(String mimeType)
Tries to determine the appropriate RDF file format based on the a MIME type that describes the content type. |
static RDFFormat |
forMIMEType(String mimeType,
RDFFormat fallback)
Tries to determine the appropriate RDF file format based on the a MIME type that describes the content type. |
static void |
register(RDFFormat rdfFormat)
Registers the specified RDF file format. |
static RDFFormat |
register(String name,
String mimeType,
String fileExt,
Charset charset)
Registers the specified RDF file format. |
boolean |
supportsContexts()
|
boolean |
supportsNamespaces()
|
static RDFFormat |
valueOf(String formatName)
Returns the RDF format whose name matches the specified name. |
static Collection<RDFFormat> |
values()
Returns all known/registered RDF formats. |
| Methods inherited from class info.aduna.io.file.FileFormat |
|---|
equals, getCharset, getDefaultFileExtension, getDefaultMIMEType, getFileExtensions, getMIMETypes, getName, hasCharset, hasDefaultFileExtension, hasDefaultMIMEType, hasFileExtension, hashCode, hasMIMEType, matchFileName, matchFileName, matchMIMEType, matchMIMEType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final RDFFormat RDFXML
public static final RDFFormat NTRIPLES
public static final RDFFormat TURTLE
public static final RDFFormat N3
public static final RDFFormat TRIX
public static final RDFFormat TRIG
public static final RDFFormat RDFA
| Constructor Detail |
|---|
public RDFFormat(String name,
String mimeType,
Charset charset,
String fileExtension,
boolean supportsNamespaces,
boolean supportsContexts)
name - The name of the RDF file format, e.g. "RDF/XML".mimeType - The MIME type of the RDF file format, e.g.
application/rdf+xml for the RDF/XML file format.charset - The default character encoding of the RDF file format. Specify
null if not applicable.fileExtension - The (default) file extension for the RDF file format, e.g.
rdf for RDF/XML files.
public RDFFormat(String name,
String mimeType,
Charset charset,
Collection<String> fileExtensions,
boolean supportsNamespaces,
boolean supportsContexts)
name - The name of the RDF file format, e.g. "RDF/XML".mimeType - The MIME type of the RDF file format, e.g.
application/rdf+xml for the RDF/XML file format.charset - The default character encoding of the RDF file format. Specify
null if not applicable.fileExtensions - The RDF format's file extensions, e.g. rdf for RDF/XML
files. The first item in the list is interpreted as the default
file extension for the format.
public RDFFormat(String name,
Collection<String> mimeTypes,
Charset charset,
Collection<String> fileExtensions,
boolean supportsNamespaces,
boolean supportsContexts)
name - The name of the RDF file format, e.g. "RDF/XML".mimeTypes - The MIME types of the RDF file format, e.g.
application/rdf+xml for the RDF/XML file format. The first
item in the list is interpreted as the default MIME type for the
format.charset - The default character encoding of the RDF file format. Specify
null if not applicable.fileExtensions - The RDF format's file extensions, e.g. rdf for RDF/XML
files. The first item in the list is interpreted as the default
file extension for the format.| Method Detail |
|---|
public static Collection<RDFFormat> values()
public static RDFFormat register(String name,
String mimeType,
String fileExt,
Charset charset)
name - The name of the RDF file format, e.g. "RDF/XML".mimeType - The MIME type of the RDF file format, e.g.
application/rdf+xml for the RDF/XML file format.fileExt - The (default) file extension for the RDF file format, e.g.
rdf for RDF/XML files.public static void register(RDFFormat rdfFormat)
public static RDFFormat forMIMEType(String mimeType)
mimeType - A MIME type, e.g. "application/rdf+xml".
forMIMEType(String,RDFFormat),
FileFormat.getMIMETypes()
public static RDFFormat forMIMEType(String mimeType,
RDFFormat fallback)
mimeType - A file name.
forMIMEType(String),
FileFormat.getMIMETypes()public static RDFFormat forFileName(String fileName)
fileName - A file name.
forFileName(String,RDFFormat),
FileFormat.getFileExtensions()
public static RDFFormat forFileName(String fileName,
RDFFormat fallback)
fileName - A file name.
forFileName(String),
FileFormat.getFileExtensions()public static RDFFormat valueOf(String formatName)
formatName - A format name.
public boolean supportsNamespaces()
public boolean supportsContexts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||