|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RelationshipAndPropertyManager
Manager for relationships and properties.
Method Summary | |
---|---|
void |
addLinkContentLocation(java.lang.String oid,
RawContentLocation location)
Registers a location for the content of the information object |
void |
addReference(java.lang.String sourceoid,
java.lang.String targetoid,
java.lang.String role,
java.lang.String secondaryRole,
long position,
java.lang.String propagationRule)
Adds a new reference between two information objects. |
long |
countReferences(java.lang.String oid,
boolean isSource,
java.lang.String role,
java.lang.String secondaryRole)
Counts the references of an object |
java.lang.String |
createInfoObject(java.lang.String name,
java.lang.String type,
BasicStorageHints hints)
Creates a new information object |
boolean |
existsInfoObject(java.lang.String oid)
Checks, whether an information object with the given ID exists. |
boolean |
existsReference(java.lang.String sourceoid,
java.lang.String targetoid,
java.lang.String role,
java.lang.String secondaryRole)
Check if a reference exists |
BasicInfoObjectDescription |
getInfoObjectDescription(java.lang.String oid)
Retrieves an existing information object with all available information |
BasicInfoObjectDescription |
getInfoObjectDescription(java.lang.String oid,
boolean includeProperties,
boolean includeReferences,
boolean includeReferred)
Retrieves an existing information object with some tuning parameters, to remove un-required information |
BasicPropertyDescription |
getProperty(java.lang.String oid,
java.lang.String name)
Retrieves a particular property of an information object |
BasicReferenceDescription |
getReference(java.lang.String sourceoid,
java.lang.String targetoid)
Retrieves a single references which point from this source object to the target object. |
boolean |
hasProperty(java.lang.String oid,
java.lang.String name)
Returns whether an information object has a particular property set |
boolean |
hasRawContent(java.lang.String oid)
Returns whether there exists raw content associated with an information object |
boolean |
removeAllRawContentOf(java.lang.String oid,
BasicStorageHints hints)
Unregisters all locations for the content of the information object and deletes the content physically. |
boolean |
removeInfoObject(java.lang.String oid)
Deletes an information object. |
boolean |
removeLinkContentLocation(RawContentLocation location)
Unregisters a location for the content of the information object |
boolean |
removeReference(java.lang.String sourceoid,
java.lang.String targetoid,
java.lang.String role,
java.lang.String secondaryRole)
Deletes any reference with having the given parameters. CAUTION: This propagates deletion events as defined in the propagation rule of the reference. |
java.util.List<RawContentLocation> |
retrieveObjectContentLocations(java.lang.String oid)
Retrieves all locations where the content can be accessed |
java.util.Map<java.lang.String,BasicPropertyDescription> |
retrieveObjectProperties(java.lang.String oid)
Retrieves all properties of an information object |
java.util.List<java.lang.String> |
retrieveOIDByProperty(java.lang.String name,
java.lang.String value)
Retrieves all object IDs of information object for which a particular property value has been set |
java.util.List<BasicReferenceDescription> |
retrieveReferences(java.lang.String sourceoid,
java.lang.String role,
java.lang.String secondaryRole)
Retrieves all references which point from this source object to some other object. |
java.util.List<BasicReferenceDescription> |
retrieveReferencesOrderedByPosition(java.lang.String sourceoid,
java.lang.String role,
java.lang.String secondaryRole)
Retrieves all references which point from this source object and order those based on the position. |
java.util.List<BasicReferenceDescription> |
retrieveReferred(java.lang.String targetoid,
java.lang.String role,
java.lang.String secondaryRole)
Retrieves all references which point to this target object. |
java.util.List<java.lang.String> |
retrieveReferredSourceOIDs(java.lang.String targetoid,
java.lang.String role,
java.lang.String secondaryRole)
Retrieves all object OIDs of information object, which have a reference to this target object. |
java.util.List<java.lang.String> |
retrieveReferredTargetOIDs(java.lang.String sourceoid,
java.lang.String role,
java.lang.String secondaryRole)
Retrieves all object OIDs of information object, which have a reference from this source object. |
void |
setProperty(java.lang.String oid,
java.lang.String name,
java.lang.String type,
java.lang.String value)
Sets the storage property of a given name for a particular information object. |
boolean |
unsetProperty(java.lang.String oid,
java.lang.String name)
Removes a property (or all properties) of an information object |
void |
updateLinkContentLocations(java.lang.String oid,
RawContentLocation newestLocation)
Updates the locations for the content of the information object |
Method Detail |
---|
java.lang.String createInfoObject(java.lang.String name, java.lang.String type, BasicStorageHints hints) throws BaseLayerException
name
- a human readable name (does not need to be unique, can also be null)type
- the type of the information objecthints
- hints that should be taken into account, e.g. BasicStorageHints#HINT_NAME_PREDEFINED_ID
.
BaseLayerException
- if something goes wrongBasicInfoObjectDescription getInfoObjectDescription(java.lang.String oid) throws BaseLayerException
oid
- the object ID of the object
BaseLayerException
- if something goes wrongboolean existsInfoObject(java.lang.String oid) throws BaseLayerException
oid
- the object ID of the object
BaseLayerException
- if something goes wrongBasicInfoObjectDescription getInfoObjectDescription(java.lang.String oid, boolean includeProperties, boolean includeReferences, boolean includeReferred) throws BaseLayerException
oid
- the object ID of the objectincludeProperties
- if set to true, properties will be retrieved; otherwise properties will not be retrievedincludeReferences
- if set to true, references to other info objects will be retrieved; otherwise references will not be retrievedincludeReferred
- if set to true, references from other info objects will be retrieved; otherwise those references will not be retrieved
BaseLayerException
- if something goes wrongboolean removeInfoObject(java.lang.String oid) throws BaseLayerException
oid
- the object ID of the object that should be deleted
BaseLayerException
- if something goes wrongvoid addReference(java.lang.String sourceoid, java.lang.String targetoid, java.lang.String role, java.lang.String secondaryRole, long position, java.lang.String propagationRule) throws BaseLayerException
sourceoid
- the object ID of the starting information object of the relationtargetoid
- the object Id of the referenced information objectrole
- the role of the information object (sourceoid) with respect to this referencesecondaryRole
- similar to role, but for the secondary role used by Metadata Catalogposition
- an attribute to allow for position preserving representation, set to ReferenceDescription.UNDEFINED_POSITION
if not in use.propagationRule
- rule for propagation of deletion.
BaseLayerException
- if something goes wrongorg.gcube.contentmanagement.layerindependent.descriptions.BasicReferenceDescription
boolean removeReference(java.lang.String sourceoid, java.lang.String targetoid, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
sourceoid
- the object ID of the starting information object of the relationtargetoid
- the object Id of the referenced information objectrole
- the role of the information object (sourceoid) with respect this reference. Can be set to ReferenceDescription.ANY_ROLE
to match all
possible values of role.secondaryRole
- similar to role, but for the secondary role used by Metadata Catalog
BaseLayerException
- if something goes wrongBasicReferenceDescription getReference(java.lang.String sourceoid, java.lang.String targetoid) throws BaseLayerException
sourceoid
- the object ID of the starting information object of the relationtargetoid
- the object Id of the referenced information object
BasicReferenceDescription
BaseLayerException
- if something goes wrongboolean existsReference(java.lang.String sourceoid, java.lang.String targetoid, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
sourceoid
- the object ID of the starting information object of the relationtargetoid
- the object Id of the referenced information objectrole
- the role of the information object (sourceoid) with respect to this referencesecondaryRole
- similar to role, but for the secondary role used by Metadata Catalog
true
if the reference has been found, false
otherwise.
BaseLayerException
- if something goes wrongorg.gcube.contentmanagement.layerindependent.descriptions.BasicReferenceDescription
java.util.List<BasicReferenceDescription> retrieveReferences(java.lang.String sourceoid, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
sourceoid
- the object ID of the starting information object of the relationrole
- the role of the information object (sourceoid) with respect this reference. Can be set to BasicReferenceDescription.ANY_ROLE
to match all possible values of role.secondaryRole
- similar to role, but for the secondary role used by Metadata CatalogrefDescriptions
- a collection to which elements of type BasicReferenceDescription
will be added
BaseLayerException
- if something goes wrongjava.util.List<BasicReferenceDescription> retrieveReferencesOrderedByPosition(java.lang.String sourceoid, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
sourceoid
- the object ID of the starting information object of the relationrole
- the role of the information object (sourceoid) with respect this reference.
Can be set to BasicReferenceDescription.ANY_ROLE
to match all possible values of role.secondaryRole
- similar to role, but for the secondary role used by Metadata Catalog
BaseLayerException
- if something goes wronglong countReferences(java.lang.String oid, boolean isSource, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
oid
- the oid of the known objectisSource
- true, if oid is the object ID of the source object, false if oid is the target oidrole
- the role, or ReferenceDescription.ANY_ROLE
secondaryRole
- similar to role, but for the secondary role used by Metadata Catalog
BaseLayerException
- if something goes wrongjava.util.List<java.lang.String> retrieveReferredSourceOIDs(java.lang.String targetoid, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
targetoid
- the object Id of the referenced information objectrole
- the role of the information object (sourceoid) with respect this reference.
Can be set to BasicReferenceDescription.ANY_ROLE
to match all possible values of role.secondaryRole
- similar to role, but for the secondary role used by Metadata Catalog
BaseLayerException
- if something goes wrongjava.util.List<java.lang.String> retrieveReferredTargetOIDs(java.lang.String sourceoid, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
sourceoid
- the object Id of the referenced information objectrole
- the role of the information object (sourceoid) with respect this reference.
Can be set to BasicReferenceDescription.ANY_ROLE
to match all possible values of role.secondaryRole
- similar to role, but for the secondary role used by Metadata Catalog
BaseLayerException
- if something goes wrongjava.util.List<BasicReferenceDescription> retrieveReferred(java.lang.String targetoid, java.lang.String role, java.lang.String secondaryRole) throws BaseLayerException
targetoid
- the object Id of the referenced information objectrole
- the role of the information object (sourceoid) with respect this reference.
Can be set to BasicReferenceDescription.ANY_ROLE
to match all possible values of role.secondaryRole
- similar to role, but for the secondary role used by Metadata Catalog
BasicReferenceDescription
BaseLayerException
- if something goes wrongvoid setProperty(java.lang.String oid, java.lang.String name, java.lang.String type, java.lang.String value) throws BaseLayerException
If this property already exists, it will be updated. If not, it will be added with the given values.
oid
- the object ID of the information objectname
- the name of the property (use prefixes, e.g. namespace prefixes to disambiguate)type
- the type of the value of this propertyvalue
- the value of the property
BaseLayerException
- if something goes wrongboolean unsetProperty(java.lang.String oid, java.lang.String name) throws BaseLayerException
oid
- the object ID of the information objectname
- the name of the property, or PropertyDescription.ANY_NAME for all
BaseLayerException
- if something goes wrongBasicPropertyDescription getProperty(java.lang.String oid, java.lang.String name) throws BaseLayerException
oid
- the object ID of the information objectname
- the name of the property
ObjectNotFoundException
- if either the OID is invalid or there is no property with this name defined for this information object
BaseLayerException
- if something goes wrongboolean hasProperty(java.lang.String oid, java.lang.String name) throws BaseLayerException
oid
- the object ID of the information objectname
- the name of the property
ObjectNotFoundException
- if the OID is invalid
BaseLayerException
- if something goes wrongjava.util.Map<java.lang.String,BasicPropertyDescription> retrieveObjectProperties(java.lang.String oid) throws BaseLayerException
oid
- the object ID of the information object
PropertyDescription
will be added, key is the name of the property
BaseLayerException
- if something goes wrongjava.util.List<java.lang.String> retrieveOIDByProperty(java.lang.String name, java.lang.String value) throws BaseLayerException
name
- the name of the propertyvalue
- the value of the propertyoids
- a collection to which elements of type String
will be added
BaseLayerException
- if something goes wrongvoid addLinkContentLocation(java.lang.String oid, RawContentLocation location) throws BaseLayerException
oid
- the object ID of the information objectlocation
- the location where the content resides
BaseLayerException
- if something goes wrongboolean removeLinkContentLocation(RawContentLocation location) throws BaseLayerException
location
- the location where the content no longer resides
BaseLayerException
- if something goes wrongboolean removeAllRawContentOf(java.lang.String oid, BasicStorageHints hints) throws BaseLayerException
oid
- the object ID of the object who's raw content should be deleted
BaseLayerException
- if something goes wrongjava.util.List<RawContentLocation> retrieveObjectContentLocations(java.lang.String oid) throws BaseLayerException
oid
- the object ID of the information object
RawContentLocation
BaseLayerException
- if something goes wrongvoid updateLinkContentLocations(java.lang.String oid, RawContentLocation newestLocation) throws BaseLayerException
oid
- the object ID of the information objectnewestLocation
- the location where most recent version of the content resides
BaseLayerException
- if something goes wrongboolean hasRawContent(java.lang.String oid) throws BaseLayerException
oid
- the object ID of the information object
BaseLayerException
- if something goes wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |