|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.clerezza.rdf.core.serializedform.Parser
public class Parser
This singleton class provides a method parse to transform
serialized RDF forms into Graphs.
Functionality is delegated to registered ParsingProviders. Such
ParsingProviders can be registered and unregistered, later
registered ParsingProviders shadow previously registered
providers for the same format.
Note on synchronization: ParsingProviders must be able to handle
concurrent requests.
| Constructor Summary | |
|---|---|
Parser()
the constructor sets the singleton instance to allow instantiation by OSGi-DS. |
|
| Method Summary | |
|---|---|
void |
bindParsingProvider(ParsingProvider provider)
Registers a parsing provider |
static Parser |
getInstance()
This returns the singleton instance, if an instance has been previously created (e.g. |
Set<String> |
getSupportedFormats()
Get a set of supported formats |
Graph |
parse(InputStream serializedGraph,
String formatIdentifier)
Parses a serialized Graph from an InputStream. |
Graph |
parse(InputStream serializedGraph,
String formatIdentifier,
UriRef baseUri)
Parses a serialized Graph from an InputStream. |
void |
parse(MGraph target,
InputStream serializedGraph,
String formatIdentifier)
Parses a serialized Graph from an InputStream. |
void |
parse(MGraph target,
InputStream serializedGraph,
String formatIdentifier,
UriRef baseUri)
Parses a serialized Graph from an InputStream. |
void |
unbindParsingProvider(ParsingProvider provider)
Unregister a parsing provider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parser()
getInstance method should be used.
| Method Detail |
|---|
public static Parser getInstance()
public Graph parse(InputStream serializedGraph,
String formatIdentifier)
throws UnsupportedFormatException
serializedGraph - an inputstream with the serializationformatIdentifier - a string identifying the format (usually the MIME-type)
UnsupportedFormatException
public void parse(MGraph target,
InputStream serializedGraph,
String formatIdentifier)
throws UnsupportedFormatException
target - the MGraph to which the parsed triples are addedserializedGraph - an inputstream with the serializationformatIdentifier - a string identifying the format (usually the MIME-type)
UnsupportedFormatException
public Graph parse(InputStream serializedGraph,
String formatIdentifier,
UriRef baseUri)
throws UnsupportedFormatException
serializedGraph - an inputstream with the serializationformatIdentifier - a string identifying the format (usually the MIME-type)baseUri - the uri against which relative uri-refs are evaluated
UnsupportedFormatException
public void parse(MGraph target,
InputStream serializedGraph,
String formatIdentifier,
UriRef baseUri)
throws UnsupportedFormatException
target - the MGraph to which the parsed triples are addedserializedGraph - an inputstream with the serializationformatIdentifier - a string identifying the format (usually the MIME-type)baseUri - the uri against which relative uri-refs are evaluated
UnsupportedFormatExceptionpublic Set<String> getSupportedFormats()
public void bindParsingProvider(ParsingProvider provider)
provider - the provider to be registeredpublic void unbindParsingProvider(ParsingProvider provider)
provider - the provider to be deregistered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||