com.apelon.dts.client.concept
Class OntylogConcept

java.lang.Object
  extended by com.apelon.dts.client.common.DTSObject
      extended by com.apelon.dts.client.attribute.PropertiedObject
          extended by com.apelon.dts.client.concept.DTSConcept
              extended by com.apelon.dts.client.concept.OntylogConcept
All Implemented Interfaces:
MatchItem, Cloneable
Direct Known Subclasses:
ConceptChild, ConceptParent

public class OntylogConcept
extends DTSConcept

An Ontylog concept extends a DTS concept by adding Ontylog hierarchy and role information. In addition to the normal inferred view that DTS presents, an Ontylog concept may also have a defined view consisting of a primitive/defined flag, a Kind, and defining (super)concepts and roles. The inferred view is what the TDE classifier infers from the collection of concept definitions in an Ontylog Namespace, or the DTS modular classifier determines from an Ontylog Namespace combined with an Ontylog Extension Namespace.

Copyright: Copyright (c) 2007

Company: Apelon, Inc.

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

Constructor Summary
OntylogConcept(String name, int id, String code, int namespaceId)
          Constructs a basic Ontylog concept object and initializes it in a particular namespace.
 
Method Summary
 boolean addDefiningConcept(OntylogConcept definingConcept)
          Adds the specified element as a defining concept for this concept.
 boolean addDefiningRole(DTSRole definingRole)
          Adds the specified element as a defining role for this concept.
 boolean addInverseRole(DTSRole invRole)
          Adds the specified element as inverse role for this concept.
 boolean addRole(DTSRole role)
          Adds the specified element as role for this concept.
 boolean containsDefiningConcept(OntylogConcept definingConcept)
          Tests if this concept already has the specified defining concept.
 boolean containsDefiningRole(DTSRole definingRole)
          Tests if this concept already has the specified defining role.
 boolean containsInverseRole(DTSRole invRole)
          Tests if this concept already has the specified inverse role.
 boolean containsRole(DTSRole role)
          Tests if this concept already has the specified role.
 boolean deleteDefiningConcept(OntylogConcept definingConcept)
          Deletes the specified element as a defining concept for this concept.
 boolean deleteDefiningRole(DTSRole definingRole)
          Deletes the specified element as a defining role for this concept.
 boolean deleteInverseRole(DTSRole invRole)
          Deletes the specified element as inverse role for this concept.
 boolean deleteRole(DTSRole role)
          Deletes the specified element as role for this concept.
 RoleGroup[] getDefiningRoleGroups()
          This is a convenience that returns the role groups containing the defining roles for this concept, if the defined view attributes (which include the defining roles) have been retrieved.
 OntylogConcept[] getFetchedDefiningConcepts()
          If the defined view attributes have been retrieved, gets the defining concepts of this concept.
 DTSRole[] getFetchedDefiningRoles()
          If the defined view attributes have been retrieved, gets the defining roles of this concept.
 boolean getFetchedHasSubs()
          Tests if the concept has subconcepts.
 boolean getFetchedHasSups()
          Tests if the concept has superconcepts.
 DTSRole[] getFetchedInverseRoles()
          Gets the inverse roles which have been retrieved for this concept, that is, the roles of other concepts which have this concept as a value.
 Kind getFetchedKind()
          Gets the Kind of this concept if the defined view attributes have been retrieved.
 boolean getFetchedPrimitive()
          If the defined view attributes have been retrieved, indicates if this Ontylog concept is primitive or defined.
 DTSRole[] getFetchedRoles()
          Gets the (inferred) roles which have been retrieved for this concept.
 OntylogConcept[] getFetchedSubconcepts()
          Gets the direct subconcepts which have been retrieved for this concept.
 OntylogConcept[] getFetchedSuperconcepts()
          Gets the direct superconcepts which have been retrieved for this concept.
 int getNumberOfSpecifiedInverseRoles()
          Get the number of inverse roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.
 int getNumberOfSpecifiedRoles()
          Get the number of roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.
 RoleGroup[] getRoleGroups()
          This is a convenience method that returns the role groups containing the roles for this concept, if the roles have been retrieved for this concept.
 void setFetchedHasSubs(boolean fetchedHasSubs)
          Sets indicator of whether the concept has subconcepts.
 void setFetchedHasSups(boolean fetchedHasSups)
          Sets indicator of whether the concept has superconcepts.
 void setFetchedKind(Kind kind)
          Sets the Kind of this concept.
 void setFetchedPrimitive(boolean primitive)
          Sets whether this Ontylog concept is to be primitive or defined.
 void setFetchedSubconcepts(OntylogConcept[] subconcepts)
          Sets the direct subconcepts for this concept.
 void setFetchedSuperconcepts(OntylogConcept[] superconcepts)
          Sets the direct superconcepts for this concept.
 void setNumberOfSpecifiedInverseRoles(int count)
          Get the number of inverse roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.
 void setNumberOfSpecifiedRoles(int count)
          Set the number of roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.
 
