com.apelon.dts.client.term
Class Term

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.term.Term
All Implemented Interfaces:
MatchItem, Cloneable

public class Term
extends PropertiedObject
implements MatchItem

DTS representation of a term, which can be associated with or independent of any DTSConcept.

Copyright: Copyright (c) 2003

Company: Apelon, Inc.

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

Constructor Summary
Term()
           
Term(String name, int namespaceId)
          Contructs a term which has a name, and namespace ID: the code and id will be generated when this Term is added to the server.
Term(String name, int id, String code, int namespaceId)
          Contructs a term which has a name, code, ID, and namespace ID.
 
Method Summary
 void addInverseTermAssociation(TermAssociation inverseTermAssociation)
          Adds the specified element as an inverse term association for this term.
 void addSynonym(Synonym synonym)
          Adds the specified element as synonym which this term refers to.
 void addTermAssociation(TermAssociation termAssociation)
          Adds the specified element as a term association for this term.
 void deleteInverseTermAssociation(TermAssociation inverseTermAssociation)
          Deletes the specified element as an inverse term association for this term.
 void deleteSynonym(Synonym synonym)
          Deletes the specified element as synonym which this term refers to.
 void deleteTermAssociation(TermAssociation termAssociation)
          Deletes the specified element as a term association for this term.
 boolean equals(Object obj)
          Compares this term to the specified object.
 TermAssociation[] getFetchedInverseTermAssociations()
          Gets the inverse term associations which have been fetched for this term.
 Synonym[] getFetchedSynonyms()
          Gets the syonyms which have been fetched for this term.
 TermAssociation[] getFetchedTermAssociations()
          Gets the term associations which have been fetched for this term.
 TermAssociation[] getInverseTermAssociations()
           
 MatchItemType getMatchItemType()
          Gets the match item type, i.e.
 String getMatchString()
          Gets the string that was matched.
 int getNumberOfSpecifiedInverseTermAssociations()
          Get the number of inverse term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.
 int getNumberOfSpecifiedSynonyms()
          Get the number of synonyms that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.
 int getNumberOfSpecifiedTermAssociations()
          Get the number of term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.
 Synonym[] getSynonyms()
           
 TermAssociation[] getTermAssociations()
           
 void setInverseTermAssociations(TermAssociation[] inverseTermAssoc)
           
 void setName(String newName)
          Sets a new name for this term.
 void setNumberOfSpecifiedInverseTermAssociations(int count)
          Set the number of inverse term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.
 void setNumberOfSpecifiedSynonyms(int count)
          Set the number of synonyms that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.
 void setNumberOfSpecifiedTermAssociations(int count)
          Set the number of term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.
 void setSynonyms(Synonym[] syns)
           
 void setTermAssociations(TermAssociation[] termAssoc)
           
 
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, setNamespaceId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Term

public Term()

Term

public Term(String name,
            int id,
            String code,
            int namespaceId)
Contructs a term which has a name, code, ID, and namespace ID.

Parameters:
name - name of the term
id - ID of the term
code - code of the term
namespaceId - ID of the term's namespace

Term

public Term(String name,
            int namespaceId)
Contructs a term which has a name, and namespace ID: the code and id will be generated when this Term is added to the server.

Parameters:
name - name of the term
namespaceId - ID of the term's namespace
Method Detail

getMatchString

public String getMatchString()
Gets the string that was matched.

Specified by:
getMatchString in interface MatchItem
Returns:
the term name
Since:
DTS 3.0.0

getMatchItemType

public MatchItemType getMatchItemType()
Gets the match item type, i.e. "Synonymous Term"

Specified by:
getMatchItemType in interface MatchItem
Returns:
MatchItemType for term

addTermAssociation

public void addTermAssociation(TermAssociation termAssociation)
Adds the specified element as a term association for this term.

Parameters:
termAssociation - the term association to be added

deleteTermAssociation

public void deleteTermAssociation(TermAssociation termAssociation)
Deletes the specified element as a term association for this term.

Parameters:
termAssociation - the term association to be deleted

addInverseTermAssociation

public void addInverseTermAssociation(TermAssociation inverseTermAssociation)
Adds the specified element as an inverse term association for this term.

Parameters:
inverseTermAssociation - the inverse term association to be added

deleteInverseTermAssociation

public void deleteInverseTermAssociation(TermAssociation inverseTermAssociation)
Deletes the specified element as an inverse term association for this term.

Parameters:
inverseTermAssociation - the inverse term association to be deleted

addSynonym

public void addSynonym(Synonym synonym)
Adds the specified element as synonym which this term refers to.

Parameters:
synonym - the synonym to be added

deleteSynonym

public void deleteSynonym(Synonym synonym)
Deletes the specified element as synonym which this term refers to.

Parameters:
synonym - the synonym to be deleted

setName

public void setName(String newName)
Sets a new name for this term.

Overrides:
setName in class DTSObject
Parameters:
newName - new name for the term

getFetchedTermAssociations

public TermAssociation[] getFetchedTermAssociations()
Gets the term associations which have been fetched for this term. If a term association has qualifiers, they can be retrieved by using the QualifiedAssociation.getFetchedQualifiers() method.

Returns:
the associations for this term

getTermAssociations

public TermAssociation[] getTermAssociations()

setTermAssociations

public void setTermAssociations(TermAssociation[] termAssoc)

getNumberOfSpecifiedTermAssociations

public int getNumberOfSpecifiedTermAssociations()
Get the number of term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.

Returns:
number of term associations of the specified types

setNumberOfSpecifiedTermAssociations

public void setNumberOfSpecifiedTermAssociations(int count)
Set the number of term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.

Parameters:
count - number of term associations of the types specified in ConceptAttributeSetDescriptor

getFetchedInverseTermAssociations

public TermAssociation[] getFetchedInverseTermAssociations()
Gets the inverse term associations which have been fetched for this term. If a term association has qualifiers, they can be retrieved by using the QualifiedAssociation.getFetchedQualifiers() method.

Returns:
the associations for this term

getInverseTermAssociations

public TermAssociation[] getInverseTermAssociations()

setInverseTermAssociations

public void setInverseTermAssociations(TermAssociation[] inverseTermAssoc)

getNumberOfSpecifiedInverseTermAssociations

public int getNumberOfSpecifiedInverseTermAssociations()
Get the number of inverse term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.

Returns:
number of inverse term associations of the specified types

setNumberOfSpecifiedInverseTermAssociations

public void setNumberOfSpecifiedInverseTermAssociations(int count)
Set the number of inverse term associations that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.

Parameters:
count - number of inverse term associations of the types specified in TermAttributeSetDescriptor

getFetchedSynonyms

public Synonym[] getFetchedSynonyms()
Gets the syonyms which have been fetched for this term.

Returns:
the synonyms for this term

getSynonyms

public Synonym[] getSynonyms()

setSynonyms

public void setSynonyms(Synonym[] syns)

getNumberOfSpecifiedSynonyms

public int getNumberOfSpecifiedSynonyms()
Get the number of synonyms that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.

Returns:
number of inverse term associations of the specified types

setNumberOfSpecifiedSynonyms

public void setNumberOfSpecifiedSynonyms(int count)
Set the number of synonyms that are available of the types specified in the TermAttributeSetDescriptor used to obtain this Term.

Parameters:
count - number of syonyms of the types specified in TermAttributeSetDescriptor

equals

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

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


Copyright © 2011. All Rights Reserved.