public class RegistryAccessor
extends java.lang.Object
Constructor and Description |
---|
RegistryAccessor(QueryContext pContext)
Creates a new instance with the given context.
|
Modifier and Type | Method and Description |
---|---|
void |
addSlot(RegistryObject pRo,
java.lang.String pSlot,
java.util.Collection<java.lang.String> pValue)
Adds new slot value.
|
Association |
createAssociation(RegistryObject sourceObject,
RegistryObject targetObject,
Concept associationType)
Utility method for creating an instance of
Association . |
Association |
createAssociationByKey(RegistryObject sourceObject,
RegistryObject targetObject,
java.lang.String conceptKey)
Utility method for creating an instance of
Association . |
Association |
createAssociationByType(RegistryObject sourceObject,
RegistryObject targetObject,
java.lang.String associationType)
Utility method for creating an instance of
Association . |
Classification |
createClassification(RegistryObject ro,
Concept concept)
Utility method for creating an instance of
Classification . |
Classification |
createClassification(RegistryObject pObject,
java.lang.String key)
Utility method for creating an instance of
Classification . |
Classification |
createClassification(RegistryObject ro,
java.lang.String classificationScheme,
java.lang.String conceptPath)
Utility method for creating an instance of
Classification . |
ExternalLink |
createExternalLink(RegistryObject ro,
java.lang.String uri,
java.lang.String description)
Utility method for creating an instance of
ExternalLink . |
void |
delete(java.util.Collection<Key> keys)
Deletes RegistryObjects by a given
Collection of keys. |
void |
delete(Key key)
Removes the object with the given key from the registry.
|
void |
delete(java.lang.String id)
Removes the object with the given key from the registry.
|
void |
deleteObjects(java.util.Collection<java.lang.String> ids)
Deletes RegistryObjects by a given
Collection of ids. |
Concept |
findAssociationTypeConcept(java.lang.String associationType)
Retrieves the
Concept for the given association type. |
Classification |
findClassificationByConcept(RegistryObject ro,
java.lang.String scheme,
java.lang.String conceptPath)
Retrieves a Classification by given concept path.
|
java.util.Collection<Classification> |
findClassificationsByConcept(RegistryObject ro,
java.lang.String scheme,
java.lang.String conceptPath)
Retrieves a
Classification by given concept path. |
ClassificationScheme |
findClassificationSchemeByName(java.lang.String name)
Retrieves
ClassificationScheme by name. |
Concept |
findConceptByPath(java.lang.String fullPath)
Retrieves a
Concept by full path. |
Concept |
findConceptByPath(java.lang.String classificationScheme,
java.lang.String path)
Retrieves a
Concept by ClasssificationScheme
name and path. |
Concept |
findObjectTypeConcept(java.lang.String objectType)
Retrieves the
Concept for the given object type. |
java.util.Collection<Association> |
getAssociationsBySourceAndTypeKey(RegistryObject pRo,
java.lang.String associationTypeKey)
Returns all associations with the given source object and the given
association type.
|
java.util.Collection<Association> |
getAssociationsBySourceAndTypeKeyAndTargetType(RegistryObject pRo,
java.lang.String associationTypeKey,
java.lang.String objectType)
Returns all associations with the given source object, the given
association type, and the given object type.
|
java.util.Collection<Association> |
getAssociationsByTarget(java.lang.String targetId)
Returns the list of associations with the given target id.
|
java.util.Collection<Association> |
getAssociationsByTypeAndTarget(Concept assocType,
java.lang.String objectType,
java.lang.String targetId)
Return all associations with the given association type, source object type
and the target object id.
|
java.lang.String |
getCheckpointName(RegistryObject ro)
Gets the check point name from the given registry object.
|
java.util.Collection<Classification> |
getClassifications(RegistryObject ro,
java.util.Collection<Concept> concepts)
Retrieves all classifications with concepts from the given collection.
|
java.util.Collection<Classification> |
getClassifications(RegistryObject pRo,
java.lang.String scheme,
java.lang.String parentConceptPath)
Returns the collection of instances, which refer to the given concept.
|
QueryContext |
getContext()
Returns the context.
|
Classification |
getEnumClassification(RegistryObject ro,
java.lang.String key)
Retrieves a classification with the concept id.
|
Classification |
getEnumClassification(RegistryObject ro,
java.lang.String scheme,
java.lang.String parentConceptPath)
Retrieves a classification with a concept which belongs to a given parent.
|
java.util.Collection<Classification> |
getEnumClassifications(RegistryObject ro,
Concept parentConcept)
Retrieves all classifications with a concept which belongs to a given parent.
|
java.util.Collection<Classification> |
getEnumClassifications(RegistryObject ro,
java.lang.String key)
Retrieves all classifications with a concept which belongs to a given parent.
|
java.util.Collection<Classification> |
getEnumClassifications(RegistryObject ro,
java.lang.String scheme,
java.lang.String parentConceptPath)
Retrieves all classifications with a concept which belongs to a given parent.
|
RegistryObject |
getRegistryObject(Key pKey)
Returns the registry object with the given Key.
|
RegistryObject |
getRegistryObject(Key pKey)
Returns the registry object with the given Key.
|
RegistryObject |
getRegistryObject(java.lang.String pID)
Returns the registry object with the given ID.
|
java.util.Collection<RegistryObject> |
getRegistryObjects(java.lang.String objectType)
Returns all registry objects from the given object type.
|
public RegistryAccessor(QueryContext pContext)
pContext
- The QueryContext
instancepublic void addSlot(RegistryObject pRo, java.lang.String pSlot, java.util.Collection<java.lang.String> pValue) throws JAXRException
null
and not empty,
adds the new value.pRo
- The RegistryObject
to which the slot should be addedpSlot
- The name of the slot to addpValue
- The Collection
of values for the slotJAXRException
- If a JAXR error occurs while executing the method callpublic Classification createClassification(RegistryObject pObject, java.lang.String key) throws JAXRException
Classification
. The
instance is attached to the given object.pObject
- the registry object to be classified.key
- the key of the concept to be used for creating the
classification.Classification
instanceJAXRException
- If a JAXR error occurs while executing the method callpublic Classification createClassification(RegistryObject ro, java.lang.String classificationScheme, java.lang.String conceptPath) throws JAXRException
Classification
. The
instance is attached to the given object.ro
- The RegistryObject
to be classifiedclassificationScheme
- The classification scheme name to add for the classificationconceptPath
- The concept path for the schemeClassification
instanceJAXRException
- If a JAXR error occurs while executing the method callpublic Classification createClassification(RegistryObject ro, Concept concept) throws JAXRException
Classification
. The
instance is attached to the given object.ro
- The RegistryObject
to be classifiedconcept
- The Concept
to be included in the classificationClassification
instanceJAXRException
- If a JAXR error occurs while executing the method callpublic Association createAssociationByKey(RegistryObject sourceObject, RegistryObject targetObject, java.lang.String conceptKey) throws JAXRException
Association
. The
instance is attached to the given source object.sourceObject
- the registry object that will serve as source for the association.targetObject
- the registry object that will serve as target for the association.conceptKey
- the key of the concept representing the association type.Association
instanceJAXRException
- If a JAXR error occurs while creating the associationpublic Association createAssociationByType(RegistryObject sourceObject, RegistryObject targetObject, java.lang.String associationType) throws JAXRException
Association
. The
instance is attached to the given source object.sourceObject
- the registry object that will serve as source for the association.targetObject
- the registry object that will serve as target for the association.associationType
- the name of the association typeAssociation
instanceJAXRException
- If a JAXR error occurs while creating the associationpublic Association createAssociation(RegistryObject sourceObject, RegistryObject targetObject, Concept associationType) throws JAXRException
Association
. The
instance is attached to the given source object.sourceObject
- the registry object that will serve as source for the association.targetObject
- the registry object that will serve as target for the association.associationType
- the Concept
representing the association type.Association
instanceJAXRException
- If a JAXR error occurs while creating the associationpublic ExternalLink createExternalLink(RegistryObject ro, java.lang.String uri, java.lang.String description) throws JAXRException
ExternalLink
. The
instance is attached to the given registry object.ro
- the registry object that will contain the external link.uri
- the URI for the external link.description
- the description for the external link.ExternalLink
instanceJAXRException
- If a JAXR error occurs while creating the external linkpublic void delete(java.lang.String id) throws JAXRException
id
- The UUID key for the object to be removedJAXRException
- If a JAXR error occurs while performing the deletionpublic void delete(Key key) throws JAXRException
key
- the Key
of the RegistryObject
to be deleted.JAXRException
- If a JAXR error occurs while performing the deletionpublic void delete(java.util.Collection<Key> keys) throws JAXRException
Collection
of keys.keys
- a Collection
of Key
objects.JAXRException
- If a JAXR error occurs while performing the deletionpublic void deleteObjects(java.util.Collection<java.lang.String> ids) throws JAXRException
Collection
of ids.ids
- a Collection
of String
objects representing ids.JAXRException
- If a JAXR error occurs while performing the deletionpublic QueryContext getContext()
QueryContext
instancepublic RegistryObject getRegistryObject(Key pKey) throws JAXRException
pKey
- The Key
instanceRegistryObject
instance corresponding to pKeyJAXRException
- If a JAXR error occurs while fetching the registry objectpublic RegistryObject getRegistryObject(Key pKey) throws JAXRException
pKey
- The Key
for the registry objectRegistryObject
instance corresponding to pKeyJAXRException
- If a JAXR error occurs while fetching the registry objectpublic java.util.Collection<RegistryObject> getRegistryObjects(java.lang.String objectType) throws JAXRException
objectType
- The name of the object typeCollection
of RegistryObject
s corresponding to the given objectTypeJAXRException
- If a JAXR error occurs while fetching the registry objectspublic RegistryObject getRegistryObject(java.lang.String pID) throws JAXRException
pID
- The UUID of the registry objectRegistryObject
corresponding to pIDJAXRException
- If a JAXR error occurs while fetching the registry objectpublic java.util.Collection<Association> getAssociationsBySourceAndTypeKeyAndTargetType(RegistryObject pRo, java.lang.String associationTypeKey, java.lang.String objectType) throws JAXRException
pRo
- The RegistryObject
which is the source for the associationassociationTypeKey
- The UUID key for the association typeobjectType
- The type of object which is the target of the associationCollection
of Association
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the associationspublic java.util.Collection<Association> getAssociationsBySourceAndTypeKey(RegistryObject pRo, java.lang.String associationTypeKey) throws JAXRException
pRo
- The RegistryObject
which is the source for the associationassociationTypeKey
- The UUID key for the association typeCollection
of Association
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the associationspublic java.util.Collection<Association> getAssociationsByTypeAndTarget(Concept assocType, java.lang.String objectType, java.lang.String targetId) throws JAXRException
assocType
- associationType to look forobjectType
- type of the object that should be source of the associationtargetId
- Id of the target of the associationCollection
of Association
s of the given assocType-Type and for which
the source object is of the given objectType-TypeJAXRException
- If a JAXR error occurs while fetching the associationspublic java.util.Collection<Association> getAssociationsByTarget(java.lang.String targetId) throws JAXRException
targetId
- Id of the target of the associationCollection
of Association
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the associationspublic java.util.Collection<Classification> getClassifications(RegistryObject pRo, java.lang.String scheme, java.lang.String parentConceptPath) throws JAXRException
pRo
- The RegistryObject
which is classified with the given conceptscheme
- The name of the classification scheme for the conceptparentConceptPath
- The parent concept path for the conceptCollection
of Classification
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the classificationspublic Classification getEnumClassification(RegistryObject ro, java.lang.String scheme, java.lang.String parentConceptPath) throws JAXRException
ro
- The RegistryObject
which has the classificationscheme
- The name of the concept for the classificationparentConceptPath
- The parent concept path for the conceptClassification
which matches the given valuesJAXRException
- If a JAXR error occurs while fetching the classificationpublic Classification getEnumClassification(RegistryObject ro, java.lang.String key) throws JAXRException
ro
- The RegistryObject
which has the classificationkey
- The concept UUID key in the classificationClassification
instance matching the given valuesJAXRException
- If a JAXR error occurs while fetching the classificationpublic java.util.Collection<Classification> getEnumClassifications(RegistryObject ro, java.lang.String scheme, java.lang.String parentConceptPath) throws JAXRException
ro
- The RegistryObject
which has the classificationscheme
- The name of the concept for the classificationparentConceptPath
- The parent concept path for the conceptCollection
of Classification
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the classificationspublic java.util.Collection<Classification> getEnumClassifications(RegistryObject ro, java.lang.String key) throws JAXRException
ro
- The RegistryObject
which has the classificationkey
- The concept UUID key in the classificationCollection
of Classification
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the classificationspublic java.util.Collection<Classification> getEnumClassifications(RegistryObject ro, Concept parentConcept) throws JAXRException
ro
- The RegistryObject
which has the classificationparentConcept
- The parent Concept
in the classificationCollection
of Classification
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the classificationspublic java.util.Collection<Classification> getClassifications(RegistryObject ro, java.util.Collection<Concept> concepts) throws JAXRException
ro
- The RegistryObject
which has the classificationconcepts
- The Collection
of Concept
s any of which should match in the classificationCollection
of Classification
s which match the given valuesJAXRException
- If a JAXR error occurs while fetching the classificationspublic Classification findClassificationByConcept(RegistryObject ro, java.lang.String scheme, java.lang.String conceptPath) throws JAXRException
ro
- The RegistryObject
which has the classification.scheme
- The name of the classification schemeconceptPath
- The path of the concept in the classificationClassification
matching these values or null
if no match foundJAXRException
- If a JAXR error occurs while finding the classificationpublic java.util.Collection<Classification> findClassificationsByConcept(RegistryObject ro, java.lang.String scheme, java.lang.String conceptPath) throws JAXRException
Classification
by given concept path.ro
- The RegistryObject
which has the classification.scheme
- The name of the classification schemeconceptPath
- The path of the concept in the classificationCollection
of Classification
s matching these values or null
if no match foundJAXRException
- If a JAXR error occurs while finding the classificationpublic Concept findConceptByPath(java.lang.String classificationScheme, java.lang.String path) throws JAXRException
Concept
by ClasssificationScheme
name and path.classificationScheme
- The classification scheme namepath
- The path for the classification schemeConcept
corresponding to the given scheme name and pathJAXRException
- If a JAXR error occurs while finding the conceptpublic Concept findConceptByPath(java.lang.String fullPath) throws JAXRException
Concept
by full path.fullPath
- The full path of the conceptConcept
corresponding to the given fullPathJAXRException
- If a JAXR error occurs while finding the conceptpublic Concept findObjectTypeConcept(java.lang.String objectType) throws JAXRException
Concept
for the given object type.objectType
- The name for the object typeConcept
corresponding to the given objectTypeJAXRException
- If a JAXR error occurs while finding the conceptpublic Concept findAssociationTypeConcept(java.lang.String associationType) throws JAXRException
Concept
for the given association type.associationType
- The name of the association type for the conceptConcept
corresponding to the given associationTypeJAXRException
- If a JAXR error occurs while finding the conceptpublic ClassificationScheme findClassificationSchemeByName(java.lang.String name) throws JAXRException
ClassificationScheme
by name.name
- The name of the classification schemeClassificationScheme
for the given nameJAXRException
- If a JAXR error occurs while finding the classification schemepublic java.lang.String getCheckpointName(RegistryObject ro) throws CSAppFrameworkException
ro
- The RegistryObject
instanceCSAppFrameworkException
- If an error occurs while getting the check point name