Bases: Format
Represents a document format. Documents are non-RDF files that can be converted to triples using the transform service of AG.
Initialize a new document format object.
name â Human-readable name of the format.
mime_types â A list of MIME types used for this format. The first element of this list will be used as the content-type header during uploads.
file_extensions â List of file extensions for this format.
register â If True file extensions will be added to the map used by Format.format_for_file_name()
.
Bases: object
Represents the concept of a data serialization format. Data 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.
This is a base class used by format subclasses for specific types of data, such as triples and tuples
When a subclass of this class is declared all upper case static fields that are dictionaries are converted to class instances. Data in the dictionary is passed as arguments to the constructor.
Initialize a new format object.
name â Human-readable name of the format.
mime_types â A list of MIME types used for this format. The first element of this list will be used as the content-type header during uploads.
charset â Character set used by the format.
file_extensions â List of file extensions for this format.
register â If True file extensions will be added to the map used by Format.format_for_file_name()
.
Try to guess appropriate RDF format from a file name. Return a pair (format, compression) where format is an RDF format or None (if no matching format was found) and compression is a supported compression method (currently either None or âgzipâ).
filename (string) â File path.
Format (or None
) and compression type.
(RDFFormat|None, string|None)
Get the preferred MIME type for a data format. Raise an error if the format is None. The format can be a string, in which case it is returned as-is.
output_format (franz.openrdf.rio.formats.Format|str) â the format to get the MIME type for.
A MIME type.
string
Register a format object.
Bases: type
Bases: Format
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 others are not; this is indicated by the value of supports_contexts field. Similaraly, formats for which the supports_attributes flag is True are capable of encoding triple attributes.
Initialize a new RDF format object.
name â Human-readable name of the format.
mime_types â A list of MIME types used for this format. The first element of this list will be used as the content-type header during uploads.
charset â Character set used by the format.
file_extensions â List of file extensions for this format.
supports_namespaces â If true, the format supports namespaces and qualified names. This has no impact on the Python API.
supports_contexts â If True the format can store quads (and not just triples).
supports_attributes â If True the format can represent triple attributes.
register â If True file extensions will be added to the map used by Format.format_for_file_name()
.
Bases: RDFWriter
Records the format as NTriples, and records the âfilePathâ where the serialized RDF will be output to. If âfilePathâ is None, output is to standard output.
TODO: THERE IS A WRITER PROTOCOL IMPLEMENTED IN RDFXMLWriter THAT ISNâT IMPLEMENTED HERE. CONSIDER ADDING IT (OR NOT).
Bases: object
Bases: RDFWriter
An implementation of the RDFWriter interface that writes RDF documents in XML-serialized RDF format. This records the format as RDF/XML, and records the âfilePathâ where the serialized RDF will be output to. If âfilePathâ is None, output is to standard output.
Bases: Format
Serialization formats for tuples returned by queries. See Format
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4