com.apelon.dts.client.events
Class ConceptEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.apelon.dts.client.events.DataChangeEvent
          extended by com.apelon.dts.client.events.ConceptEvent
All Implemented Interfaces:
Serializable

public class ConceptEvent
extends DataChangeEvent

An event which indicates that a concept action occurred.

A concept action is considered to occur in either of the following situation:

Since:
DTS 3.4
Version:
DTS 3.4
Author:
Apelon Inc.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.apelon.dts.client.events.DataChangeEvent
EVENT_TYPE_DELETE, EVENT_TYPE_FIRST, EVENT_TYPE_LAST, EVENT_TYPE_MODIFY, EVENT_TYPE_NEW, INVALID_TYPE_EVENT
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConceptEvent(Object source, DTSConcept concept, int eventType, ConceptAttributeChange attributeChange)
          Constructs a ConceptEvent object.
 
Method Summary
 ConceptAttributeChange getAttributeChange()
          Get the Concept Attribute Change when a concept is modified.
 DTSConcept getConcept()
          Get the concept which has changed.
 boolean isConceptAffected(DTSConcept concept)
          A method to check if a concept is affected by this concept action.
 boolean isTermAffected(Term term)
          A method to check if a term is affected by this concept action.
 
Methods inherited from class com.apelon.dts.client.events.DataChangeEvent
getChangedData, getEventType, getNewData, getOldData
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConceptEvent

public ConceptEvent(Object source,
                    DTSConcept concept,
                    int eventType,
                    ConceptAttributeChange attributeChange)
Constructs a ConceptEvent object. Initializes the concept attribute change.

Parameters:
source - Should be an object that is a valid source of Concept events.
concept - The concept which has changed. In the case of modifiy, this should be the concept after change.
eventType - If adding a new concept, the eventType should be DataChangeEvent.EVENT_TYPE_NEW If modifying a concept, the eventType should be DataChangeEvent.EVENT_TYPE_MODIFY If deleting a concept, the eventType should be DataChangeEvent.EVENT_TYPE_DELETE
attributeChange - If the concept is modified, attributeChange contains the attributes changes information; If the concept is added or is deleted, attributeChange should be null.
See Also:
ConceptListener, DTSEventMulticaster, ConceptAttributeChange, DataChangeEvent
Method Detail

getAttributeChange

public ConceptAttributeChange getAttributeChange()
Get the Concept Attribute Change when a concept is modified.

Returns:
ConceptAttributeChange It contains the concept attribute changes information when a concept is updated.

getConcept

public DTSConcept getConcept()
Get the concept which has changed. This Concept may only contains basic concept information like name, id, and namespaceid. To get more concept information you have to set corresponding ConceptAttributeSetDescriptor and send a query request to server to get them.

Returns:
DTSConcept If a concept is added, return the concept which is added; If a concept is updated, return the concept after updating; If a concept is deleted, return the concept which is deleted.

isConceptAffected

public boolean isConceptAffected(DTSConcept concept)
A method to check if a concept is affected by this concept action.

Parameters:
concept - the concept to be checked.
Returns:
boolean true - if the concept is affected by this concept action. false - if the concept is not affected by this concept action.

isTermAffected

public boolean isTermAffected(Term term)
A method to check if a term is affected by this concept action.

Parameters:
term - the term to be checked.
Returns:
boolean true - if the term is affected by this concept action. false - if the term is not affected by this concept action.


Copyright © 2011. All Rights Reserved.