|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.apelon.apelonserver.client.BasicQuery com.apelon.dts.client.attribute.QualifierTypeQuery com.apelon.dts.client.attribute.PropertyTypeQuery com.apelon.dts.client.concept.BaseConceptQuery com.apelon.dts.client.concept.BaseLocalConceptQuery com.apelon.dts.client.concept.OntylogExtConceptQuery
public abstract class OntylogExtConceptQuery
OntylogExtConceptQuery
is a subclass of
BaseLocalConceptQuery
. It can be instantiated to invoke the
methods in BaseLocalConceptQuery
, which operate on both Ontylog and Thesaurus
concepts, by using methods createInstance(com.apelon.apelonserver.client.ServerConnection sc)
or
createInstance(com.apelon.apelonserver.client.ServerConnection sc, boolean isValidating)
. Ontylog
concepts reside in a standard terminology namespace, provided by subscription
from Apelon, or loaded from a TDE or existing DTS 2.4 database. Concepts in
an Ontylog namespace cannot be added or deleted using DTS (TDE must be used
for this purpose), but properties and synonyms of concepts may be added,
deleted, or modified. Concepts can be added in an Ontylog Extension namespace (as it extends the
BaseLocalConceptQuery
) just as in the case of Thesaurus namespaces. The concepts
in Ontylog Extension namespace can have defining concepts, roles from any Ontylog namespace.
Also roles for an Ontylog Extension concepts can be grouped or ungrouped and the
concept status can be updated to be either primitive or defined.
The following events are fired in this class:
ConceptEvent
is fired for adding/modifying/deleting
DefiningConcept
, DefiningRole
, or group/ungroup
Role Group Number, updating Concept Primitive
OntylogExtConceptQuery oecq1 = null; OntylogExtConceptQuery oecq2 = null; // Initialization code for oecq1 and oecq2 oecq2.addConceptListener(oecq1.getConceptListener()); // Now any event from oecq2 will be available to oecq1 listeners
Copyright: Copyright (c) 2003
Company: Apelon, Inc.
Field Summary |
---|
Fields inherited from class com.apelon.dts.client.concept.BaseConceptQuery |
---|
conceptListener |
Fields inherited from class com.apelon.dts.client.attribute.QualifierTypeQuery |
---|
kbtypeListener |
Fields inherited from class com.apelon.apelonserver.client.BasicQuery |
---|
ADMIN, queryHeader |
Method Summary | |
---|---|
boolean |
addDefiningConcept(OntylogConcept concept,
OntylogConcept definingConcept)
Adds an Ontylog concept as the defining concept to the Ontylog Extension Concept |
boolean |
addDefiningRole(OntylogConcept concept,
DTSRole role)
Adds a defining role to the given ontylog extension concept |
static OntylogExtConceptQuery |
createInstance(ServerConnection sc)
Creates an instance of OntylogExtConceptQuery . |
static OntylogExtConceptQuery |
createInstance(ServerConnection sc,
boolean isValidating)
Creates an instance of OntylogExtConceptQuery . |
int |
createRoleGroup(OntylogConcept concept,
DTSRole[] roles)
Create a role group with the passed array of roles and returns the role group number. |
boolean |
deleteDefiningConcept(OntylogConcept concept,
OntylogConcept definingConcept)
Removes an Ontylog Concept as the defining concept from a given Ontylog Extension concept |
boolean |
deleteDefiningRole(OntylogConcept concept,
DTSRole role)
Deletes a defining role from the given ontylog extension concept |
void |
ungroupRoleGroup(OntylogConcept concept,
int roleGroupNum)
Disband a role group so that all included roles become ungrouped. |
boolean |
updateDefiningConcept(OntylogConcept concept,
OntylogConcept deleteDefiningConcept,
OntylogConcept addDefiningConcept)
Updates an Ontylog Extension Concept by deleting the given defining concept and adding another defining concept to it. |
boolean |
updateDefiningRole(OntylogConcept concept,
DTSRole deleteRole,
DTSRole addRole)
Updates an ontylog extension concept with a new defining role by removing its other existing defining role. |
boolean |
updatePrimitive(OntylogConcept concept,
boolean primitive)
Changes the given Ontylog Extension concept from primitive to defined or vice versa. |
Methods inherited from class com.apelon.dts.client.concept.BaseLocalConceptQuery |
---|
addConcept, addConcept, deleteConcept, updateConcept, updateConcept |
Methods inherited from class com.apelon.dts.client.concept.BaseConceptQuery |
---|
addConceptListener, addProperty, addSynonym, deleteProperty, deleteSynonym, findConceptByCode, findConceptById, findConceptByName, findConceptsByCode, findConceptsById, findConceptsByName, fireConceptAction, getAllConceptPropertyTypes, getConceptListener, getConceptPropertyTypes, getNamespaceQuery, removeConceptListener, updateProperty, updateSynonym |
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 |
Method Detail |
---|
public static OntylogExtConceptQuery createInstance(ServerConnection sc) throws IllegalArgumentException
OntylogExtConceptQuery
. Depending on the
type of ServerConnection object passed in the argument, the server may be
local (JDBC), socket, or another implementation. When using a socket
connection, the Apelon DTS server must be configured with the following
query server to support OntylogExtConceptQuery:
com.apelon.dts.server.OntylogExConceptServer
ServerConnectionJDBC scJDBC = new ServerConnectionJDBC(user, password, host, port, instance); OntylogExtConceptQuery ontylogExtConceptQuery = OntylogExtConceptQuery.createInstance(scJDBC); sc.setQueryServer(Class.forName("com.apelon.dts.server.OntylogExtConceptServer"), DTSHeader.ONTYLOGEXTCONCEPTSERVER_HEADER);
sc
- the server connection
IllegalArgumentException
- if a null server connection is passedServerConnectionJDBC
,
ServerConnectionSocket
,
ServerConnectionSecureSocket
public static OntylogExtConceptQuery createInstance(ServerConnection sc, boolean isValidating) throws IllegalArgumentException
OntylogExtConceptQuery
. Depending on the
type of ServerConnection object passed in the first argument, the server
may be local (JDBC), socket, or another implementation. The second
argument is a boolean value for XML validation. When using a socket
connection, the Apelon DTS server must be configured with the following
query server to support OntylogExtConceptQuery:
com.apelon.dts.server.OntylogExtConceptServer
ServerConnectionJDBC scJDBC = new ServerConnectionJDBC(user, password, host, port, instance); OntylogExtConceptQuery ontylogExtConceptQuery = OntylogExtConceptQuery.createInstance(scJDBC); sc.setQueryServer(Class.forName("com.apelon.dts.server.OntylogExtConceptServer"), DTSHeader.ONTYLOGEXTCONCEPTSERVER_HEADER);
sc
- the server connectionisValidating
- true
if XML needs to be
validated, false
otherwise.
IllegalArgumentException
- if a null server connection is passedServerConnectionJDBC
,
ServerConnectionSocket
,
ServerConnectionSecureSocket
public boolean updatePrimitive(OntylogConcept concept, boolean primitive) throws DTSException
concept
- The Ontylog Extension Concept to modifyprimitive
- If true then make the concept defined, other wise make is
primitive
OntylogConcept
changed to
primitive from defined or vice versa
IllegalArgumentException
- if a null concept is passed
DTSException
- if any error occurs in the methodpublic boolean addDefiningConcept(OntylogConcept concept, OntylogConcept definingConcept) throws DTSException, DTSValidationException
concept
- The Ontylog Extension Concept to be modifieddefiningConcept
- The Ontylog Concept to be added as defining concept
OntylogConcept
is updated
with the new defining concept
IllegalArgumentException
- if null concept arguments are passed
DTSValidationException
- when a concept is added as a defining concept to itself
DTSException
- for any other errorpublic boolean deleteDefiningConcept(OntylogConcept concept, OntylogConcept definingConcept) throws DTSException, DTSValidationException
concept
- The Ontylog Extension Concept to be modifieddefiningConcept
- The Ontylog Concept to be removed as defining concept
OntylogConcept
IllegalArgumentException
- if null concept arguments are passed
DTSValidationException
- if the concept doesn't contain the defining concept
DTSException
- for any other errorpublic boolean updateDefiningConcept(OntylogConcept concept, OntylogConcept deleteDefiningConcept, OntylogConcept addDefiningConcept) throws DTSException, DTSValidationException
concept
- The Ontylog Extension Concept to be modifieddeleteDefiningConcept
- The Ontylog Concept to be removed as defining conceptaddDefiningConcept
- The Ontylog Concept to be added as defining concept
OntylogConcept
is updated
with the new defining concept
IllegalArgumentException
- if null concept arguments are passed
DTSValidationException
- when a concept itself is added as a defining concept or if invalid
concept is added to it or non-existent defining concept is required
to be removed from the Ontylog Extension concept.
DTSException
- for any other errorpublic boolean addDefiningRole(OntylogConcept concept, DTSRole role) throws DTSException, DTSValidationException
concept
- the ontylog extension concept to be modifiedrole
- the role to be added to the above concept
IllegalArgumentException
- if a null concept or role is passed
DTSValidationException
- when the concept itself is added as the role value concept
DTSException
- for any other errorpublic boolean deleteDefiningRole(OntylogConcept concept, DTSRole role) throws DTSException, DTSValidationException
concept
- the ontylog extension concept to be modifiedrole
- the role to be removed from the above concept
IllegalArgumentException
- if a null concept or role is passed.
DTSValidationException
- if the concept doesn't contain the defining role
DTSException
- for any other errorpublic boolean updateDefiningRole(OntylogConcept concept, DTSRole deleteRole, DTSRole addRole) throws DTSException, DTSValidationException
concept
- the ontylog extension concept to be modifieddeleteRole
- the role to be deleted from the above conceptaddRole
- the role to be added to the above concept
IllegalArgumentException
- if a null concept or role is passed.
DTSValidationException
- when the concept itself is added as the role value concept
DTSException
- for any other errorpublic int createRoleGroup(OntylogConcept concept, DTSRole[] roles) throws DTSException, DTSValidationException
concept
- concept for which the role group is to be createdroles
- array of roles to include in the new role group
IllegalArgumentException
- if any argument is null
.
DTSValidationException
- if any role is already in another role group.
DTSException
- if any other error occurs in the method.public void ungroupRoleGroup(OntylogConcept concept, int roleGroupNum) throws DTSException
concept
- a concept containing the role group to be ungroupedroleGroupNum
- the number of the role group to be ungrouped
IllegalArgumentException
- if the concept argument is null
,
or if invalid role group number is passed
(must be 1 or greater).
DTSException
- if any other error occurs in the method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |