com.apelon.dts.client.association
Class AssociationType

java.lang.Object
  extended by com.apelon.dts.client.common.DTSObject
      extended by com.apelon.dts.client.association.AssociationType
All Implemented Interfaces:
Cloneable

public class AssociationType
extends DTSObject
implements Cloneable

AssociationType defines a named association between concepts and/or terms. Associations are looser connections than the defining roles of Ontylog concepts. Associations fall into three categories: arbitrary, mapping, and history. Mappings are between concepts or terms in different namespaces.

Copyright: Copyright (c) 2003

Company: Apelon, Inc.

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

Field Summary
static String NOT_DISPLAYABLE
          Value for inverse association name that indicates the inverse association should not be displayed.
 
Constructor Summary
AssociationType()
           
AssociationType(String name, int namespaceId, ItemsConnected itemsConnected, Purpose purpose, String inverseName)
          Constructs a new AssociationType with specified name, namespace, type of items associated, and purpose: the id and code will be generated by the server when this AssociationType is added.
AssociationType(String name, int id, String code, int namespaceId, ItemsConnected itemsConnected, Purpose purpose, String inverseName)
          Constructs a new AssociationType with specified name, ID, code, namespace, type of items associated, and purpose.
 
Method Summary
 Object clone()
          Clone this AssociationType object.
 boolean equals(Object obj)
          Compares this association type to the specified object.
 String getInverseName()
          Gets the inverse name for this association.
 ItemsConnected getItemsConnected()
          Gets the type of items associated by this association.
 Purpose getPurpose()
          Gets the purpose for this association.
 void setInverseName(String inverseName)
          Sets the inverse name of the association.
 void setItemsConnected(ItemsConnected newItemsConnected)
          Sets the type of items associated by the association.
 void setPurpose(Purpose newPurpose)
          Sets the purpose of the association.
 
Methods inherited from class com.apelon.dts.client.common.DTSObject
getCode, getId, getName, getNamespaceId, hashCode, setCode, setId, setName, setNamespaceId, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_DISPLAYABLE

public static String NOT_DISPLAYABLE
Value for inverse association name that indicates the inverse association should not be displayed.

Constructor Detail

AssociationType

public AssociationType()

AssociationType

public AssociationType(String name,
                       int id,
                       String code,
                       int namespaceId,
                       ItemsConnected itemsConnected,
                       Purpose purpose,
                       String inverseName)
Constructs a new AssociationType with specified name, ID, code, namespace, type of items associated, and purpose.

Parameters:
name - the association type's name
id - the association type's ID
code - the association type's code
namespaceId - the association type's namespace ID
itemsConnected - ItemsConnected indicating type of items associated:
  • two concepts
  • concept with synonymous term
  • two terms
purpose - the association type's purpose: arbitrary, mapping, or history
inverseName - the name used for the inverse association

AssociationType

public AssociationType(String name,
                       int namespaceId,
                       ItemsConnected itemsConnected,
                       Purpose purpose,
                       String inverseName)
Constructs a new AssociationType with specified name, namespace, type of items associated, and purpose: the id and code will be generated by the server when this AssociationType is added.

Parameters:
name - the association type's name
namespaceId - the association type's namespace ID
itemsConnected - ItemsConnected indicating type of items associated:
  • two concepts
  • concept with synonymous term
  • two terms
purpose - the association type's purpose: arbitrary, mapping, or history
inverseName - the name used for the inverse association
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Clone this AssociationType object.

Overrides:
clone in class Object
Returns:
a clone of this AssociationType.
Throws:
CloneNotSupportedException - if unable to create a clone

setItemsConnected

public void setItemsConnected(ItemsConnected newItemsConnected)
Sets the type of items associated by the association.

Parameters:
newItemsConnected - the type of items associated by the association

getItemsConnected

public ItemsConnected getItemsConnected()
Gets the type of items associated by this association.

Returns:
ItemsConnected

setPurpose

public void setPurpose(Purpose newPurpose)
Sets the purpose of the association.

Parameters:
newPurpose - the purpose of the association: arbitrary, mapping,

getPurpose

public Purpose getPurpose()
Gets the purpose for this association.

Returns:
purpose for this association: arbitrary, mapping, or history

setInverseName

public void setInverseName(String inverseName)
Sets the inverse name of the association. For example, if the association name is "is part of", then the inverse name might be "has part".

Parameters:
inverseName - the name of the inverse of the association

getInverseName

public String getInverseName()
Gets the inverse name for this association. If no inverse name is available, an empty String is returned.

Returns:
inverse name for this association

equals

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

Overrides:
equals in class DTSObject
Parameters:
obj - object to compare with
Returns:
true if the object is equal to this AssociationType; false otherwise.


Copyright © 2011. All Rights Reserved.