| org.ontoware.rdfreactor.runtime.ReactorBase
All known Subclasses: org.ontoware.rdfreactor.runtime.ReactorBaseImpl,
ReactorBase | public interface ReactorBase extends ResourceEntity(Code) | | ReactorBase is the Interface which has to be implemented by all
classes used to represent the RDFS or OWL ontology.
author: mvo |
Method Summary | |
public boolean | add(URI prop, Object o) Adds a statement (this, prop, o). | public boolean | add(URI prop, Object o, int maxCard) | public Object | castTo(java.lang.Class> targetType) | public void | delete() | public Object | get(URI prop, java.lang.Class> returnType) This method is useful for functional properties.
Parameters: prop - the first x in (this, prop, x) if such a statement is in themodel. | public Object[] | getAll(URI prop, java.lang.Class> returnType) Get all predicates x of triples matching (this, prop, x)
Parameters: prop - an array of x with (this, prop, x) if such statements are in themodel. | public Model | getModel() | public URI | getRDFSClassURI() | public boolean | in(Model model) | public boolean | isInstanceof(URI classURI) | public boolean | isInstanceof(java.lang.Class> javaClass) | public boolean | remove(URI prop, Object o) Tries to remove a statement (this, prop, o). | public boolean | remove(URI prop, Object o, int minCard) | public boolean | removeAll(URI prop) | public void | set(URI prop, Object o) Removes all statements (this, prop, x) and set one anew: (this, prop, o). | public void | setAll(URI prop, Object[] o) Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]),
(this, prop, o[1]), ... | public void | setAll(URI prop, Object[] o, int maxCard) Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]),
(this, prop, o[1]), ... | public boolean | update(URI prop, Object oldValue, Object newValue) Looks for a statement (this, prop, oldValue) and replaces it by a new
statement (this, prop, newValue). |
add | public boolean add(URI prop, Object o, int maxCard) throws CardinalityException, ModelRuntimeException(Code) | | Adds a statement (this, prop, o) if the number of statements matching
(this, prop, x) is less then maxCard
Parameters: property - Parameters: object - maxCard,number of occurences of (this, prop, x) allowed in the model true if value was already preset throws: CardinalityException - |
castTo | public Object castTo(java.lang.Class> targetType)(Code) | | Parameters: targetType - any java class that extends ReactorBase directly or indirectly a reference to a new object seeing this object as a 'targetType' |
delete | public void delete()(Code) | | remove all (this, rdf:type, ANY) statements
|
getAll | public Object[] getAll(URI prop, java.lang.Class> returnType)(Code) | | Get all predicates x of triples matching (this, prop, x)
Parameters: prop - an array of x with (this, prop, x) if such statements are in themodel. Empty array otherwise. |
getModel | public Model getModel()(Code) | | the model for which this instance acts as a view |
getRDFSClassURI | public URI getRDFSClassURI()(Code) | | the URI of the rdfs:Class, as which this resource is viewed |
in | public boolean in(Model model)(Code) | | Parameters: model - and RDG2GO model true, iff this resource is contained in any statement of themodel |
remove | public boolean remove(URI prop, Object o)(Code) | | Tries to remove a statement (this, prop, o).
Parameters: prop - Parameters: o - true if old value was found |
remove | public boolean remove(URI prop, Object o, int minCard) throws CardinalityException(Code) | | Tries to remove a statement (this, prop, o) if the number of statements
matching (this, prop, x) in the model is less then minCard
Parameters: prop - Parameters: o - minCard,number of occurences of (this, prop, x) needed in the model true if value was found throws: CardinalityException - |
removeAll | public boolean removeAll(URI prop)(Code) | | Remove all values of this property (same as remove(this, prop, *)
Parameters: prop - the URI to be removed true if at least on value was found and removed |
set | public void set(URI prop, Object o)(Code) | | Removes all statements (this, prop, x) and set one anew: (this, prop, o).
Parameters: prop - Parameters: o - |
setAll | public void setAll(URI prop, Object[] o) throws ModelRuntimeException(Code) | | Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]),
(this, prop, o[1]), ...
Parameters: prop - Parameters: o - throws: Exception - |
setAll | public void setAll(URI prop, Object[] o, int maxCard) throws ModelRuntimeException, CardinalityException(Code) | | Removes all statements (this, prop, x) and sets anew: (this, prop, o[0]),
(this, prop, o[1]), ... But only if the number of objects in o[] is less
than or equal to maxCard
Parameters: prop - Parameters: o - Parameters: maxCard - is the maximum number of triples allowed to match (this, prop,x) throws: Exception - throws: CardinalityException - |
update | public boolean update(URI prop, Object oldValue, Object newValue) throws ModelRuntimeException(Code) | | Looks for a statement (this, prop, oldValue) and replaces it by a new
statement (this, prop, newValue). If the first cannot be found, false is
returned, true otherwise.
Parameters: prop - Parameters: oldValue - Parameters: newValue - true, if old value was found in the model throws: Exception - |
|
|