|
||||||||||
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.BaseOntylogConceptQuery
public abstract class BaseOntylogConceptQuery
The BaseOntylogConceptQuery
class provides access to Ontylog
concepts. Ontylog concepts reside in an externally defined 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.
Note: Many methods that OntylogConceptQuery inherits from
DTSConceptQuery
can be regarded as factory methods whose product is
an OntylogConcept
instead of a DTSConcept
. Those methods
that return a DTSConcept will in fact return an OntylogConcept when called
from OntylogConceptQuery. You will need to cast the returned object to an
OntylogConcept in order to use any methods specific to an OntylogConcept.
Also of course since OntylogConcept extends DTSConcept, anywhere a DTSConcept
is required to pass as an argument, you may and normally would pass an
OntylogConcept when invoking the method from OntylogConceptQuery.
Copyright: Copyright (c) 2007
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 |
addRoleType(DTSRoleType roleType)
Adds a new Role Type to a writable Ontylog Extension Namespace. |
protected void |
assertIsNotNull(Object obj,
String objName)
Asserts that the given object is not null. |
boolean |
deleteRoleType(DTSRoleType roleType)
Deletes the given Role Type from writable Ontylog Extension Namespace. |
boolean |
deleteRoleType(DTSRoleType roleType,
boolean removeReferencesInRoleTypes)
Deletes the given Role Type from writable Ontylog Extension Namespace. |
DTSRoleType[] |
fetchParentReferences(DTSRoleType roleType)
Fetches the array of children Role Types of the given Role Type. |
DTSRoleType[] |
fetchRightIdentityReferences(DTSRoleType roleType)
Fetches the array of Role Types where the given Role type is the Right Identity |
DTSRoleType |
findRoleTypeByCode(String code,
int namespaceId)
Retrieves the role type with the specified string valued code. |
DTSRoleType |
findRoleTypeById(int id,
int namespaceId)
Retrieves the role type with the specified ID. |
DTSRoleType |
findRoleTypeByName(String name,
int namespaceId)
Retrieves the role type with the specified name. |
Kind[] |
getAllKinds()
Retrieves all Kind s. |
DTSRoleType[] |
getAllRoleTypes()
Retrieves all role types. |
Kind[] |
getKinds(int namespaceId)
Retrieves the Kind s for a given namespace. |
protected com.apelon.dts.util.DTSResponse |
getResponse(com.apelon.dts.util.DTSRequest request)
Sends in a DTSRequest query object and returns the DTSResponse object from the server |
DTSRoleType[] |
getRoleTypes(int namespaceId)
Retrieves all concept role types within a given namespace. |
boolean |
isRoleTypeUsed(DTSRoleType roleType)
Determines whether the given Role Type is used in a Role definition. |
boolean |
updateRoleType(DTSRoleType oldRoleType,
DTSRoleType newRoleType)
Updates the given Role Type in a writable Ontylog Extension Namespace. |
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 Kind[] getAllKinds() throws DTSException
Kind
s.
Kind
s. Returns an empty array
if there are no Kind
s.
DTSException
- if any error occurs in the methodpublic Kind[] getKinds(int namespaceId) throws DTSException
Kind
s for a given namespace.
namespaceId
- the ID of the namespace of interest
Kind
s.
DTSException
- if any error occurs in the methodpublic DTSRoleType[] getAllRoleTypes() throws DTSException
DTSException
- if any error occurs in the methodpublic DTSRoleType[] getRoleTypes(int namespaceId) throws DTSException
namespaceId
- the ID of the namespace of interest
DTSRoleType
s in the namespace.
Returns an empty array if there are no concept
DTSRoleType
s.
DTSException
- if any error occurs in the methodpublic DTSRoleType findRoleTypeByName(String name, int namespaceId) throws DTSException
name
- the role name of the DTSRoleType to fetchnamespaceId
- the ID of the role type's namespace
null
if not found
DTSException
- if any error occurs in the methodpublic DTSRoleType findRoleTypeById(int id, int namespaceId) throws DTSException
id
- the role ID of the DTSRoleType to fetchnamespaceId
- the ID of the role type's namespace
null
if not found
DTSException
- if any error occurs in the methodpublic DTSRoleType findRoleTypeByCode(String code, int namespaceId) throws DTSException
code
- the role code of the DTSRoleType to fetchnamespaceId
- the ID of the role type's namespace
null
if not found
DTSException
- if any error occurs in the methodpublic boolean addRoleType(DTSRoleType roleType) throws DTSException
Role Type
to a writable Ontylog Extension Namespace.
The attributes of the Role Type are validated for the conditions described below:
When Role Type is added succesfully, ID and Code fields of the Role Type parameter are populated. Registered
KBTypeListener
s are notified through KBTypeEvent
about the addition
of the new role.
roleType
- New Role Type
DTSException
- For any Errorpublic boolean updateRoleType(DTSRoleType oldRoleType, DTSRoleType newRoleType) throws DTSException
Role Type
in a writable Ontylog Extension Namespace. Name, Domain Kind, Range Kind,
Right Identity Role Type and Parent Role Type attributes of a Role Type can be updated. If the Role Type is
used in a Role definition, only name can be updated. Use isRoleTypeUsed(com.apelon.dts.client.attribute.DTSRoleType)
to determine whether the Role Type is used.
The updatable attributes of the Role Type are validated for the conditions described below:
When Role Type is updated succesfully, ID and Code fields of the Role Type parameter are populated. Registered
KBTypeListener
s are notified through KBTypeEvent
about the update
of the existing role.
oldRoleType
- Existing Role Type. The ID and Namespace ID from this is used as key for update.newRoleType
- New Role Type with attributes to to update.
DTSException
- For any errors.public boolean deleteRoleType(DTSRoleType roleType) throws DTSException
Role Type
from writable Ontylog Extension Namespace. If the Role Type is
used in a Role definition, an exception is thrown. Use isRoleTypeUsed(com.apelon.dts.client.attribute.DTSRoleType)
to determine whether the Role Type is used.
If the Role Type is referenced as Parent or Right Identity in another Role Type, an exception is thrown.
roleType
- Role Type to delete. The ID and Namespace ID from this is used as key for delete.
DTSException
- For any error.public boolean deleteRoleType(DTSRoleType roleType, boolean removeReferencesInRoleTypes) throws DTSException
Role Type
from writable Ontylog Extension Namespace. If the Role Type is
used in a Role definition, an exception is thrown. Use isRoleTypeUsed(com.apelon.dts.client.attribute.DTSRoleType)
to determine whether the Role Type is used.
If the Role Type is referenced as Parent or Right Identity in another Role Type, then
if removeReferencesInRoleTypes
is true
, all the references will be removed and the Role Type is deleted.
Otherwise if removeReferencesInRoleTypes
is false
, an exception is thrown.
roleType
- Role Type to delete. The ID and Namespace ID from this is used as key for delete.removeReferencesInRoleTypes
- For true, all the references will be removed and the Role Type is deleted.
Otherwise Role Type will not be deleted if it is referenced and an exception will be thrown.
DTSException
- For any error.public boolean isRoleTypeUsed(DTSRoleType roleType) throws DTSException
roleType
- Role Type to check
DTSException
- for any errorupdateRoleType(com.apelon.dts.client.attribute.DTSRoleType, com.apelon.dts.client.attribute.DTSRoleType)
,
deleteRoleType(com.apelon.dts.client.attribute.DTSRoleType, boolean)
public DTSRoleType[] fetchRightIdentityReferences(DTSRoleType roleType) throws DTSException
roleType
- Role Type
DTSException
- For any errorpublic DTSRoleType[] fetchParentReferences(DTSRoleType roleType) throws DTSException
roleType
- Role Type
DTSException
- For any errorprotected com.apelon.dts.util.DTSResponse getResponse(com.apelon.dts.util.DTSRequest request) throws DTSException
request
- DTSRequest
DTSException
- Wrapped Exceptionprotected void assertIsNotNull(Object obj, String objName)
obj
- Object to verifyobjName
- Name of the object. Used in the exception message.
IllegalArgumentException
- if the given object is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |