public class Serializer extends Object
serialize to transform a
ImmutableGraph into serialized RDF forms.
Functionality is delegated to registered SerializingProviders. Such
SerializingProviders can be registered and unregistered, later
registered SerializingProviders shadow previously registered
providers for the same format.
Note on synchronization: SerializingProviders must be able to
handle concurrent requests.| Constructor and Description |
|---|
Serializer()
the constructor sets the singleton instance to allow instantiation
by OSGi-DS.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext componentContext) |
protected void |
bindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin) |
void |
bindSerializingProvider(SerializingProvider provider)
Registers a Serializing provider
|
protected void |
deactivate(org.osgi.service.component.ComponentContext componentContext) |
static Serializer |
getInstance()
This returns the singleton instance, if an instance has been previously
created (e.g.
|
Set<String> |
getSupportedFormats()
Get a set of supported formats
|
void |
serialize(OutputStream serializedGraph,
Graph tc,
String formatIdentifier)
Serializes a ImmutableGraph into an OutputStream.
|
protected void |
unbindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin) |
void |
unbindSerializingProvider(SerializingProvider provider)
Unregister a Serializing provider
|
public Serializer()
getInstance method should be used.public static Serializer getInstance()
protected void activate(org.osgi.service.component.ComponentContext componentContext)
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
public void serialize(OutputStream serializedGraph, Graph tc, String formatIdentifier) throws UnsupportedFormatException
serializedGraph - an outputStream into which the ImmutableGraph will be serializedtc - the Graph to be serializedformatIdentifier - a string specifying the serialization format (usually the
MIME-type)UnsupportedFormatExceptionpublic Set<String> getSupportedFormats()
public void bindSerializingProvider(SerializingProvider provider)
provider - the provider to be registeredpublic void unbindSerializingProvider(SerializingProvider provider)
provider - the provider to be unregisteredprotected void bindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
protected void unbindConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.