|
|||||||||
| Home >> All >> nl >> aidministrator >> rdf >> [ ral overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
nl.aidministrator.rdf.ral
Class SynchronizationRAL

java.lang.Objectnl.aidministrator.rdf.ral.SynchronizationRAL
- All Implemented Interfaces:
- RAL
- public class SynchronizationRAL
- extends java.lang.Object
- implements RAL
- extends java.lang.Object
An implementation of the Repository Abstraction Layer which handles synchronization between write- and read-threads. This RAL implements a policy where read-threads can run concurrently, but write-threads need exclusive access to the abstraction layer, including the blocking of read-threads. No guarantees are given on the order in which threads take turn. Once threads have started they can finish their jobs.
| Field Summary | |
protected RAL |
_persistentRAL
|
private int |
_readingThreads
|
private boolean |
_writeRequested
|
| Constructor Summary | |
SynchronizationRAL(RAL persistentRAL)
Creates a new SynchronizationRAL that adds synchronization to the supplied RAL. |
|
| Method Summary | |
private void |
_getReadLock()
|
private void |
_getWriteLock()
|
private void |
_releaseReadLock()
|
private void |
_releaseWriteLock()
|
void |
addClass(nl.aidministrator.rdf.sail.model.Resource classResource)
Adds a class to the repository. |
void |
addComment(nl.aidministrator.rdf.sail.model.Resource resource,
nl.aidministrator.rdf.sail.model.Literal comment)
Adds a comment for resource 'resource' to the repository. |
void |
addDataStatement(nl.aidministrator.rdf.sail.model.Resource subject,
nl.aidministrator.rdf.sail.model.Resource predicate,
nl.aidministrator.rdf.sail.model.Value object)
Adds a data statament to the repository. |
void |
addDomain(nl.aidministrator.rdf.sail.model.Resource property,
nl.aidministrator.rdf.sail.model.Resource domainClass)
Adds a domain restriction to the repository. |
void |
addInstance(nl.aidministrator.rdf.sail.model.Value dataValue,
nl.aidministrator.rdf.sail.model.Resource classResource)
Adds an instance of class 'classResource' to the repository. |
void |
addLabel(nl.aidministrator.rdf.sail.model.Resource resource,
nl.aidministrator.rdf.sail.model.Literal label)
Adds a label for resource 'resource' to the repository. |
void |
addProperty(nl.aidministrator.rdf.sail.model.Resource propertyResource)
Adds a property to the repository. |
void |
addRange(nl.aidministrator.rdf.sail.model.Resource property,
nl.aidministrator.rdf.sail.model.Resource rangeClass)
Adds a range restriction to the repository. |
void |
addSubClass(nl.aidministrator.rdf.sail.model.Resource subClass,
nl.aidministrator.rdf.sail.model.Resource superClass)
Adds a subclass-relation to the repository. |
void |
addSubProperty(nl.aidministrator.rdf.sail.model.Resource subProp,
nl.aidministrator.rdf.sail.model.Resource superProp)
Adds a subproperty-relation to the repository. |
void |
clearRepository()
Clears the repository. |
ResourceIterator |
getClasses()
Gets all defined classes. |
ResourceIterator |
getCommentsFor(nl.aidministrator.rdf.sail.model.Resource resource)
Gets all comments for the supplied resource. |
nl.aidministrator.rdf.sail.model.Value |
getDomainFor(nl.aidministrator.rdf.sail.model.Resource propertyResource)
Gets the domain for the supplied property. |
ResourceIterator |
getInstancesOf(nl.aidministrator.rdf.sail.model.Resource classResource,
boolean properInstances)
Gets all instances of the supplied class. |
ResourceIterator |
getLabelsFor(nl.aidministrator.rdf.sail.model.Resource resource)
Gets all labels for the supplied resource. |
NamespaceIterator |
getNamespaces()
Gets the prefix and name of all namespaces. |
ResourceIterator |
getProperties()
Gets all defined properties. |
nl.aidministrator.rdf.sail.model.Value |
getRangeFor(nl.aidministrator.rdf.sail.model.Resource propertyResource)
Gets the range for the supplied property. |
StatementIterator |
getStatements(nl.aidministrator.rdf.sail.model.Resource source,
nl.aidministrator.rdf.sail.model.Resource predicate,
nl.aidministrator.rdf.sail.model.Value target,
boolean recursive)
Gets all statements with a specific predicate and, possibly, with a specific source and/or target. |
ResourceIterator |
getSubClassesOf(nl.aidministrator.rdf.sail.model.Resource classResource,
boolean recursive)
Gets all subclasses of the supplied class. |
ResourceIterator |
getSubPropertiesOf(nl.aidministrator.rdf.sail.model.Resource propertyResource,
boolean recursive)
Gets all subproperties of the supplied property. |
ResourceIterator |
getSuperClassesOf(nl.aidministrator.rdf.sail.model.Resource classResource,
boolean recursive)
Gets all superclasses of the supplied class. |
ResourceIterator |
getSuperPropertiesOf(nl.aidministrator.rdf.sail.model.Resource propertyResource,
boolean recursive)
Gets all superproperties of the supplied property. |
void |
initialize(java.util.Map configParams)
Initializes the RAL using a set of configuration parameters. |
boolean |
isClass(nl.aidministrator.rdf.sail.model.Value resource)
Checks whether the supplied resource represents a class. |
boolean |
isComment(nl.aidministrator.rdf.sail.model.Resource source,
nl.aidministrator.rdf.sail.model.Literal target)
Checks whether a comment with the specified source and target exisits. |
boolean |
isInstanceOf(nl.aidministrator.rdf.sail.model.Value dataValue,
nl.aidministrator.rdf.sail.model.Resource classResource,
boolean properInstances)
Checks whether the supplied data resource is an instance of the supplied class. |
boolean |
isLabel(nl.aidministrator.rdf.sail.model.Resource source,
nl.aidministrator.rdf.sail.model.Literal target)
Checks whether a label with the specified source and target exisits. |
boolean |
isProperty(nl.aidministrator.rdf.sail.model.Value resource)
Checks whether the supplied resource represents a property. |
boolean |
isStatement(nl.aidministrator.rdf.sail.model.Resource source,
nl.aidministrator.rdf.sail.model.Resource predicate,
nl.aidministrator.rdf.sail.model.Value target,
boolean recursive)
Checks whether a specific statement is already present. |
boolean |
isSubClassOf(nl.aidministrator.rdf.sail.model.Value subClass,
nl.aidministrator.rdf.sail.model.Value superClass)
Checks whether one uri is a subclass of another (recursively). |
boolean |
isSubPropertyOf(nl.aidministrator.rdf.sail.model.Value subProperty,
nl.aidministrator.rdf.sail.model.Value superProperty)
Checks whether one property is a subproperty of another (recursively). |
void |
removeDataStatements(nl.aidministrator.rdf.sail.model.Resource subject,
nl.aidministrator.rdf.sail.model.Resource predicate,
nl.aidministrator.rdf.sail.model.Value object)
Removes data statements that match the (subject, predicate, object) pattern from the repository. |
void |
shutDown()
Allow the RAL to synchronize any stale data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
_persistentRAL
protected RAL _persistentRAL
_writeRequested
private boolean _writeRequested
_readingThreads
private int _readingThreads
| Constructor Detail |
SynchronizationRAL
public SynchronizationRAL(RAL persistentRAL)
- Creates a new SynchronizationRAL that adds synchronization to the
supplied RAL.
| Method Detail |
initialize
public void initialize(java.util.Map configParams) throws java.lang.Exception
- Description copied from interface:
RAL - Initializes the RAL using a set of configuration parameters. The
relevant names and values of the paramters are determined by the
implementation of this interface.
- Specified by:
initializein interfaceRAL
shutDown
public void shutDown()
- Description copied from interface:
RAL - Allow the RAL to synchronize any stale data. The RAL can assume that
shutDown() is called before an application is stopped.
addDataStatement
public void addDataStatement(nl.aidministrator.rdf.sail.model.Resource subject, nl.aidministrator.rdf.sail.model.Resource predicate, nl.aidministrator.rdf.sail.model.Value object) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a data statament to the repository. The RAL can assume that the
property 'predicate' has already been defined before.
- Specified by:
addDataStatementin interfaceRAL
addProperty
public void addProperty(nl.aidministrator.rdf.sail.model.Resource propertyResource) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a property to the repository.
- Specified by:
addPropertyin interfaceRAL
addClass
public void addClass(nl.aidministrator.rdf.sail.model.Resource classResource) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a class to the repository.
addInstance
public void addInstance(nl.aidministrator.rdf.sail.model.Value dataValue, nl.aidministrator.rdf.sail.model.Resource classResource) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds an instance of class 'classResource' to the repository. The RAL can
assume that the class 'classResource' has already been defined before.
- Specified by:
addInstancein interfaceRAL
addSubProperty
public void addSubProperty(nl.aidministrator.rdf.sail.model.Resource subProp, nl.aidministrator.rdf.sail.model.Resource superProp) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a subproperty-relation to the repository. The RAL can assume
that the two properties have already been defined before.
- Specified by:
addSubPropertyin interfaceRAL
addSubClass
public void addSubClass(nl.aidministrator.rdf.sail.model.Resource subClass, nl.aidministrator.rdf.sail.model.Resource superClass) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a subclass-relation to the repository. The RAL can assume
that the two classes have already been defined before.
- Specified by:
addSubClassin interfaceRAL
addDomain
public void addDomain(nl.aidministrator.rdf.sail.model.Resource property, nl.aidministrator.rdf.sail.model.Resource domainClass) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a domain restriction to the repository. The RAL can assume
that the property 'property' and the class 'domainClass' have already
been defined before.
addRange
public void addRange(nl.aidministrator.rdf.sail.model.Resource property, nl.aidministrator.rdf.sail.model.Resource rangeClass) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a range restriction to the repository. The RAL can assume
that the property 'property' and the class 'domainClass' have already
been defined before.
addComment
public void addComment(nl.aidministrator.rdf.sail.model.Resource resource, nl.aidministrator.rdf.sail.model.Literal comment) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a comment for resource 'resource' to the repository.
- Specified by:
addCommentin interfaceRAL
addLabel
public void addLabel(nl.aidministrator.rdf.sail.model.Resource resource, nl.aidministrator.rdf.sail.model.Literal label) throws java.sql.SQLException
- Description copied from interface:
RAL - Adds a label for resource 'resource' to the repository.
removeDataStatements
public void removeDataStatements(nl.aidministrator.rdf.sail.model.Resource subject, nl.aidministrator.rdf.sail.model.Resource predicate, nl.aidministrator.rdf.sail.model.Value object) throws java.sql.SQLException
- Description copied from interface:
RAL - Removes data statements that match the (subject, predicate, object)
pattern from the repository. subject, predicate, or object may each
be null, but at least one value must be specified.
- Specified by:
removeDataStatementsin interfaceRAL
clearRepository
public void clearRepository()
throws java.sql.SQLException
- Description copied from interface:
RAL - Clears the repository. After the repository was cleared, it should
be in the same state as after initialization.
- Specified by:
clearRepositoryin interfaceRAL
getNamespaces
public NamespaceIterator getNamespaces()
- Description copied from interface:
RAL - Gets the prefix and name of all namespaces.
- Specified by:
getNamespacesin interfaceRAL
getClasses
public ResourceIterator getClasses()
- Description copied from interface:
RAL - Gets all defined classes.
- Specified by:
getClassesin interfaceRAL
isClass
public boolean isClass(nl.aidministrator.rdf.sail.model.Value resource)
- Description copied from interface:
RAL - Checks whether the supplied resource represents a class.
getSubClassesOf
public ResourceIterator getSubClassesOf(nl.aidministrator.rdf.sail.model.Resource classResource, boolean recursive)
- Description copied from interface:
RAL - Gets all subclasses of the supplied class. Note that the subclass
relation is reflexive: a class is always a subclass of itself.
rdfs:Resource is assumed to be the superclass of all classes.
- Specified by:
getSubClassesOfin interfaceRAL
getSuperClassesOf
public ResourceIterator getSuperClassesOf(nl.aidministrator.rdf.sail.model.Resource classResource, boolean recursive)
- Description copied from interface:
RAL - Gets all superclasses of the supplied class. Note that the
superclass relation is reflexive: a class is always a superclass of
itself. rdfs:Resource is assumed to be the superclass of all
classes.
- Specified by:
getSuperClassesOfin interfaceRAL
isSubClassOf
public boolean isSubClassOf(nl.aidministrator.rdf.sail.model.Value subClass, nl.aidministrator.rdf.sail.model.Value superClass)
- Description copied from interface:
RAL - Checks whether one uri is a subclass of another (recursively).
rdfs:Resource is assumed to be the superclass of all classes.
- Specified by:
isSubClassOfin interfaceRAL
getProperties
public ResourceIterator getProperties()
- Description copied from interface:
RAL - Gets all defined properties.
- Specified by:
getPropertiesin interfaceRAL
isProperty
public boolean isProperty(nl.aidministrator.rdf.sail.model.Value resource)
- Description copied from interface:
RAL - Checks whether the supplied resource represents a property.
- Specified by:
isPropertyin interfaceRAL
getSubPropertiesOf
public ResourceIterator getSubPropertiesOf(nl.aidministrator.rdf.sail.model.Resource propertyResource, boolean recursive)
- Description copied from interface:
RAL - Gets all subproperties of the supplied property. Note that the
subproperty relation is reflexive: a property is always a
subproperty of itself.
- Specified by:
getSubPropertiesOfin interfaceRAL
getSuperPropertiesOf
public ResourceIterator getSuperPropertiesOf(nl.aidministrator.rdf.sail.model.Resource propertyResource, boolean recursive)
- Description copied from interface:
RAL - Gets all superproperties of the supplied property. Note that the
superproperty relation is reflexive: a property is always a
subproperty of itself.
- Specified by:
getSuperPropertiesOfin interfaceRAL
isSubPropertyOf
public boolean isSubPropertyOf(nl.aidministrator.rdf.sail.model.Value subProperty, nl.aidministrator.rdf.sail.model.Value superProperty)
- Description copied from interface:
RAL - Checks whether one property is a subproperty of another (recursively).
- Specified by:
isSubPropertyOfin interfaceRAL
getDomainFor
public nl.aidministrator.rdf.sail.model.Value getDomainFor(nl.aidministrator.rdf.sail.model.Resource propertyResource)
- Description copied from interface:
RAL - Gets the domain for the supplied property.
- Specified by:
getDomainForin interfaceRAL
getRangeFor
public nl.aidministrator.rdf.sail.model.Value getRangeFor(nl.aidministrator.rdf.sail.model.Resource propertyResource)
- Description copied from interface:
RAL - Gets the range for the supplied property.
- Specified by:
getRangeForin interfaceRAL
getInstancesOf
public ResourceIterator getInstancesOf(nl.aidministrator.rdf.sail.model.Resource classResource, boolean properInstances)
- Description copied from interface:
RAL - Gets all instances of the supplied class. Everything is an instance
of rdfs:Resource.
- Specified by:
getInstancesOfin interfaceRAL
isInstanceOf
public boolean isInstanceOf(nl.aidministrator.rdf.sail.model.Value dataValue, nl.aidministrator.rdf.sail.model.Resource classResource, boolean properInstances)
- Description copied from interface:
RAL - Checks whether the supplied data resource is an instance of the supplied
class. Everything is an instance of rdfs:Resource.
- Specified by:
isInstanceOfin interfaceRAL
getCommentsFor
public ResourceIterator getCommentsFor(nl.aidministrator.rdf.sail.model.Resource resource)
- Gets all comments for the supplied resource.
- Specified by:
getCommentsForin interfaceRAL
isComment
public boolean isComment(nl.aidministrator.rdf.sail.model.Resource source, nl.aidministrator.rdf.sail.model.Literal target)
- Checks whether a comment with the specified source and target exisits.
getLabelsFor
public ResourceIterator getLabelsFor(nl.aidministrator.rdf.sail.model.Resource resource)
- Gets all labels for the supplied resource.
- Specified by:
getLabelsForin interfaceRAL
isLabel
public boolean isLabel(nl.aidministrator.rdf.sail.model.Resource source, nl.aidministrator.rdf.sail.model.Literal target)
- Checks whether a label with the specified source and target exisits.
getStatements
public StatementIterator getStatements(nl.aidministrator.rdf.sail.model.Resource source, nl.aidministrator.rdf.sail.model.Resource predicate, nl.aidministrator.rdf.sail.model.Value target, boolean recursive)
- Description copied from interface:
RAL - Gets all statements with a specific predicate and, possibly, with
a specific source and/or target. 'source' and 'target' parameters may
be null to indicate wildcards.
- Specified by:
getStatementsin interfaceRAL
isStatement
public boolean isStatement(nl.aidministrator.rdf.sail.model.Resource source, nl.aidministrator.rdf.sail.model.Resource predicate, nl.aidministrator.rdf.sail.model.Value target, boolean recursive)
- Description copied from interface:
RAL - Checks whether a specific statement is already present.
- Specified by:
isStatementin interfaceRAL
_getWriteLock
private void _getWriteLock()
_releaseWriteLock
private void _releaseWriteLock()
_getReadLock
private void _getReadLock()
_releaseReadLock
private void _releaseReadLock()
|
|||||||||
| Home >> All >> nl >> aidministrator >> rdf >> [ ral overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
nl.aidministrator.rdf.ral.SynchronizationRAL