com.centrasite.registry.versionmanagementservices
Class VersionAssociation

java.lang.Object
  extended by com.centrasite.registry.versionmanagementservices.VersionAssociation

public class VersionAssociation
extends java.lang.Object

This class handles the associations of Versioning. The version association is a "Supersedes" with the "Versioning" classification.

It expects this taxonomy with concepts in the registry:

 For the versioning association:
 
      + CentraSiteVersioning
        + Versioning
 
 For the DEEP association handling:
 
      + CentraSiteVersioning
        + SourceXXX
        + TargetXXX
 
 


Constructor Summary
VersionAssociation(com.centrasite.jaxr.JAXRAccessor jaxr)
          Constructor: create Version association instance.
 
Method Summary
 javax.xml.registry.infomodel.Association createVersionAssociation(javax.xml.registry.infomodel.RegistryObject successor, javax.xml.registry.infomodel.RegistryObject predecessor)
          Create the version assocation (a Supersedes with a specific classification)
 javax.xml.registry.infomodel.Concept getAssociationConcept()
          Get the concept of the Versioning association.
 VersionCopyMode getSourceCopyMode(java.lang.String assocID)
          Get the source association copy mode by inspecting the association's Concept if its classified with version-specific entries; see sourceClassifications.
 javax.xml.registry.infomodel.RegistryObject getSourceVersionObject(javax.xml.registry.infomodel.RegistryObject regObj)
          Return object pointing to regObj with a Version association ('Supersedes').
 VersionCopyMode getTargetCopyMode(java.lang.String assocID)
          Get the target association copy mode by inspecting the association's Concept if its classified with version-specific entries; see targetClassifications.
 boolean isVersionAssociation(javax.xml.registry.infomodel.Association assoc)
          Check if the association is a Versioning association
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionAssociation

public VersionAssociation(com.centrasite.jaxr.JAXRAccessor jaxr)
Constructor: create Version association instance.

Parameters:
jaxr -
Method Detail

createVersionAssociation

public javax.xml.registry.infomodel.Association createVersionAssociation(javax.xml.registry.infomodel.RegistryObject successor,
                                                                         javax.xml.registry.infomodel.RegistryObject predecessor)
                                                                  throws javax.xml.registry.JAXRException
Create the version assocation (a Supersedes with a specific classification)

Parameters:
successor - new version object
predecessor - old version object
Returns:
the assocation itself (for further processing)
Throws:
javax.xml.registry.JAXRException

isVersionAssociation

public boolean isVersionAssociation(javax.xml.registry.infomodel.Association assoc)
                             throws javax.xml.registry.JAXRException
Check if the association is a Versioning association

Parameters:
assoc - association object
Returns:
true: a version association
false: any other association
Throws:
javax.xml.registry.JAXRException

getAssociationConcept

public javax.xml.registry.infomodel.Concept getAssociationConcept()
                                                           throws javax.xml.registry.JAXRException
Get the concept of the Versioning association.

Returns:
Concept of 'Supersedes'
Throws:
javax.xml.registry.JAXRException

getSourceVersionObject

public javax.xml.registry.infomodel.RegistryObject getSourceVersionObject(javax.xml.registry.infomodel.RegistryObject regObj)
                                                                   throws javax.xml.registry.JAXRException
Return object pointing to regObj with a Version association ('Supersedes').

Example:

         supersedes    +----------+
      -------------->  |  regObj  |
                       +----------+
 

Parameters:
regObj - the object which evtl. target of a version association
Returns:
the object with higher version null: no object with higher version
Throws:
javax.xml.registry.JAXRException

getSourceCopyMode

public VersionCopyMode getSourceCopyMode(java.lang.String assocID)
Get the source association copy mode by inspecting the association's Concept if its classified with version-specific entries; see sourceClassifications.

Parameters:
assocID - association ID (Constants.ASSOC...)
Returns:
the copy mode of this source association

getTargetCopyMode

public VersionCopyMode getTargetCopyMode(java.lang.String assocID)
Get the target association copy mode by inspecting the association's Concept if its classified with version-specific entries; see targetClassifications.

Parameters:
assocID - association ID (Constants.ASSOC...)
Returns:
the copy mode of this target association