com.apelon.dts.client.association
Class QualifiedAssociation

java.lang.Object
  extended by com.apelon.dts.client.association.Association
      extended by com.apelon.dts.client.association.QualifiedAssociation
All Implemented Interfaces:
QualifiedObject
Direct Known Subclasses:
ConceptAssociation, TermAssociation

public abstract class QualifiedAssociation
extends Association
implements QualifiedObject

This class provides methods common to Associations which have qualifiers: ConceptAssociations and TermAssociations.

Copyright: Copyright (c) 2003

Company: Apelon, Inc.

Since:
DTS 3.0.0
Version:
DTS 3.0.0
Author:
Apelon, Inc.

Constructor Summary
  QualifiedAssociation()
           
protected QualifiedAssociation(AssociationType assocType, DTSObject toItem)
          Constructs an association from the association type and "to" item.
protected QualifiedAssociation(DTSObject fromItem, AssociationType assocType)
          Constructs an association from the "from" item and association type.
protected QualifiedAssociation(DTSObject fromItem, AssociationType assocType, DTSObject toItem)
          Constructs an association from the "from" item, association type, and "to" item.
 
Method Summary
 boolean addQualifier(DTSQualifier qualifier)
          Adds the specified element as qualifier for this association.
 boolean containsQualifier(DTSQualifier qualifier)
          Tests if this association already has the specified qualifier.
 boolean deleteQualifier(DTSQualifier qualifier)
          Deletes the specified element as qualifier for this association.
 DTSQualifier[] getFetchedQualifiers()
          Returns array of qualifiers that have been retrieved for this association.
 DTSObject getToItem()
          Get "to" item of qualified association.
 boolean isLocalAddition()
          Indicates if this association is a local addition to subscription content, i.e.
 void setFromItem(DTSObject fromItem)
          Set "from" item of qualified association.
 void setLocalAddition(boolean localAddition)
          Sets the local addition indicator.
 void setToItem(DTSObject toItem)
          Set "to" item of qualified association.
 
Methods inherited from class com.apelon.dts.client.association.Association
equals, getAssociationType, getFromItem, getName, getValue, hashCode, setAssociationType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QualifiedAssociation

public QualifiedAssociation()

QualifiedAssociation

protected QualifiedAssociation(DTSObject fromItem,
                               AssociationType assocType,
                               DTSObject toItem)
Constructs an association from the "from" item, association type, and "to" item.

Parameters:
fromItem - the from item of the association
assocType - the association type
toItem - the to item of the association

QualifiedAssociation

protected QualifiedAssociation(AssociationType assocType,
                               DTSObject toItem)
Constructs an association from the association type and "to" item. This would normally be used to construct an association that is part of a DTSConcept or Term. When using this constructor you will also need to issue setFromItem(com.apelon.dts.client.common.DTSObject) before using the object.

Parameters:
assocType - the association type
toItem - the to item of the association

QualifiedAssociation

protected QualifiedAssociation(DTSObject fromItem,
                               AssociationType assocType)
Constructs an association from the "from" item and association type. This would normally be used to construct an inverse association that is part of a DTSConcept or Term. When using this constructor you will also need to issue setToItem(com.apelon.dts.client.common.DTSObject) before using the object.

Parameters:
fromItem - the from item of the association
assocType - the association type
Method Detail

getFetchedQualifiers

public DTSQualifier[] getFetchedQualifiers()
Returns array of qualifiers that have been retrieved for this association.

Specified by:
getFetchedQualifiers in interface QualifiedObject
Returns:
array of DTSQualifiers.

addQualifier

public boolean addQualifier(DTSQualifier qualifier)
Adds the specified element as qualifier for this association.

Specified by:
addQualifier in interface QualifiedObject
Parameters:
qualifier - DTSQualifier to add
Returns:
false if the association already had the qualifier; true if the qualifier was added

containsQualifier

public boolean containsQualifier(DTSQualifier qualifier)
Tests if this association already has the specified qualifier.

Specified by:
containsQualifier in interface QualifiedObject
Parameters:
qualifier - the DTSQualifier to test
Returns:
true if this association contains the qualifier argument; otherwise false

deleteQualifier

public boolean deleteQualifier(DTSQualifier qualifier)
Deletes the specified element as qualifier for this association.

Specified by:
deleteQualifier in interface QualifiedObject
Parameters:
qualifier - DTSQualifier to be removed
Returns:
true if removed successfully; otherwise false

setFromItem

public void setFromItem(DTSObject fromItem)
Set "from" item of qualified association.

Overrides:
setFromItem in class Association
Parameters:
fromItem - from item of association

setToItem

public void setToItem(DTSObject toItem)
Set "to" item of qualified association.

Overrides:
setToItem in class Association
Parameters:
toItem - to item of association

getToItem

public DTSObject getToItem()
Get "to" item of qualified association.

Overrides:
getToItem in class Association
Returns:
from item.

isLocalAddition

public boolean isLocalAddition()
Indicates if this association is a local addition to subscription content, i.e. the from concept (or term) is in a subscription namespace, but the association type is in a local namespace. However, if this is an "inverse" concept association, then the to concept (or term) is in a subscription namespace, but the association type is in the local namespace.

Returns:
true if this association is a local addition to subscription content; false if not.

setLocalAddition

public void setLocalAddition(boolean localAddition)
Sets the local addition indicator.

Parameters:
localAddition - true if this association is a local addition to subscription content; false if not.


Copyright © 2011. All Rights Reserved.