public class PropertiesFormat extends info.aduna.lang.FileFormat implements Iterable<PropertiesFormat>
Modifier and Type | Field and Description |
---|---|
static PropertiesFormat |
TEXT
Text properties file using
text/plain and
UTF-8 . |
static PropertiesFormat |
XML
XML properties file using
application/xml and
UTF-8 . |
Constructor and Description |
---|
PropertiesFormat(String name,
Collection<String> mimeTypes,
Charset charset,
Collection<String> fileExtensions)
Creates a new RDFFormat object.
|
Modifier and Type | Method and Description |
---|---|
static PropertiesFormat |
forMIMEType(String mimeType)
Tries to determine the appropriate file format based on the a MIME
type that describes the content type.
|
static PropertiesFormat |
forMIMEType(String mimeType,
PropertiesFormat fallback)
Tries to determine the appropriate file format based on the a MIME
type that describes the content type.
|
static Iterator<PropertiesFormat> |
getFormats()
Alternative static method signature.
|
Iterator<PropertiesFormat> |
iterator()
A thread-safe iterator that will visit all known formats (declared by
Iterable ). |
static void |
register(PropertiesFormat format)
Registers the specified format.
|
equals, getCharset, getDefaultFileExtension, getDefaultMIMEType, getFileExtensions, getMIMETypes, getName, hasCharset, hasDefaultFileExtension, hasDefaultMIMEType, hasFileExtension, hashCode, hasMIMEType, matchFileName, matchFileName, matchMIMEType, matchMIMEType, toString
public static final PropertiesFormat TEXT
text/plain
and
UTF-8
.public static final PropertiesFormat XML
application/xml
and
UTF-8
.public PropertiesFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions)
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.public Iterator<PropertiesFormat> iterator()
Iterable
).iterator
in interface Iterable<PropertiesFormat>
public static Iterator<PropertiesFormat> getFormats()
public static void register(PropertiesFormat format)
public static PropertiesFormat forMIMEType(String mimeType)
mimeType
- A MIME type, e.g. "text/html".PropertiesFormat
object if the MIME type was recognized, or
null otherwise.forMIMEType(String,PropertiesFormat)
,
FileFormat.getMIMETypes()
public static PropertiesFormat forMIMEType(String mimeType, PropertiesFormat fallback)
mimeType
- A file name.PropertiesFormat
that matches the MIME type, or the fallback format if
the extension was not recognized.forMIMEType(String)
,
FileFormat.getMIMETypes()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.