|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.clerezza.rdf.core.access.TcProviderMultiplexer
public class TcProviderMultiplexer
This makes a set of WeightedTcProvider appear as one TcProvider. It delegates requests to the WeightedTcProvider with the highest Weight
| Constructor Summary | |
|---|---|
TcProviderMultiplexer()
|
|
| Method Summary | |
|---|---|
void |
addWeightedTcProvider(WeightedTcProvider provider)
Registers a provider |
Graph |
createGraph(UriRef name,
TripleCollection triples)
Creates a Graph with a specified name |
LockableMGraph |
createMGraph(UriRef name)
Creates an initially empty MGraph with a specified name |
void |
deleteTripleCollection(UriRef name)
Deletes the Graph or MGraph of a specified name. |
Graph |
getGraph(UriRef name)
Get a Graph by its name |
LockableMGraph |
getMGraph(UriRef name)
Get an MGraph by its name. |
Set<UriRef> |
getNames(Graph graph)
get a set of the names of a Graph |
SortedSet<WeightedTcProvider> |
getProviderList()
|
TripleCollection |
getTriples(UriRef name)
This method is used to get a TripleCollection indifferently
whether it's a Graph or an MGraph. |
protected void |
graphAppears(UriRef 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). |
Set<UriRef> |
listGraphs()
Lists the name of the Graphs available through this
TcProvider, implementations may take into account the
security context and omit Graphs for which access is not
allowed. |
Set<UriRef> |
listMGraphs()
Lists the name of the MGraphs available through this
TcProvider, implementations may take into account the
security context and omit MGraphs for which access is not
allowed. |
Set<UriRef> |
listTripleCollections()
Lists the name of the TripleCollections available through this
TcProvider indifferently whether they are Graphs or an
MGraphs, implementations may take into account the security context and
omit TripleCollections for which access is not allowed. |
protected void |
mGraphAppears(UriRef name)
subclasses overwrite this method to be notified when a new MGraph is available (either because it has been created or being provided by a newly added WeightedTcProvider). |
void |
removeWeightedTcProvider(WeightedTcProvider provider)
Unregister a provider |
protected void |
tcDisappears(UriRef name)
subclasses overwrite this method to be notified whenTripleCollection is no longer available (either because it has been deleted or bacause its WeightedTcProvider was removed). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TcProviderMultiplexer()
| Method Detail |
|---|
public void addWeightedTcProvider(WeightedTcProvider provider)
provider - the provider to be registeredpublic void removeWeightedTcProvider(WeightedTcProvider provider)
provider - the provider to be deregisteredprotected void graphAppears(UriRef name)
name - protected void mGraphAppears(UriRef name)
name - protected void tcDisappears(UriRef name)
name -
public Graph getGraph(UriRef name)
throws NoSuchEntityException
TcProviderGraph by its name
getGraph in interface TcProvidername - the name of the Graph
Graph with the specified name
NoSuchEntityException - if there is no Graph
with the specified name
public LockableMGraph getMGraph(UriRef name)
throws NoSuchEntityException
TcProviderMGraph by its name. The instances
returned in different invocations are equals.
getMGraph in interface TcProviderMGraph with the specified name
NoSuchEntityException - if there is no MGraph
with the specified name
public TripleCollection getTriples(UriRef name)
throws NoSuchEntityException
TcProviderTripleCollection indifferently
whether it's a Graph or an MGraph. If the name names an
MGraph the result is the same as when invoking
getMGraph with that argument, analogously for
GraphS the method returns an instance equals to what
getGraph would return.
getTriples in interface TcProvidername - the name of the Graph or MGraph
Graph or MGraph
NoSuchEntityException - if there is no Graph
or MGraph with the specified name
public LockableMGraph createMGraph(UriRef name)
throws UnsupportedOperationException
TcProviderMGraph with a specified name
createMGraph in interface TcProvidername - names the new MGraph
MGraph
UnsupportedOperationException - if this provider doesn't support
creating MGraphS
public Graph createGraph(UriRef name,
TripleCollection triples)
TcProviderGraph with a specified name
createGraph in interface TcProvidername - the name of the Graph to be createdtriples - the triples of the new Graph
Graphpublic void deleteTripleCollection(UriRef name)
TcProviderGraph or MGraph of a specified name.
If name references a Graph and the graph has other names, it
will still be available with those other names.
deleteTripleCollection in interface TcProvidername - the entity to be removedpublic Set<UriRef> getNames(Graph graph)
TcProviderGraph
getNames in interface TcProviderGraph, the set is empty if
Graph is unknownpublic Set<UriRef> listGraphs()
TcProviderGraphs available through this
TcProvider, implementations may take into account the
security context and omit Graphs for which access is not
allowed.
listGraphs in interface TcProviderGraphspublic Set<UriRef> listMGraphs()
TcProviderMGraphs available through this
TcProvider, implementations may take into account the
security context and omit MGraphs for which access is not
allowed.
listMGraphs in interface TcProviderMGraphspublic Set<UriRef> listTripleCollections()
TcProviderTripleCollections available through this
TcProvider indifferently whether they are Graphs or an
MGraphs, implementations may take into account the security context and
omit TripleCollections for which access is not allowed.
listTripleCollections in interface TcProviderTripleCollectionspublic SortedSet<WeightedTcProvider> getProviderList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||