|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.apelon.apelonserver.client.BasicQuery
com.apelon.dts.client.attribute.QualifierTypeQuery
com.apelon.dts.client.attribute.PropertyTypeQuery
com.apelon.dts.client.term.BaseTermQuery
public abstract class BaseTermQuery
BaseTermQuery is a base class for TermQuery and
TermSearchQuery. It supports queries on terms, including
their properties.
The following events are fired in this class:
TermEvent is fired for adding/modifying/deleting Term, TermProperty
Copyright: Copyright (c) 2003
Company: Apelon, Inc.
| Field Summary | |
|---|---|
protected TermListener |
termListener
|
| Fields inherited from class com.apelon.dts.client.attribute.QualifierTypeQuery |
|---|
kbtypeListener |
| Fields inherited from class com.apelon.apelonserver.client.BasicQuery |
|---|
ADMIN, queryHeader |
| Method Summary | |
|---|---|
Term |
addProperty(Term term,
DTSProperty property)
Adds a property to a term. |
Term |
addTerm(Term newTerm)
Adds a new Term to the knowledgebase. |
void |
addTermListener(TermListener listener)
|
Term |
deleteProperty(Term term,
DTSProperty property)
Deletes a property from a term. |
boolean |
deleteTerm(Term term)
Deletes a term from the knowledgebase. |
Term |
fetchProperties(Term term)
Fetch the properties for the passed Term. |
Term |
findTermByCode(String termCode,
int namespaceId,
TermAttributeSetDescriptor termDescriptor)
Gets a Term object with the specified code and namespace ID. |
Term |
findTermById(int termId,
int namespaceId,
TermAttributeSetDescriptor termDescriptor)
Gets a Term object by passing the ID and a namespace ID. |
Term[] |
findTermsByName(String termName,
int namespaceId,
TermAttributeSetDescriptor termDescriptor)
Gets Term objects with the specified name and namespace ID. |
protected void |
fireTermAction(TermEvent event)
|
DTSPropertyType[] |
getAllTermPropertyTypes()
Retrieves all term property types. |
TermListener |
getTermListener()
Get the TermListener. |
DTSPropertyType[] |
getTermPropertyTypes(int namespaceId)
Retrieves all term property types within a given namespace. |
void |
removeTermListener(TermListener listener)
|
Term |
updateProperty(Term term,
DTSProperty oldProperty,
DTSProperty newProperty)
Updates a term property. |
Term |
updateTerm(Term oldTerm,
Term newTerm)
Updates a term in the knowledgebase corresponding to the passed old Term, using the values from the new Term. |
| Methods inherited from class com.apelon.dts.client.attribute.PropertyTypeQuery |
|---|
addPropertyType, buildPropertyTypes, deletePropertyType, findPropertyTypeByCode, findPropertyTypeById, findPropertyTypeByName, isPropertyTypeUsed, updatePropertyType |
| Methods inherited from class com.apelon.apelonserver.client.BasicQuery |
|---|
executeQuery, executeQueryNoParse, getServerConnection, initializeDtds, initializeDtds, ping, setVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient TermListener termListener
| Method Detail |
|---|
public Term addTerm(Term newTerm)
throws DTSException
Term to the knowledgebase.
newTerm - new Term to be added
true if Term succesfully added;
false otherwise.
DTSException - if any error occurs in the method
public boolean deleteTerm(Term term)
throws DTSException
term - the term to be deleted
true if term succesfully deleted; false
otherwise.
DTSException - if any error occurs in the method
public Term updateTerm(Term oldTerm,
Term newTerm)
throws DTSException
Term, using the values from the new Term.
oldTerm - the term to be updatednewTerm - the term as it should look when updated
DTSException - if any error occurs in the method
public Term[] findTermsByName(String termName,
int namespaceId,
TermAttributeSetDescriptor termDescriptor)
throws DTSException
Term objects with the specified name and namespace ID.
Since a term name may not be unique within a namespace, it's possible to
have more than one term returned.
termName - the Term namenamespaceId - the Term's namespace IDtermDescriptor - the attribute set descriptor for the term(s)
Terms identified by the specified name and
namespace, along with the specified properties, term
associations and qualifiers
DTSException - if any error occurs in the method
public Term findTermByCode(String termCode,
int namespaceId,
TermAttributeSetDescriptor termDescriptor)
throws DTSException
Term object with the specified code and namespace ID.
A term code is guaranteed to be unique within a namespace, even if the name
is not, so only a single term is returned.
termCode - the Term codenamespaceId - the Term's namespace IDtermDescriptor - the attribute set descriptor for the term(s)
Terms identified by the specified code and
namespace, along with the specified properties, term
associations and qualifiers
DTSException - if any error occurs in the method
public Term findTermById(int termId,
int namespaceId,
TermAttributeSetDescriptor termDescriptor)
throws DTSException
Term object by passing the ID and a namespace ID.
A term ID is guaranteed to be unique within a namespace, even if the name
is not, so only a single term is returned.
termId - the Term IDnamespaceId - the Term's namespace IDtermDescriptor - the attribute set descriptor for the term(s)
Term identified by the specified ID and
namespace, along with the specified properties, term
associations and qualifiers
DTSException - if any error occurs in the method
public Term addProperty(Term term,
DTSProperty property)
throws DTSException
term - the term to which a property will be addedproperty - the property to add
Term with the property added
DTSException - if any error occurs in the method
public Term deleteProperty(Term term,
DTSProperty property)
throws DTSException
term - the term from which a property will be deletedproperty - the property to delete
Term with the property deleted
DTSException - if any error occurs in the method
public Term updateProperty(Term term,
DTSProperty oldProperty,
DTSProperty newProperty)
throws DTSException
term - term for which a property is to be updatedoldProperty - existing property to be updatednewProperty - DTSProperty having updated values
Term with the property updated
DTSException - if any error occurs in the method
public Term fetchProperties(Term term)
throws DTSException
Term.
term - the Term to fetch properties for
DTSException - if any error occurs in the method
public DTSPropertyType[] getAllTermPropertyTypes()
throws DTSException
DTSPropertyTypes.
Returns an empty array if there are no term
DTSPropertyTypes.
DTSException - if any error occurs in the method
public DTSPropertyType[] getTermPropertyTypes(int namespaceId)
throws DTSException
namespaceId - the ID of the namespace of interest
DTSPropertyTypes in the namespace.
Returns an empty array if there are no term
DTSPropertyTypes.
DTSException - if any error occurs in the methodprotected void fireTermAction(TermEvent event)
public TermListener getTermListener()
public void addTermListener(TermListener listener)
public void removeTermListener(TermListener listener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||