|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.rio.Rio
public class Rio
Factory class providing static methods for creating RDF parsers and -writers for various RDF file formats.
| Constructor Summary | |
|---|---|
Rio()
|
|
| Method Summary | |
|---|---|
static RDFParser |
createParser(RDFFormat format)
Convenience methods for creating RDFParser objects. |
static RDFParser |
createParser(RDFFormat format,
ValueFactory valueFactory)
Convenience methods for creating RDFParser objects that use the specified ValueFactory to create RDF model objects. |
static RDFWriter |
createWriter(RDFFormat format,
OutputStream out)
Convenience methods for creating RDFWriter objects. |
static RDFWriter |
createWriter(RDFFormat format,
Writer writer)
Convenience methods for creating RDFWriter objects. |
static RDFFormat |
getParserFormatForFileName(String fileName)
Tries to match the extension of a file name against the list of RDF formats that can be parsed. |
static RDFFormat |
getParserFormatForFileName(String fileName,
RDFFormat fallback)
Tries to match the extension of a file name against the list of RDF formats that can be parsed. |
static RDFFormat |
getParserFormatForMIMEType(String mimeType)
Tries to match a MIME type against the list of RDF formats that can be parsed. |
static RDFFormat |
getParserFormatForMIMEType(String mimeType,
RDFFormat fallback)
Tries to match a MIME type against the list of RDF formats that can be parsed. |
static RDFFormat |
getWriterFormatForFileName(String fileName)
Tries to match the extension of a file name against the list of RDF formats that can be written. |
static RDFFormat |
getWriterFormatForFileName(String fileName,
RDFFormat fallback)
Tries to match the extension of a file name against the list of RDF formats that can be written. |
static RDFFormat |
getWriterFormatForMIMEType(String mimeType)
Tries to match a MIME type against the list of RDF formats that can be written. |
static RDFFormat |
getWriterFormatForMIMEType(String mimeType,
RDFFormat fallback)
Tries to match a MIME type against the list of RDF formats that can be written. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Rio()
| Method Detail |
|---|
public static RDFFormat getParserFormatForMIMEType(String mimeType)
mimeType - A MIME type, e.g. "application/rdf+xml".
getParserFormatForMIMEType(String, RDFFormat)
public static RDFFormat getParserFormatForMIMEType(String mimeType,
RDFFormat fallback)
FileFormat.matchMIMEType(String, Iterable) with the specified MIME
type, the keys of RDFParserRegistry.getInstance() and the fallback
format as parameters.
mimeType - A MIME type, e.g. "application/rdf+xml".fallback - The format that will be returned if no match was found.
public static RDFFormat getParserFormatForFileName(String fileName)
fileName - A file name.
getParserFormatForFileName(String, RDFFormat)
public static RDFFormat getParserFormatForFileName(String fileName,
RDFFormat fallback)
FileFormat.matchFileName(String, Iterable, info.aduna.lang.FileFormat)
with the specified MIME type, the keys of
RDFParserRegistry.getInstance() and the fallback format as
parameters.
fileName - A file name.fallback - The format that will be returned if no match was found.
public static RDFFormat getWriterFormatForMIMEType(String mimeType)
mimeType - A MIME type, e.g. "application/rdf+xml".
getWriterFormatForMIMEType(String, RDFFormat)
public static RDFFormat getWriterFormatForMIMEType(String mimeType,
RDFFormat fallback)
FileFormat.matchMIMEType(String, Iterable, info.aduna.lang.FileFormat)
with the specified MIME type, the keys of
RDFWriterRegistry.getInstance() and the fallback format as
parameters.
mimeType - A MIME type, e.g. "application/rdf+xml".fallback - The format that will be returned if no match was found.
public static RDFFormat getWriterFormatForFileName(String fileName)
fileName - A file name.
getWriterFormatForFileName(String, RDFFormat)
public static RDFFormat getWriterFormatForFileName(String fileName,
RDFFormat fallback)
FileFormat.matchFileName(String, Iterable, info.aduna.lang.FileFormat)
with the specified MIME type, the keys of
RDFWriterRegistry.getInstance() and the fallback format as
parameters.
fileName - A file name.fallback - The format that will be returned if no match was found.
public static RDFParser createParser(RDFFormat format)
throws UnsupportedRDFormatException
RDFParserRegistry.getInstance() to get a
factory for the specified format and uses this factory to create the
appropriate parser.
UnsupportedRDFormatException - If no parser is available for the specified RDF format.
public static RDFParser createParser(RDFFormat format,
ValueFactory valueFactory)
throws UnsupportedRDFormatException
UnsupportedRDFormatException - If no parser is available for the specified RDF format.createParser(RDFFormat),
RDFParser.setValueFactory(ValueFactory)
public static RDFWriter createWriter(RDFFormat format,
OutputStream out)
throws UnsupportedRDFormatException
RDFWriterRegistry.getInstance() to get a
factory for the specified format and uses this factory to create the
appropriate writer.
UnsupportedRDFormatException - If no writer is available for the specified RDF format.
public static RDFWriter createWriter(RDFFormat format,
Writer writer)
throws UnsupportedRDFormatException
RDFWriterRegistry.getInstance() to get a
factory for the specified format and uses this factory to create the
appropriate writer.
UnsupportedRDFormatException - If no writer is available for the specified RDF format.
public static void main(String[] args)
throws IOException,
RDFParseException,
RDFHandlerException,
UnsupportedRDFormatException
IOException
RDFParseException
RDFHandlerException
UnsupportedRDFormatException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||