com.apelon.dts.client.association
Class Synonym

java.lang.Object
  extended by com.apelon.dts.client.association.Association
      extended by com.apelon.dts.client.association.Synonym

public class Synonym
extends Association

A Synonym associates a term to a concept. It relates a term which is a synonym of a concept.

Copyright: Copyright (c) 2003

Company: Apelon, Inc.

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

Constructor Summary
Synonym(AssociationType assocType, Term term)
          Constructs a synonym from the association type and synonym term.
Synonym(AssociationType assocType, Term term, boolean localAddition)
          Constructs a synonym from the association type and synonym term.
Synonym(DTSConcept concept, AssociationType assocType, Term term, boolean preferred)
          Constructs a synonym from a concept, association type, and term.
 
Method Summary
 boolean equals(Object obj)
          Compares this Synonym to the specified object.
 DTSConcept getConcept()
          Get synonym's concept.
 Term getTerm()
          Get synonym's term.
 int hashCode()
          Returns a hashcode for this DTS concept.
 boolean isLocalAddition()
          Indicates whether this synonym is a local addition, i.e.
 boolean isPreferred()
          Indicates whether this synonym is the preferred term for the concept
 void setConcept(DTSConcept concept)
          Set concept of synonym association.
 void setLocalAddition(boolean localAddition)
          Sets the local addition indicator.
 void setPreferred(boolean newPreferred)
          Set the preferred term indicator.
 String toString()
          Returns name of synonym term.
 
Methods inherited from class com.apelon.dts.client.association.Association
getAssociationType, getFromItem, getName, getToItem, getValue, setAssociationType, setFromItem, setToItem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Synonym

public Synonym(DTSConcept concept,
               AssociationType assocType,
               Term term,
               boolean preferred)
Constructs a synonym from a concept, association type, and term.

Parameters:
concept - Synonym's concept
assocType - Synonym's association type, i.e. the type of synonym
term - Synonym term
preferred - indicates this synonym is the preferred term for this concept

Synonym

public Synonym(AssociationType assocType,
               Term term)
Constructs a synonym from the association type and synonym term. This would normally be used to construct a synonym that is part of a DTSConcept. When using this constructor you will also need to issue setConcept(com.apelon.dts.client.concept.DTSConcept) before using the object.

Parameters:
assocType - the association type
term - the synonym term of the association

Synonym

public Synonym(AssociationType assocType,
               Term term,
               boolean localAddition)
Constructs a synonym from the association type and synonym term. This would normally be used to construct a synonym that is part of a DTSConcept. When using this constructor you will also need to issue setConcept(com.apelon.dts.client.concept.DTSConcept) before using the object.

Parameters:
assocType - the association type
term - the synonym term of the association
localAddition - indicator whether this is a local addition to subscription content
Method Detail

setConcept

public void setConcept(DTSConcept concept)
Set concept of synonym association.

Parameters:
concept - concept of synonym association

getConcept

public DTSConcept getConcept()
Get synonym's concept.

Returns:
Synonym's concept

getTerm

public Term getTerm()
Get synonym's term.

Returns:
Synonym's term

isPreferred

public boolean isPreferred()
Indicates whether this synonym is the preferred term for the concept

Returns:
true if this is the preferred term; false if not

setPreferred

public void setPreferred(boolean newPreferred)
Set the preferred term indicator. Normally exactly one synonym should be so designated per concept.

Parameters:
newPreferred - true if this synonym is preferred, false otherwise

isLocalAddition

public boolean isLocalAddition()
Indicates whether this synonym is a local addition, i.e. the concept is in a subscription namespace, but the synonym type is in a local namespace.

Returns:
true if this synonym is a local addition to a subscription concept; false if not.

setLocalAddition

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

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

equals

public boolean equals(Object obj)
Compares this Synonym to the specified object.

Overrides:
equals in class Association
Parameters:
obj - the object to compare this String against.
Returns:
true if the String are equal; false otherwise.

hashCode

public int hashCode()
Returns a hashcode for this DTS concept.

Overrides:
hashCode in class Association
Returns:
a hash code value for this object.

toString

public String toString()
Returns name of synonym term.

Overrides:
toString in class Object
Returns:
synonym term


Copyright © 2011. All Rights Reserved.