public class TcProviderMultiplexer extends Object implements TcProvider
| Modifier and Type | Field and Description |
|---|---|
protected SortedSet<WeightedTcProvider> |
providerList |
| Constructor and Description |
|---|
TcProviderMultiplexer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWeightedTcProvider(WeightedTcProvider provider)
Registers a provider
|
Graph |
createGraph(IRI name)
Creates an initially empty
Graph with a specified name |
ImmutableGraph |
createImmutableGraph(IRI name,
Graph triples)
Creates a
ImmutableGraph with a specified name |
void |
deleteGraph(IRI name)
Deletes the
ImmutableGraph or Graph of a specified name. |
Graph |
getGraph(IRI name)
This method is used to get a
Graph indifferently
whether it's a ImmutableGraph or not. |
ImmutableGraph |
getImmutableGraph(IRI name)
Get a
ImmutableGraph by its name |
Graph |
getMGraph(IRI name)
Get an
Graph taht is not ImmutableGrah. |
Set<IRI> |
getNames(ImmutableGraph ImmutableGraph)
get a set of the names of a
ImmutableGraph |
SortedSet<WeightedTcProvider> |
getProviderList() |
protected void |
graphAppears(IRI name)
subclasses overwrite this method to be notified when a new
ImmutableGraph is available (either because it has been created or being
provided by a newly added WeightedTcProvider).
|
boolean |
isCachingEnabled() |
Set<IRI> |
listGraphs()
Lists the name of the
Graphs available through this
TcProvider indifferently whether they are mutables or
immutables, implementations may take into account the security context and
omit Graphs for which access is not allowed. |
Set<IRI> |
listImmutableGraphs()
Lists the name of the
ImmutableGraphs available through this
TcProvider, implementations may take into account the
security context and omit ImmutableGraphs for which access is not
allowed. |
Set<IRI> |
listMGraphs()
Lists the name of the
Graphs available through this
TcProvider that are not ImmutableGraph, implementations may take into account the
security context and omit Graphs for which access is not
allowed. |
protected void |
mGraphAppears(IRI name)
subclasses overwrite this method to be notified when a new
Graph is available (either because it has been created or being
provided by a newly added WeightedTcProvider).
|
void |
removeWeightedTcProvider(WeightedTcProvider provider)
Unregister a provider
|
void |
setCachingEnabled(boolean isCachingEnabled) |
protected void |
tcDisappears(IRI name)
subclasses overwrite this method to be notified whenGraph is
no longer available (either because it has been deleted or bacause its
WeightedTcProvider was removed).
|
protected SortedSet<WeightedTcProvider> providerList
public void addWeightedTcProvider(WeightedTcProvider provider)
provider - the provider to be registeredpublic void removeWeightedTcProvider(WeightedTcProvider provider)
provider - the provider to be deregisteredprotected void graphAppears(IRI name)
name - protected void mGraphAppears(IRI name)
name - protected void tcDisappears(IRI name)
name - public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException
TcProviderImmutableGraph by its namegetImmutableGraph in interface TcProvidername - the name of the ImmutableGraphImmutableGraph with the specified nameNoSuchEntityException - if there is no ImmutableGraph
with the specified namepublic Graph getMGraph(IRI name) throws NoSuchEntityException
TcProviderGraph taht is not ImmutableGrah. The instances
returned in different invocations are equals.getMGraph in interface TcProvidername - the name of the GraphGraph with the specified nameNoSuchEntityException - if there is no Graph
with the specified namepublic Graph getGraph(IRI name) throws NoSuchEntityException
TcProviderGraph indifferently
whether it's a ImmutableGraph or not. If the name names an
Graph the result is the same as when invoking
getMGraph with that argument, analogously for
ImmutableGraphS the method returns an instance equals to what
getImmutableGraph would return.getGraph in interface TcProvidername - the name of the ImmutableGraph or GraphImmutableGraph or GraphNoSuchEntityException - if there is no ImmutableGraph
or Graph with the specified namepublic Graph createGraph(IRI name) throws UnsupportedOperationException
TcProviderGraph with a specified namecreateGraph in interface TcProvidername - names the new GraphGraphUnsupportedOperationException - if this provider doesn't support
creating GraphSpublic ImmutableGraph createImmutableGraph(IRI name, Graph triples)
TcProviderImmutableGraph with a specified namecreateImmutableGraph in interface TcProvidername - the name of the ImmutableGraph to be createdtriples - the triples of the new ImmutableGraphImmutableGraphpublic void deleteGraph(IRI name)
TcProviderImmutableGraph or Graph of a specified name.
If name references a ImmutableGraph and the ImmutableGraph has other names, it
will still be available with those other names.deleteGraph in interface TcProvidername - the entity to be removedpublic Set<IRI> getNames(ImmutableGraph ImmutableGraph)
TcProviderImmutableGraphgetNames in interface TcProviderImmutableGraph, the set is empty if
ImmutableGraph is unknownpublic Set<IRI> listGraphs()
TcProviderGraphs available through this
TcProvider indifferently whether they are mutables or
immutables, implementations may take into account the security context and
omit Graphs for which access is not allowed.listGraphs in interface TcProviderGraphspublic Set<IRI> listMGraphs()
TcProviderGraphs available through this
TcProvider that are not ImmutableGraph, implementations may take into account the
security context and omit Graphs for which access is not
allowed.listMGraphs in interface TcProviderGraphspublic Set<IRI> listImmutableGraphs()
TcProviderImmutableGraphs available through this
TcProvider, implementations may take into account the
security context and omit ImmutableGraphs for which access is not
allowed.listImmutableGraphs in interface TcProviderImmutableGraphspublic SortedSet<WeightedTcProvider> getProviderList()
public boolean isCachingEnabled()
public void setCachingEnabled(boolean isCachingEnabled)
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.