Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.hipergate
Class Term

    java.lang.Object
      com.knowgate.dataobjs.DBPersist
          com.knowgate.hipergate.Term

All Implemented Interfaces:
  java.io.Serializable, java.util.Map

    public class Term

extends DBPersist

Thesauri Term

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Field Summary
`static short` | `ClassId`
`static int` | `SCOPE_ALL`
`static int` | `SCOPE_ONE`

Fields inherited from class com.knowgate.dataobjs.DBPersist
`AllVals, sAuditCls, sAuditUsr, sTransactId`

Constructor Summary
`Term()`

Method Summary
`boolean` | `delete(JDCConnection oConn)` Delete a Term and all its synonyms
`static boolean` | `delete(JDCConnection oConn, java.lang.String sTermGUID)` Delete a Term and all its synonyms
`java.util.LinkedList` | `getChilds(JDCConnection oConn, int iScope)` Get child terms for this term.
`static java.lang.String` | `getIdFromText(JDCConnection oConn, int iDomainId, java.lang.String sTermText)` Get a term GUID given its exact singular or plural name
`java.lang.String` | `getParent(JDCConnection oConn)` Get Term Parent GUID
`int` | `level()` Get term level [1..10]
`boolean` | `load(JDCConnection oConn, int iIdDomain, java.lang.String sTxTerm)` Load a Term given its Domain and Text

Methods inherited from class com.knowgate.dataobjs.DBPersist
`allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, store, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### ClassId

    public static final short ClassId

See Also:
  Constant Field Values

### SCOPE_ONE

    public static final int SCOPE_ONE

See Also:
  Constant Field Values

### SCOPE_ALL

    public static final int SCOPE_ALL

See Also:
  Constant Field Values

Constructor Detail

### Term

    public Term()

Method Detail

### load

    public boolean load(JDCConnection oConn,
                        int iIdDomain,
                        java.lang.String sTxTerm)
                 throws java.sql.SQLException

  Load a Term given its Domain and Text

  Parameters:
    `oConn` - Database Connection
    `iIdDomain` - Domain to which term belongs
    `sTxTerm` - Term Text
  Returns:
    true if a term was found with given text
  Throws:
    `java.sql.SQLException`

### delete

    public boolean delete(JDCConnection oConn)
                   throws java.sql.SQLException

  Delete a Term and all its synonyms

  Overrides:
    `delete` in class `DBPersist`
  Parameters:
    `oConn` - Database Connection
    `sTermGUID` - Term GUID
  Returns:
    true if register was successfully erased, false if not.
  Throws:
    `java.sql.SQLException`

### delete

    public static boolean delete(JDCConnection oConn,
                                 java.lang.String sTermGUID)
                          throws java.sql.SQLException

  Delete a Term and all its synonyms

  Parameters:
    `oConn` - Database Connection
    `sTermGUID` - Term GUID
  Throws:
    `java.sql.SQLException`

### level

    public int level()

  Get term level [1..10]

### getParent

    public java.lang.String getParent(JDCConnection oConn)
                               throws java.sql.SQLException

  Get Term Parent GUID

  Parameters:
    `oConn` - Database Connection
  Returns:
    Parent Term GUID or null if this is a root term
  Throws:
    `java.sql.SQLException`

### getChilds

    public java.util.LinkedList getChilds(JDCConnection oConn,
                                          int iScope)
                                   throws java.sql.SQLException

  Get child terms for this term.

  Parameters:
    `oConn` - Database Connection
    `iScope` - SCOPE_ONE for just first level childs or SCOPE_ALL for childs from all levels down
  Returns:
    LinkedList of Terms with in-depth child walkthrought
    for example, if representing a geographic thesauri: WORLD,AMERICA,NORTH AMERICA,USA,CANADA,MEXICO,SOUTH AMERICA,BRAZIL,ARGENTINA,CHILE,EUROPE,SPAIN,FRANCE,GERMANY
  Throws:
    `java.sql.SQLException`

### getIdFromText

    public static java.lang.String getIdFromText(JDCConnection oConn,
                                                 int iDomainId,
                                                 java.lang.String sTermText)
                                          throws java.sql.SQLException

  Get a term GUID given its exact singular or plural name

  Parameters:
    `oConn` - Database Connection
    `iDomainId` - Domain Numeric Unique Identifier
    `sTermText` - Exact term singular or plural text case sensitive
  Returns:
    Term Unique Id. or null if no term was found with such text.
  Throws:
    `java.sql.SQLException`
  Since:
    4.0

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD