com.apelon.dts.client.events
Class ConceptAttributeChange

java.lang.Object
  extended by com.apelon.dts.client.events.ConceptAttributeChange

public class ConceptAttributeChange
extends Object

Defines concept attribute change. It contains all information of a concept modifying.

The concept modifying includes the following situation:

There are six constructors to handle the above situation.

Since:
DTS 3.4
Version:
DTS 3.4
Author:
Apelon Inc.

Field Summary
static int ASSOCIATION
          The constant for concept association change
static int DEFININGCONCEPT
          The constant for concept parent change
static int DELETE
          The constant for change type DELETE
static int INVALID_TYPE
          The constant for INVALID_TYPE
static int MODIFY
          The constant for change type MODIFY
static int NAME
          The constant for concept name change
static int NEW
          The constant for change type NEW
static int PRIMITIVE
          The constant for concept primitive change
static int PROPERTY
          The constant for concept property change
static int ROLE
          The constant for concept role change
static int ROLEGROUP
          The constant for concept role group change
static int SYNONYM
          The constant for concept synonym change
 
Constructor Summary
ConceptAttributeChange(Boolean oldPrimitive, Boolean newPrimitive)
          Constructs a ConceptAttributeChange object for concept primitive change.
ConceptAttributeChange(ConceptAssociation oldAssoc, ConceptAssociation newAssoc)
          Constructs a ConceptAttributeChange object for concept association change.
ConceptAttributeChange(DTSProperty oldProp, DTSProperty newProp)
          Constructs a ConceptAttributeChange object for concept property change.
ConceptAttributeChange(DTSRole oldRole, DTSRole newRole)
          Constructs a ConceptAttributeChange object for concept role change.
ConceptAttributeChange(int oldRoleGroupNum, int newRoleGroupNum)
          Constructs a ConceptAttributeChange object for concept role group change.
ConceptAttributeChange(OntylogConcept oldDefiningConcept, OntylogConcept newDefiningConcept)
          Constructs a ConceptAttributeChange object for concept parent change.
ConceptAttributeChange(String oldName, String newName)
          Constructs a ConceptAttributeChange object for concept name change.
ConceptAttributeChange(Synonym oldSynonym, Synonym newSynonym)
          Constructs a ConceptAttributeChange object for concept synonym change.
 
Method Summary
 int getAttributeType()
          Get Attribute Type.
 int getChangeType()
          Get Change Type.
 Object getNewAttribute()
          Get the new Concept Attribute Object.
 Object getOldAttribute()
          Get the old Concept Attribute Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final int NAME
The constant for concept name change

See Also:
Constant Field Values

ASSOCIATION

public static final int ASSOCIATION
The constant for concept association change

See Also:
Constant Field Values

PROPERTY

public static final int PROPERTY
The constant for concept property change

See Also:
Constant Field Values

SYNONYM

public static final int SYNONYM
The constant for concept synonym change

See Also:
Constant Field Values

ROLE

public static final int ROLE
The constant for concept role change

See Also:
Constant Field Values

PRIMITIVE

public static final int PRIMITIVE
The constant for concept primitive change

See Also:
Constant Field Values

DEFININGCONCEPT

public static final int DEFININGCONCEPT
The constant for concept parent change

See Also:
Constant Field Values

ROLEGROUP

public static final int ROLEGROUP
The constant for concept role group change

See Also:
Constant Field Values

NEW

public static final int NEW
The constant for change type NEW

See Also:
Constant Field Values

MODIFY

public static final int MODIFY
The constant for change type MODIFY

See Also:
Constant Field Values

DELETE

public static final int DELETE
The constant for change type DELETE

See Also:
Constant Field Values

INVALID_TYPE

public static final int INVALID_TYPE
The constant for INVALID_TYPE

See Also:
Constant Field Values
Constructor Detail

ConceptAttributeChange

public ConceptAttributeChange(String oldName,
                              String newName)
Constructs a ConceptAttributeChange object for concept name change. Initializes the change type. Initializes the attribute type to NAME.

Parameters:
oldName - If adding a new concept name, the oldName should null; If modifying a concept name, the oldName should be the name before being updated; If deleting a concept name, the oldName should be the name that is deleted.
newName - If adding a new concept name, the newName should be the name that is added; If modifying a concept name, the newName should be the name after being updated; If deleting a concept name, the newName should be null.

ConceptAttributeChange

public ConceptAttributeChange(ConceptAssociation oldAssoc,
                              ConceptAssociation newAssoc)
Constructs a ConceptAttributeChange object for concept association change. Initializes the change type. Initializes the attribute type to ASSOCIATION.

Parameters:
oldAssoc - If adding a new concept association, the oldAssoc should null; If modifying a concept association, the oldAssoc should be the association before being updated; If deleting a concept association, the oldAssoc should be the association that is deleted.
newAssoc - If adding a new concept association, the newAssoc should be the association that is added; If modifying a concept association, the newAssoc should be the association after being updated; If deleting a concept association, the newAssoc should be null.

ConceptAttributeChange

