javax.xml.registry.infomodel
Interface Association

All Superinterfaces:
ExtensibleObject, RegistryObject

public interface Association
extends RegistryObject

A RegistryObject instance may be associated with zero or more RegistryObject instances. The information model defines an Association interface, an instance of which may be used to associate any two RegistryObject instances.

Example of an Association

One example of such an association is between two ClassificationScheme instances, where one ClassificationScheme supersedes the other ClassificationScheme as shown in Figure 1. This may be the case when a new version of a ClassificationScheme is submitted. In Figure 1, we see how an Association is defined between a new version of the NAICS ClassificationScheme and an older version of the NAICS ClassificationScheme.


Figure 1: Example of RegistryObject Association

Source and Target Objects

An Association instance represents an association between a source RegistryObject and a target RegistryObject. These are referred to as sourceObject and targetObject for the Association instance. It is important which object is the sourceObject and which is the targetObject as it determines the directional semantics of an Association. In the example in Figure 1, it is important to make the newer version of NAICS ClassificationScheme be the sourceObject and the older version of NAICS be the targetObject because the associationType implies that the sourceObject supersedes the targetObject (and not the other way around).

Association Types

Each Association must have an associationType attribute that identifies the type of that association. The associationType attribute is a reference to an enumeration Concept as defined by the predefined associationType ClassificationScheme in the JAXR specification. Our example uses the pre-defined associationType Concept named Supersedes.

Intramural Associations

A common use case for the Association interface is when a User "u" creates an Association "a" between two RegistryObjects "o1" and "o2" where association "a" and RegistryObjects "o1" and "o2" are objects that were created by the same User "u". This is the simplest use case where the association is between two objects that are owned by same User that is defining the Association. Such associations are referred to as intramural associations. Figure 2 below, extends the previous example in Figure 1 for the intramural association case.


Figure 2: Example of Intramural Association

Extramural Association

The information model also allows a more sophisticated use case where a User "u1" creates an Association "a" between two RegistryObjects "o1" and "o2" where association "a" is owned by User "u1", but RegistryObjects "o1" and "o2" are owned by User "u2" and User "u3" respectively. In this use case the Association is being defined where either or both objects that are being associated are owned by a User different from the User defining the Association. Such associations are referred to as extramural associations. The Association interface provides a convenience method called isExtramural that returns true if the Association instance is an extramural Association. Figure 3 below, extends the previous example in Figure 1 for the extramural association case. Note that it is possible for an extramural association to have two distinct Users rather than three distinct Users as shown in Figure 3. In such case, one of the two users owns two of the three objects involved (Association, sourceObject and targetObject).


Figure 3: Example of Extramural Association

Confirmation of an Association

An association may need to be confirmed by the parties whose objects are involved in that Association. This section describes the semantics of confirmation of an association by the parties involved.

Confirmation of Intramural Associations

Intramural associations may be viewed as declarations of truth and do not require any explicit steps to confirm that Association as being true. In other words, intramural associations are implicitly considered be confirmed.

Confirmation of Extramural Associations

Extramural associations may be viewed as a unilateral assertion that may not be viewed as truth until it has been confirmed by the other (extramural) parties (Users "u2" and "u3" in example). The confirmAssociation method on the BusinessLifeCycleManager interface may be called by the extramural parties that own the sourceObject or targetObject.

Visibility of Unconfirmed Associations

Extramural associations require each extramural party to confirm the assertion being made by the extramural Association before the Association is visible to 3rd parties that are not involved in the Association. This ensures that unconfirmed Associations are not visible to 3rd party registry clients.

Possible Confirmation States

Assume the most general case where there are three distinct User instances as shown in Figure 23 for an extramural Association. The extramural Association needs to be confirmed by both the other (extramural) parties (Users "u2" and "u3" in example) in order to be fully confirmed. The methods isConfirmedBySourceOwner and isConfiremedByTargetOwner in the Association interface provide access to confirmation state for both the sourceObject and targetObject. A third convenience method called isConfirmed provides a way to determine whether the Association is fully confirmed or not. So there are the following four possibilities related to confirmation state of an extramural Association:

Author:
Farrukh S. Najmi
See Also:
RegistryObject

Method Summary
 Concept getAssociationType()
          Gets the association type for this Association.
 RegistryObject getSourceObject()
          Gets the Object that is the source of this Association.
 RegistryObject getTargetObject()
          Gets the Object that is the target of this Association.
 boolean isConfirmed()
          Determines whether an Association has been confirmed completely.
 boolean isConfirmedBySourceOwner()
          Determines whether an Association has been confirmed by the owner of the source object.
 boolean isConfirmedByTargetOwner()
          Determines whether an Association has been confirmed by the owner of the target object.
 boolean isExtramural()
          Determines whether an Association is extramural or not.
 void setAssociationType(Concept associationType)
          Sets the association type for this Association.
 void setSourceObject(RegistryObject srcObject)
          Sets the Object that is the source of this Association.
 void setTargetObject(RegistryObject targetObject)
          Sets the Object that is the target of this Association.
 
