com.apelon.dts.client.attribute
Class DTSRole

java.lang.Object
  extended by com.apelon.dts.client.attribute.DTSRole
All Implemented Interfaces:
DTSAttribute

public class DTSRole
extends Object
implements DTSAttribute

In an Ontylog namespace, a kind defines a concept's type (procedure, substance, etc). A role defines the relationship between concept kinds (for example, located_in, part_of). Each role consists of a role name (that is, a role type or definition) and a specific value.

For example, if concept "Chemistry Test" has kind "Test", concept "Chemical" has kind "Substance" and "SUBSTANCE_MEASURED" is a role type relating concepts of kind "Test" and kind "Substance", then "Chemistry Test" may have a role of type "SUBSTANCE_MEASURED" with a value of "Chemical".

Copyright: Copyright (c) 2004

Company: Apelon, Inc.

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

Field Summary
static int NO_GROUP
          This is the standard for a DTSRole which has no group.
 
Constructor Summary
DTSRole(DTSRoleType roleType, OntylogConcept valueConcept)
          Deprecated. Use DTSRole(DTSRoleType roleType, OntylogConcept valueConcept, RoleModifier roleModifier, int roleGroup) instead
DTSRole(DTSRoleType roleType, OntylogConcept valueConcept, RoleModifier roleModifier, int roleGroup)
          Constructs a DTSRole that includes a role modifier.
 
Method Summary
 Object clone()
          Returns new copy of this DTSRole
 OntylogConcept getConcept()
          Deprecated. Use getValueConcept() instead.
 int getGroupNum()
          Gets the role group number.
 String getName()
          Gets the name of the role type of this DTSRole.
 RoleModifier getRoleModifier()
          Gets the role modifier which is a logical quantifier (for example, "there exists" or "for all") on the role.
 DTSRoleType getRoleType()
          Gets the DTSRoleType of this DTSRole.
 String getValue()
          Gets the String value of this DTSRole.
 OntylogConcept getValueConcept()
          Gets the OntylogConcept value of this DTSRole.
 boolean isInGroup()
          Indicates whether this role is in a RoleGroup.
 void setGroupNum(int groupNum)
          Sets the role group number, with NO_GROUP indicating no group.
 void setRoleModifier(RoleModifier roleModifier)
          Sets the role modifier.
 String toString()
          Returns a String representation of the role:
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_GROUP

public static final int NO_GROUP
This is the standard for a DTSRole which has no group.

See Also:
Constant Field Values
Constructor Detail

DTSRole

public DTSRole(DTSRoleType roleType,
               OntylogConcept valueConcept)
Deprecated. Use DTSRole(DTSRoleType roleType, OntylogConcept valueConcept, RoleModifier roleModifier, int roleGroup) instead

Constructs a DTSRole

Parameters:
roleType - role type
valueConcept - role value concept

DTSRole

public DTSRole(DTSRoleType roleType,
               OntylogConcept valueConcept,
               RoleModifier roleModifier,
               int roleGroup)
Constructs a DTSRole that includes a role modifier.

Parameters:
roleType - role type
valueConcept - role value concept
roleModifier - role modifier (for example, "all" or "some")
roleGroup - role group number, or 0 if not part of a group
Method Detail

getRoleType

public DTSRoleType getRoleType()
Gets the DTSRoleType of this DTSRole.

Returns:
the role type of this DTSRole.

getConcept

public OntylogConcept getConcept()
Deprecated. Use getValueConcept() instead.

Gets the OntylogConcept value of this DTSRole.

Returns:
the concept value of this DTSRole.

getValueConcept

public OntylogConcept getValueConcept()
Gets the OntylogConcept value of this DTSRole.

Returns:
the concept value of this DTSRole.

getName

public String getName()
Gets the name of the role type of this DTSRole.

Specified by:
getName in interface DTSAttribute
Returns:
the name of this DTSRole.

getValue

public String getValue()
Gets the String value of this DTSRole.

Specified by:
getValue in interface DTSAttribute
Returns:
the value of this DTSRole.

getRoleModifier

public RoleModifier getRoleModifier()
Gets the role modifier which is a logical quantifier (for example, "there exists" or "for all") on the role.

Returns:
the role's modifier.
Since:
DTS 3.3.0

setRoleModifier

public void setRoleModifier(RoleModifier roleModifier)
Sets the role modifier.

Parameters:
roleModifier - the role modifier
Since:
DTS 3.3.0

getGroupNum

public int getGroupNum()
Gets the role group number. Returns NO_GROUP if the role is not in a group.

Returns:
the role group number, if the role is in a group. Otherwise it returns NO_GROUP.
Since:
DTS 3.3.0

setGroupNum

public void setGroupNum(int groupNum)
Sets the role group number, with NO_GROUP indicating no group.

Parameters:
groupNum -
Since:
DTS 3.3.0

isInGroup

public boolean isInGroup()
Indicates whether this role is in a RoleGroup.

Returns:
true if it's in a RoleGroup, else false
Since:
DTS 3.3.0

clone

public Object clone()
Returns new copy of this DTSRole

Overrides:
clone in class Object
Since:
DTS 3.3.0

toString

public String toString()
Returns a String representation of the role:
   :  
 

Overrides:
toString in class Object
Returns:
String including role modifier, role type name, and role value concept name.


Copyright © 2011. All Rights Reserved.