public ConceptAttributeChange(Synonym oldSynonym,
                              Synonym newSynonym)
Constructs a ConceptAttributeChange object for concept synonym change. Initializes the change type. Initializes the attribute type to SYNONYM.

Parameters:
oldSynonym - If adding a new synonym, the oldSynonym should null; If modifying a synonym, the oldSynonym should be the synonym before being updated; If deleting a synonym, the oldSynonym should be the synonym that is deleted.
newSynonym - If adding a new synonym, the newSynonym should be the synonym that is added; If modifying a synonym, the newSynonym should be the synonym after being updated; If deleting a synonym, the newSynonym should be null.

ConceptAttributeChange

public ConceptAttributeChange(DTSProperty oldProp,
                              DTSProperty newProp)
Constructs a ConceptAttributeChange object for concept property change. Initializes the change type. Initializes the attribute type to PROPERTY.

Parameters:
oldProp - If adding a new concept property, the oldProp should null; If modifying a concept property, the oldProp should be the property before being updated; If deleting a concept property, the oldProp should be the property that is deleted.
newProp - If adding a new concept property, the newProp should be the property that is added; If modifying a concept property, the newProp should be the property after being updated; If deleting a concept property, the newProp should be null.

ConceptAttributeChange

public ConceptAttributeChange(DTSRole oldRole,
                              DTSRole newRole)
Constructs a ConceptAttributeChange object for concept role change. Initializes the change type. Initializes the attribute type to ROLE.

Parameters:
oldRole - If adding a new concept role, the oldRole should null; If modifying a concept role, the oldRole should be the role before being updated; If deleting a concept role, the oldRole should be the role that is deleted.
newRole - If adding a new concept role, the newRole should be the role that is added; If modifying a concept role, the newRole should be the role after being updated; If deleting a concept role, the newRole should be null.

ConceptAttributeChange

public ConceptAttributeChange(Boolean oldPrimitive,
                              Boolean newPrimitive)
Constructs a ConceptAttributeChange object for concept primitive change. Initializes the change type. Initializes the attribute type to PRIMITIVE.

Parameters:
oldPrimitive - If adding a new primitive, the oldPrimitive should null; If modifying a primitive, the oldPrimitive should be the primitive before being updated; If deleting a primitive, the oldPrimitive should be the primitive that is deleted.
newPrimitive - If adding a new primitive, the newPrimitive should be the primitive that is added; If modifying a primitive, the newPrimitive should be the primitive after being updated; If deleting a primitive, the newPrimitive should be null.

ConceptAttributeChange

public ConceptAttributeChange(OntylogConcept oldDefiningConcept,
                              OntylogConcept newDefiningConcept)
Constructs a ConceptAttributeChange object for concept parent change. Initializes the change type. Initializes the attribute type to DEFININGCONCEPT.

Parameters:
oldDefiningConcept - If adding a new defining concept, the oldDefiningConcept should null; If modifying a defining concept, the oldDefiningConcept should be the defining concept before being updated; If deleting a defining concept, the oldDefiningConcept should be the defining concept that is deleted.
newDefiningConcept - If adding a new defining concept, the newDefiningConcept should be the defining concept that is added; If modifying a defining concept, the newDefiningConcept should be the defining concept after being updated; If deleting a defining concept, the newDefiningConcept should be null.

ConceptAttributeChange

public ConceptAttributeChange(int oldRoleGroupNum,
                              int newRoleGroupNum)
Constructs a ConceptAttributeChange object for concept role group change. Initializes the change type. Initializes the attribute type to ROLEGROUP.

Parameters:
oldRoleGroupNum - Role group number before the role group change.
newRoleGroupNum - Role group number after the role group change.
Method Detail

getChangeType

public int getChangeType()
Get Change Type. The Change Type can be NEW, MODIFY, or DELETE.

Returns:
int If the attribute is added, return NEW; If the attribute is updated, return MODIFY; If the attribute is deleted, return DELETE.

getAttributeType

public int getAttributeType()
Get Attribute Type. The Attribute Type can be NAME, ASSOCIATION, PROPERTY, SYNONYM, ROLE, or PRIMITIVE.

Returns:
int If concept name is changed, return NAME; If concept association is changed, return ASSOCIATION; If concept property is changed, return PROPERTY; If concept synonym is changed, return SYNONYM; If concept role is changed, return ROLE; If concept primitive is changed, return PRIMITIVE

getOldAttribute

public Object getOldAttribute()
Get the old Concept Attribute Object. According to the getAttributeType() the Concept Attribute object can be casted to NAME, ConceptAssociation, Synonym, DTSProperty, DTSRole, or Boolean.

Returns:
Object the concept attribute before updating

getNewAttribute

public Object getNewAttribute()
Get the new Concept Attribute Object. According to the getAttributeType() the Concept Attribute object can be casted to NAME, ConceptAssociation, Synonym, DTSProperty, DTSRole, or Boolean.

Returns:
Object the concept attribute after updating


Copyright © 2011. All Rights Reserved.