com.apelon.dts.client.attribute
Class PropertyTypeQuery

java.lang.Object
  extended by com.apelon.apelonserver.client.BasicQuery
      extended by com.apelon.dts.client.attribute.QualifierTypeQuery
          extended by com.apelon.dts.client.attribute.PropertyTypeQuery
Direct Known Subclasses:
BaseConceptQuery, BaseTermQuery

public abstract class PropertyTypeQuery
extends QualifierTypeQuery

PropertyTypeServer is a base query server class that allows the creation, modification, and deletion of property types.

The following events are fired in this class:

Copyright: Copyright (c) 2007

Company: Apelon, Inc.

Since:
DTS 3.0.0
Version:
DTS 3.4.1

Field Summary
 
Fields inherited from class com.apelon.dts.client.attribute.QualifierTypeQuery
kbtypeListener
 
Fields inherited from class com.apelon.apelonserver.client.BasicQuery
ADMIN, queryHeader
 
Constructor Summary
protected PropertyTypeQuery()
           
protected PropertyTypeQuery(boolean isValidating)
           
 
Method Summary
 DTSPropertyType addPropertyType(DTSPropertyType propType)
          Add a concept or term property type.
protected  DTSPropertyType[] buildPropertyTypes(String query)
           
 boolean deletePropertyType(DTSPropertyType propType)
          Deletes a DTSPropertyType from the knowledgebase.
 DTSPropertyType findPropertyTypeByCode(String code, int namespaceId)
          Retrieves the property type with the specified string value code.
 DTSPropertyType findPropertyTypeById(int id, int namespaceId)
          Retrieves the property type with the specified ID.
 DTSPropertyType findPropertyTypeByName(String name, int namespaceId)
          Retrieves the property type with the specified name.
 boolean isPropertyTypeUsed(DTSPropertyType propType)
          Returns whether the given Property Type is used in a property definition or not.
 DTSPropertyType updatePropertyType(DTSPropertyType oldPropertyType, DTSPropertyType newPropertyType)
          Updates a qualifier type in the knowledgebase corresponding to the passed old DTSPropertyType, using the values from the new DTSPropertyType.
 
Methods inherited from class com.apelon.dts.client.attribute.QualifierTypeQuery
addKBTypeListener, addQualifierType, deleteQualifierType, findQualifierTypeByCode, findQualifierTypeById, findQualifierTypeByName, fireKBTypeAction, getAllConceptAssociationQualifierTypes, getAllConceptPropertyQualifierTypes, getAllQualifierTypes, getAllTermAssociationQualifierTypes, getAllTermPropertyQualifierTypes, getConceptAssociationQualifierTypes, getConceptPropertyQualifierTypes, getKBTypeListener, getTermAssociationQualifierTypes, getTermPropertyQualifierTypes, removeKBTypeListener, updateQualifierType
 
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
 

Constructor Detail

PropertyTypeQuery

protected PropertyTypeQuery()

PropertyTypeQuery

protected PropertyTypeQuery(boolean isValidating)
Method Detail

addPropertyType

public DTSPropertyType addPropertyType(DTSPropertyType propType)
                                throws DTSException
Add a concept or term property type.

Parameters:
propType - property type to add
Returns:
DTSPropertyType a fully populated instance of the property type submitted: if the id and/or code were not supplied the server will generate the code and/or id and return the generated values in the returned property type.
Throws:
DTSException - if any error occurs in the method

deletePropertyType

public boolean deletePropertyType(DTSPropertyType propType)
                           throws DTSException
Deletes a DTSPropertyType from the knowledgebase.

Parameters:
propType - DTSPropertyType to delete
Returns:
true if the DTSPropertyType is successfully deleted; false if not
Throws:
DTSException - if any error occurs in the method

updatePropertyType

public DTSPropertyType updatePropertyType(DTSPropertyType oldPropertyType,
                                          DTSPropertyType newPropertyType)
                                   throws DTSException
Updates a qualifier type in the knowledgebase corresponding to the passed old DTSPropertyType, using the values from the new DTSPropertyType.

Parameters:
oldPropertyType - the qualifier type to be updated
newPropertyType - the qualifier type as it should look when updated
Returns:
an instance of the updated DTSPropertyType.
Throws:
DTSException - if any error occurs in the method

findPropertyTypeByName

public DTSPropertyType findPropertyTypeByName(String name,
                                              int namespaceId)
                                       throws DTSException
Retrieves the property type with the specified name.

Parameters:
name - the property name of the DTSPropertyType to fetch
namespaceId - ID of the concept's namespace
Returns:
the DTSPropertyType, or null if not found
Throws:
DTSException - if any error occurs in the method

findPropertyTypeById

public DTSPropertyType findPropertyTypeById(int id,
                                            int namespaceId)
                                     throws DTSException
Retrieves the property type with the specified ID.

Parameters:
id - the property ID of the DTSPropertyType to fetch
namespaceId - ID of the concept's namespace
Returns:
the DTSPropertyType, or null if not found
Throws:
DTSException - if any error occurs in the method
Since:
DTS 3.0.0

findPropertyTypeByCode

public DTSPropertyType findPropertyTypeByCode(String code,
                                              int namespaceId)
                                       throws DTSException
Retrieves the property type with the specified string value code.

Parameters:
code - the property code of the DTSPropertyType to fetch
namespaceId - ID of the concept's namespace
Returns:
the DTSPropertyType, or null if not found
Throws:
DTSException - if any error occurs in the method
Since:
DTS 3.0.0

isPropertyTypeUsed

public boolean isPropertyTypeUsed(DTSPropertyType propType)
                           throws DTSException
Returns whether the given Property Type is used in a property definition or not.

Parameters:
propType - DTS Property Type
Returns:
true if the DTS Property Type is used in property definition else false.
Throws:
DTSException - for any error while executing request
Since:
3.4.0

buildPropertyTypes

protected DTSPropertyType[] buildPropertyTypes(String query)
                                        throws DTSException
Throws:
DTSException


Copyright © 2011. All Rights Reserved.