Class TdbCategory
java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.classification.TdbCategory
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink,TdbControlObjectProvider,Iterable<TdbTrainingInfo>
public class TdbCategory
extends TdbMessageProvider
implements com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider, Iterable<TdbTrainingInfo>
Container and manipulation logic for a single category from a classification scheme
-
Constructor Summary
ConstructorsConstructorDescriptionTdbCategory(TdbSession session) Constructor, creates a blank instanceTdbCategory(TdbSession session, TdbControlObject ob) Constructor, creates an instance for the category referenced by the provided Control object -
Method Summary
Modifier and TypeMethodDescriptionvoidget()Retrieve information about the category.Retrieve any comment associated with the categoryRetrieve the Control object reference with which the category was constructedintgetId()Retrieve the unique ID assigned by the server to this categorygetName()Retrieve the name of the categoryRetrieve a reference to the classification scheme with which this category is associatediterator()Retrieve an iterator over the collection of training information available for this categoryvoidrename()Rename the category and/or provide it with a new comment.voidsetComment(String comment) Establish a comment to be associated with the categoryvoidEstablish the name of the categoryvoidtrain(String data, String filename, TdbTrainingInfo info) Add training data to the category.Retrieve a copy of the collection of training information available for this categoryvoiduntrain()Remove all training data for this category.Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessagesMethods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelableMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TdbCategory
Constructor, creates an instance for the category referenced by the provided Control object- Parameters:
session- Active sessionob- Control object referencing the category- Throws:
TdbException
-
TdbCategory
Constructor, creates a blank instance- Parameters:
session- Active session- Throws:
TdbException
-
-
Method Details
-
getScheme
Retrieve a reference to the classification scheme with which this category is associated- Returns:
- Reference to the containing classification scheme
-
getName
Retrieve the name of the category- Returns:
- Category name
-
setName
Establish the name of the category- Parameters:
name- The name of the new category
-
getComment
Retrieve any comment associated with the category- Returns:
- Category comment, if any
-
setComment
Establish a comment to be associated with the category- Parameters:
comment- Category comment
-
getId
Retrieve the unique ID assigned by the server to this category- Returns:
- Category ID
- Throws:
TdbException
-
getControlObject
Retrieve the Control object reference with which the category was constructed- Specified by:
getControlObjectin interfaceTdbControlObjectProvider- Returns:
- Control object reference
-
iterator
Retrieve an iterator over the collection of training information available for this category- Specified by:
iteratorin interfaceIterable<TdbTrainingInfo>- Returns:
- Training information iterator
-
trainingInfo
Retrieve a copy of the collection of training information available for this category- Returns:
- Training information collection
-
rename
Rename the category and/or provide it with a new comment. Invoking this method causes network I/O.- Throws:
TdbException
-
train
Add training data to the category. Invoking this method causes network I/O.- Parameters:
data- Training datafilename- (optional) Filename from which training data was readinfo- If not null, on completion will contain the new training information summary- Throws:
TdbException
-
untrain
Remove all training data for this category. Invoking this method causes network I/O.- Throws:
TdbException
-
get
Retrieve information about the category. Invoking this method causes network I/O.- Throws:
TdbException
-