Methods inherited from class com.apelon.dts.client.concept.DTSConcept
addConceptAssociation, addInverseConceptAssociation, addSynonym, containsConceptAssociation, containsInverseConceptAssociation, containsSynonym, deleteConceptAssociation, deleteInverseConceptAssociation, deleteSynonym, equals, getFetchedConceptAssociations, getFetchedInverseConceptAssociations, getFetchedPreferredTerm, getFetchedSynonyms, getMatchItemType, getMatchString, getNumberOfSpecifiedConceptAssociations, getNumberOfSpecifiedInverseConceptAssociations, getNumberOfSpecifiedSynonyms, setNumberOfSpecifiedConceptAssociations, setNumberOfSpecifiedInverseConceptAssociations, setNumberOfSpecifiedSynonyms
 
Methods inherited from class com.apelon.dts.client.attribute.PropertiedObject
addProperty, containsProperty, deleteProperty, getFetchedProperties, getNumberOfSpecifiedProperties, getProperties, setProperties
 
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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OntylogConcept

public OntylogConcept(String name,
                      int id,
                      String code,
                      int namespaceId)
Constructs a basic Ontylog concept object and initializes it in a particular namespace.

Parameters:
name - the name of the concept
id - the ID of the concept
code - the code of the concept
namespaceId - the namespace ID of the concept
Method Detail

getFetchedSuperconcepts

public OntylogConcept[] getFetchedSuperconcepts()
Gets the direct superconcepts which have been retrieved for this concept.

Returns:
the direct superconcepts.
Since:
DTS 3.3.0

setFetchedSuperconcepts

public void setFetchedSuperconcepts(OntylogConcept[] superconcepts)
Sets the direct superconcepts for this concept.

Parameters:
superconcepts - the direct superconcepts
Since:
DTS 3.3.0

getFetchedSubconcepts

public OntylogConcept[] getFetchedSubconcepts()
Gets the direct subconcepts which have been retrieved for this concept.

Returns:
the direct subconcepts.
Since:
DTS 3.3.0

setFetchedSubconcepts

public void setFetchedSubconcepts(OntylogConcept[] subconcepts)
Sets the direct subconcepts for this concept.

Parameters:
subconcepts - the direct subconcepts
Since:
DTS 3.3.0

getFetchedRoles

public DTSRole[] getFetchedRoles()
Gets the (inferred) roles which have been retrieved for this concept.

Returns:
an array of the roles

getRoleGroups

public RoleGroup[] getRoleGroups()
This is a convenience method that returns the role groups containing the roles for this concept, if the roles have been retrieved for this concept. Role group 0 will contain those roles which are not in a role group.

Returns:
role groups containing the roles.
Since:
DTS 3.3.0

getNumberOfSpecifiedRoles

public int getNumberOfSpecifiedRoles()
Get the number of roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.

Returns:
number of roles of the specified types

setNumberOfSpecifiedRoles

public void setNumberOfSpecifiedRoles(int count)
Set the number of roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.


getFetchedInverseRoles

public DTSRole[] getFetchedInverseRoles()
Gets the inverse roles which have been retrieved for this concept, that is, the roles of other concepts which have this concept as a value.

Returns:
an array of the inverse roles

getNumberOfSpecifiedInverseRoles

public int getNumberOfSpecifiedInverseRoles()
Get the number of inverse roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.

Returns:
number of inverse roles of the specified types

setNumberOfSpecifiedInverseRoles

public void setNumberOfSpecifiedInverseRoles(int count)
Get the number of inverse roles that are available of the types specified in the ConceptAttributeSetDescriptor used to obtain this OntylogConcept.


getFetchedHasSubs

public boolean getFetchedHasSubs()
Tests if the concept has subconcepts.

Returns:
If the concept has subconcepts, return true. Otherwise, return false.

setFetchedHasSubs

public void setFetchedHasSubs(boolean fetchedHasSubs)
Sets indicator of whether the concept has subconcepts.

Parameters:
fetchedHasSubs - true if the concept has subconcepts; false otherwise.

getFetchedHasSups

public boolean getFetchedHasSups()
Tests if the concept has superconcepts.

Returns:
If the concept has superconcepts, return true. Otherwise, return false.

setFetchedHasSups

public void setFetchedHasSups(boolean fetchedHasSups)
Sets indicator of whether the concept has superconcepts.

Parameters:
fetchedHasSups - true if the concept has superconcepts; false otherwise.

addRole

public boolean addRole(DTSRole role)
Adds the specified element as role for this concept.

Parameters:
role - DTSRole to add
Returns:
false if the concept already had the role; true if the role was added

containsRole

public boolean containsRole(DTSRole role)
Tests if this concept already has the specified role.

Parameters:
role - the DTSRole to test
Returns:
true if this concept contains the role argument; otherwise false

deleteRole

public boolean deleteRole(DTSRole role)
Deletes the specified element as role for this concept.

Parameters:
role - DTSRole to delete
Returns:
true if removed successfully; otherwise false

addInverseRole

public boolean addInverseRole(DTSRole invRole)
Adds the specified element as inverse role for this concept.

Parameters:
invRole - inverse DTSRole to add
Returns:
false if the concept already had the inverse role; true if the inverse role was added

containsInverseRole

public boolean containsInverseRole(DTSRole invRole)
Tests if this concept already has the specified inverse role.

Parameters:
invRole - the inverse DTSRole to test
Returns:
true if this concept contains the inverse concept association argument; otherwise false

deleteInverseRole

public boolean deleteInverseRole(DTSRole invRole)
Deletes the specified element as inverse role for this concept.

Parameters:
invRole - inverse DTSRole to delete
Returns:
true if removed successfully; otherwise false

getFetchedPrimitive

public boolean getFetchedPrimitive()
If the defined view attributes have been retrieved, indicates if this Ontylog concept is primitive or defined.

Returns:
true if this concept is primitive; false if it is defined.
Since:
DTS 3.3.0

setFetchedPrimitive

public void setFetchedPrimitive(boolean primitive)
Sets whether this Ontylog concept is to be primitive or defined.

Parameters:
primitive - set to true to make this concept primitive, false to make it defined.
Since:
DTS 3.3.0

getFetchedKind

public Kind getFetchedKind()
Gets the Kind of this concept if the defined view attributes have been retrieved.

Returns:
the Kind of this concept.
Since:
DTS 3.3.0

setFetchedKind

public void setFetchedKind(Kind kind)
Sets the Kind of this concept. The Kind determines what roles this concept is allowed to have.

Parameters:
kind - the Kind of this concept.
Since:
DTS 3.3.0

getFetchedDefiningConcepts

public OntylogConcept[] getFetchedDefiningConcepts()
If the defined view attributes have been retrieved, gets the defining concepts of this concept.

Returns:
the defining concepts, also known as the defined superconcepts
Since:
DTS 3.3.0

addDefiningConcept

public boolean addDefiningConcept(OntylogConcept definingConcept)
Adds the specified element as a defining concept for this concept.

Parameters:
definingConcept - defining concept to add
Returns:
false if the concept already had the defining role; true if the role was added.
Since:
DTS 3.3.0

containsDefiningConcept

public boolean containsDefiningConcept(OntylogConcept definingConcept)
Tests if this concept already has the specified defining concept.

Parameters:
definingConcept - defining concept to test
Returns:
true if this concept contains the defining concept argument; otherwise false.
Since:
DTS 3.3.0

deleteDefiningConcept

public boolean deleteDefiningConcept(OntylogConcept definingConcept)
Deletes the specified element as a defining concept for this concept.

Parameters:
definingConcept - defining concept to delete
Returns:
true if removed successfully; otherwise false.
Since:
DTS 3.3.0

getFetchedDefiningRoles

public DTSRole[] getFetchedDefiningRoles()
If the defined view attributes have been retrieved, gets the defining roles of this concept.

Returns:
the defining roles
Since:
DTS 3.3.0

getDefiningRoleGroups

public RoleGroup[] getDefiningRoleGroups()
This is a convenience that returns the role groups containing the defining roles for this concept, if the defined view attributes (which include the defining roles) have been retrieved. Role group 0 will contain those defining roles which are not in a role group.

Returns:
role groups containing the defining roles.
Since:
DTS 3.3.0

addDefiningRole

public boolean addDefiningRole(DTSRole definingRole)
Adds the specified element as a defining role for this concept.

Parameters:
definingRole - defining DTSRole to add
Returns:
false if the concept already had the defining role; true if the role was added.
Since:
DTS 3.3.0

containsDefiningRole

public boolean containsDefiningRole(DTSRole definingRole)
Tests if this concept already has the specified defining role.

Parameters:
definingRole - defining DTSRole to test
Returns:
true if this concept contains the defining role argument; otherwise false.
Since:
DTS 3.3.0

deleteDefiningRole

public boolean deleteDefiningRole(DTSRole definingRole)
Deletes the specified element as a defining role for this concept.

Parameters:
definingRole - defining DTSRole to delete
Returns:
true if removed successfully; otherwise false.
Since:
DTS 3.3.0


Copyright © 2011. All Rights Reserved.