public abstract class SchemaSanitizingObjectSupport extends ResourceObjectSupport implements SchemaSanitizingObject
sanitizeSchema(Resource) method is called the resources values
are made compliant to the schema, e.g. the inverse relation is inserted for a property
that is declared symmetric.
Currently the following schema features are handled by this support class:
rdfs:subPropertyOf: Values set for a subproperty are also set for superproperties.
Values not set for superproperties are removed from subproperties.owl:SymmetricProperty: If Y is the value of a property of this resource then this resource is
also a value for Y (of the respective property).owl:TransitiveProperty: If this resource is in relation to Y and Y to Z by a certain property
then Z is also set as a value of this resources property.owl:inverseOf: The inverse relation is set for all inverse properties.GET_CONNECTION, GET_RESOURCE| Constructor and Description |
|---|
SchemaSanitizingObjectSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
removeValue(String propertyIri,
Object value)
Removes a value from the property given and all its subproperties.
|
boolean |
sanitizeSchema(org.openrdf.model.Resource propertyUri)
Updates the repository in order to comply to the schema information present in it.
|
boolean |
sanitizeSchema(String propertyUri)
Updates the repository in order to comply to the schema information present in it.
|
delete, getResource, getResourceAsString, getTriples, setResource, setResourceAsStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, getResourceAsString, getTriples, setResource, setResourceAsStringgetObjectConnection, getResourceprotected boolean removeValue(String propertyIri, Object value)
sanitizeSchema(String) later.
Important: It may be necessary to refresh cached values for this property afterwards with
Refreshable.refresh(). Otherwise getter-methods may return old values.removeValue("http://example.org/foo", myValue);((PropertySet) getFoo()).refresh();propertyIri - The IRI of the property from which the value should be removed.value - The value that should be removed.public boolean sanitizeSchema(org.openrdf.model.Resource propertyUri)
sanitizeSchema in interface SchemaSanitizingObjectpropertyUri - The IRI of the property which values have changed. This must be the only property that
changed so that sub-/superproperties receive correct values.public boolean sanitizeSchema(String propertyUri)
sanitizeSchema in interface SchemaSanitizingObjectpropertyUri - The URI of the property which values have changed. This must be the only property that
changed so that sub-/superproperties receive correct values.Copyright © 2017 Chair of Distributed Information Systems - University of Passau. All rights reserved.