Methods inherited from interface javax.xml.registry.infomodel.RegistryObject
addAssociation, addAssociations, addClassification, addClassifications, addExternalIdentifier, addExternalIdentifiers, addExternalLink, addExternalLinks, getAssociatedObjects, getAssociations, getAuditTrail, getClassifications, getDescription, getExternalIdentifiers, getExternalLinks, getKey, getLifeCycleManager, getName, getObjectType, getRegistryPackages, getSubmittingOrganization, removeAssociation, removeAssociations, removeClassification, removeClassifications, removeExternalIdentifier, removeExternalIdentifiers, removeExternalLink, removeExternalLinks, setAssociations, setClassifications, setDescription, setExternalIdentifiers, setExternalLinks, setKey, setName, toXML
 
Methods inherited from interface javax.xml.registry.infomodel.ExtensibleObject
addSlot, addSlots, getSlot, getSlots, removeSlot, removeSlots
 

Method Detail

getSourceObject

RegistryObject getSourceObject()
                               throws JAXRException
Gets the Object that is the source of this Association.

Capability Level: 0

Returns:
The RegistryObject that is the source object of this Association
Throws:
JAXRException - If the JAXR provider encounters an internal error

setSourceObject

void setSourceObject(RegistryObject srcObject)
                     throws JAXRException
Sets the Object that is the source of this Association.

Capability Level: 0

Parameters:
srcObject - the RegistryObject that is the source object of this Association
Throws:
JAXRException - If the JAXR provider encounters an internal error

getTargetObject

RegistryObject getTargetObject()
                               throws JAXRException
Gets the Object that is the target of this Association.

Capability Level: 0

Returns:
The RegistryObject that is the target object of this Association
Throws:
JAXRException - If the JAXR provider encounters an internal error

setTargetObject

void setTargetObject(RegistryObject targetObject)
                     throws JAXRException
Sets the Object that is the target of this Association.

Capability Level: 0

Parameters:
targetObject - the RegistryObject that is the target object of this Association
Throws:
JAXRException - If the JAXR provider encounters an internal error

getAssociationType

Concept getAssociationType()
                           throws JAXRException
Gets the association type for this Association.

Capability Level: 0

Returns:
The association type for this Association which is a Concept in the AssociationType ClassificationScheme
Throws:
JAXRException - If the JAXR provider encounters an internal error

setAssociationType

void setAssociationType(Concept associationType)
                        throws JAXRException
Sets the association type for this Association.

Capability Level: 0

Parameters:
associationType - the association type for this Association which is a Concept in the AssociationType ClassificationScheme
Throws:
JAXRException - If the JAXR provider encounters an internal error

isExtramural

boolean isExtramural()
                     throws JAXRException
Determines whether an Association is extramural or not.

An Extramural Association must be confirmed by the User(s) that own the source and/or targert object, if they are different from the User who creates this extramural association. Both the sourceObject and targetObject owners must confirm an extramural Association, in order for it to be visible to third parties.

Capability Level: 0

Returns:
true if the sourceObject and/or the targetObject are owned by a User that is different from the User that created the Association; false otherwise
Throws:
JAXRException - If the JAXR provider encounters an internal error

isConfirmedBySourceOwner

boolean isConfirmedBySourceOwner()
                                 throws JAXRException
Determines whether an Association has been confirmed by the owner of the source object.

Capability Level: 0

Returns:
true if the association has been confirmed by the owner of the sourceObject; false otherwise. For intramural Associations always return true
Throws:
JAXRException - If the JAXR provider encounters an internal error

isConfirmedByTargetOwner

boolean isConfirmedByTargetOwner()
                                 throws JAXRException
Determines whether an Association has been confirmed by the owner of the target object.

Capability Level: 0

Returns:
true if the association has been confirmed by the owner of the targetObject; false otherwise. For intramural Associations always return true
Throws:
JAXRException - If the JAXR provider encounters an internal error

isConfirmed

boolean isConfirmed()
                    throws JAXRException
Determines whether an Association has been confirmed completely.

An association should only be visible to third parties (not involved with the Association) if isConfirmed returns true.

Capability Level: 0

Returns:
true if the isConfirmedBySourceOwner and isConfirmedByTargetOwner methods both return true; false otherwise. For intramural Associations always return true
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
Association#isConfirmedBySourceOwner(), Association#isConfirmedByTargetOwner()


Submit a bug or feature

Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 4-June-2010 04:34