public class Syntax extends Object
register(Syntax)
method.
You can chose to use a Syntax in your application without registering it.Modifier and Type | Field and Description |
---|---|
static Syntax |
JsonLd
RDF syntax JSON-LD.
|
static Syntax |
Nquads
RDF syntax N-Quads.
|
static Syntax |
Ntriples
RDF syntax N-Triples.
|
static Syntax |
RdfJson
RDF syntax RDF/JSON.
|
static Syntax |
RdfXml
RDF syntax RDF/XML.
|
static Syntax |
Trig
RDF syntax TriG.
|
static Syntax |
Trix
RDF syntax TriX.
|
static Syntax |
Turtle
RDF syntax Turtle.
|
Constructor and Description |
---|
Syntax(String name,
List<String> mimeTypes,
List<String> filenameExtensions)
Generate a new Syntax
|
Syntax(String name,
List<String> mimeTypes,
List<String> filenameExtensions,
boolean registerItNow)
Generate a new Syntax and register it
|
Syntax(String name,
String mimeType,
String filenameExtension)
Generate a new Syntax
|
Syntax(String name,
String mimeType,
String filenameExtension,
boolean registerItNow)
Generate a new Syntax and register it
|
Modifier and Type | Method and Description |
---|---|
static Collection<Syntax> |
collection()
list all available syntaxes.
|
boolean |
equals(Object obj) |
static Syntax |
forFileName(String fileName)
return the RDF syntax for the given filename by looking at its file
extension.
|
static Syntax |
forMimeType(String mimeType)
return the RDF syntax with the given MIME-type.
|
static Syntax |
forName(String name)
return the RDF syntax with the given name.
|
String |
getFilenameExtension() |
List<String> |
getFilenameExtensions() |
String |
getMimeType()
return the default MIME-type of this format.
|
List<String> |
getMimeTypes()
return all MIME-typse of this format.
|
String |
getName() |
int |
hashCode() |
static List<Syntax> |
list()
Deprecated.
Use #collection() instead
|
static void |
register(Syntax syntax)
register a new RDF Syntax you want to have available throughout your
application.
|
static void |
resetFactoryDefaults() |
String |
toString() |
static boolean |
unregister(Syntax syntax)
unregister an RDF Syntax from which you know that your application will
never ever support it.
|
public static final Syntax RdfXml
public static final Syntax Turtle
public static final Syntax Ntriples
public static final Syntax Nquads
public static final Syntax Trix
public static final Syntax Trig
public static final Syntax RdfJson
public static final Syntax JsonLd
public Syntax(String name, String mimeType, String filenameExtension)
name
- the name of the RDF syntaxmimeTypes
- the MIMEtype of the RDF syntaxfilenameExtensions
- including the dotpublic Syntax(String name, String mimeType, String filenameExtension, boolean registerItNow)
name
- the name of the RDF syntaxmimeTypes
- the MIMEtypes of the RDF syntaxfilenameExtensions
- including the dotregisterItNow
- register the new Syntax now.public Syntax(String name, List<String> mimeTypes, List<String> filenameExtensions)
name
- the name of the RDF syntaxmimeTypes
- the MIMEtypes of the RDF syntax, the first type in the ordered
list will be used as the defaultfilenameExtensions
- including the dot, the first type in the ordered list will be
used as the defaultpublic Syntax(String name, List<String> mimeTypes, List<String> filenameExtensions, boolean registerItNow)
name
- the name of the RDF syntaxmimeTypes
- the MIMEtypes of the RDF syntax, the first type in the ordered
list will be used as the defaultfilenameExtensions
- including the dot, the first type in the ordered list will be
used as the defaultregisterItNow
- register the new Syntax now.public static void resetFactoryDefaults()
public static void register(Syntax syntax)
syntax
- the new syntax to register.public static Syntax forName(String name)
name
- the name of the syntax to searchnull
, if none registeredpublic static Syntax forMimeType(String mimeType)
mimeTypes
- the MIME-type of the syntax to findnull
, if none registeredpublic static Syntax forFileName(String fileName)
fileName
- a file name to determine the file extensionnull
, if none registeredpublic static boolean unregister(Syntax syntax)
syntax
- the syntax to unregisterpublic static Collection<Syntax> collection()
@Deprecated public static List<Syntax> list()
public String getMimeType()
public List<String> getMimeTypes()
public String getName()
public String getFilenameExtension()
public List<String> getFilenameExtensions()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2005–2019 IT-Consulting Dr. Max Völkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.