com.apelon.dts.client.attribute
Class DTSProperty

java.lang.Object
  extended by com.apelon.dts.client.attribute.DTSProperty
All Implemented Interfaces:
DTSAttribute, QualifiedObject, MatchItem

public class DTSProperty
extends Object
implements DTSAttribute, MatchItem, QualifiedObject

A property is a piece of user-defined, external information that can be associated with a DTSConcept, OntylogConcept, or Term. A property can define anything whatsoever (documentation strings, numeric codes, etc.) and has no bearing on Ontylog classification. In the event it is necessary to store auxilary information for a concept or term, this can be accomplished by associating a DTSProperty (of a specific DTSPropertyType), then defining the appropriate property value.

Copyright: Copyright (c) 2003

Company: Apelon, Inc.

Since:
DTS 3.0.0
Version:
DTS 3.0.0
Author:
Apelon, Inc.

Constructor Summary
DTSProperty()
           
DTSProperty(DTSPropertyType propType, String value)
          Constructor
DTSProperty(DTSPropertyType propType, String value, boolean localAddition)
          Constructor
 
Method Summary
 boolean addQualifier(DTSQualifier qualifier)
          Adds the specified element as qualifier for this property.
 boolean containsQualifier(DTSQualifier qualifier)
          Tests if this property already has the specified qualifier.
 boolean deleteQualifier(DTSQualifier qualifier)
          Deletes the specified element as qualifier for this property.
 boolean equals(Object obj)
          Compares this DTSProperty to the specified object.
 DTSQualifier[] getFetchedQualifiers()
          Returns array of qualifiers for this property.
 long getInternalId()
          Returns internal id of the property.
 MatchItemType getMatchItemType()
          Gets the match item type, i.e.
 String getMatchString()
          Gets the string that was matched.
 String getName()
          Gets the name of the DTSProperty.
 DTSPropertyType getPropertyType()
          Gets the DTSPropertyType of the DTSProperty.
 String getValue()
          Gets the value of the DTSProperty.
 int hashCode()
          Returns a hash code for this DTSProperty.
 boolean isLocalAddition()
          Indicates if this property is a local addition, i.e.
 void setInternalId(long internalId)
          Sets internal id of the property.
 void setLocalAddition(boolean localAddition)
          Sets the local addition indicator.
 void setPropertyType(DTSPropertyType newPropertyType)
          Sets the DTSPropertyType of the DTSProperty.
 void setValue(String newValue)
          Sets the value of the DTSProperty.
 String toString()
          Returns description of property
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DTSProperty

public DTSProperty()

DTSProperty

public DTSProperty(DTSPropertyType propType,
                   String value)
Constructor

Parameters:
propType - property type
value - property value

DTSProperty

public DTSProperty(DTSPropertyType propType,
                   String value,
                   boolean localAddition)
Constructor

Parameters:
propType - property type
value - property value
localAddition - indicator whether this is a local addition to subscription content
Method Detail

getPropertyType

public DTSPropertyType getPropertyType()
Gets the DTSPropertyType of the DTSProperty.

Returns:
the DTSPropertyType of the DTSProperty.

setPropertyType

public void setPropertyType(DTSPropertyType newPropertyType)
Sets the DTSPropertyType of the DTSProperty.

Parameters:
newPropertyType - new DTSPropertyType of the DTSProperty

getName

public String getName()
Gets the name of the DTSProperty.

Specified by:
getName in interface DTSAttribute
Returns:
the name of the DTSProperty.

getValue

public String getValue()
Gets the value of the DTSProperty.

Specified by:
getValue in interface DTSAttribute
Returns:
the value of the DTSProperty.

setValue

public void setValue(String newValue)
Sets the value of the DTSProperty.

Parameters:
newValue - the new value of the DTSProperty

isLocalAddition

public boolean isLocalAddition()
Indicates if this property is a local addition, i.e. the concept or term is in a subscription namespace but the property type is in a local namespace.

Returns:
true if this property is a local addition to a subscription concept or term; false if not.

setLocalAddition

public void setLocalAddition(boolean localAddition)
Sets the local addition indicator.

Parameters:
localAddition - true if this property is a local addition to a subscription concept or term; false if not.

getInternalId

public long getInternalId()
Returns internal id of the property. This is used internally by database.

Returns:
internal id

setInternalId

public void setInternalId(long internalId)
Sets internal id of the property. This is used internally by database.

Parameters:
internalId - Internal Id

getFetchedQualifiers

public DTSQualifier[] getFetchedQualifiers()
Returns array of qualifiers for this property.

Specified by:
getFetchedQualifiers in interface QualifiedObject
Returns:
array of DTSQualifiers.

addQualifier

public boolean addQualifier(DTSQualifier qualifier)
Adds the specified element as qualifier for this property.

Specified by:
addQualifier in interface QualifiedObject
Parameters:
qualifier - DTSQualifier
Returns:
false if the property already had the qualifier; true if the qualifier was added

containsQualifier

public boolean containsQualifier(DTSQualifier qualifier)
Tests if this property already has the specified qualifier.

Specified by:
containsQualifier in interface QualifiedObject
Parameters:
qualifier - the DTSQualifier to test
Returns:
true if this property contains the qualifier argument; otherwise false

deleteQualifier

public boolean deleteQualifier(DTSQualifier qualifier)
Deletes the specified element as qualifier for this property.

Specified by:
deleteQualifier in interface QualifiedObject
Parameters:
qualifier - DTSQualifier to be removed
Returns:
true if removed successfully; otherwise false

getMatchString

public String getMatchString()
Gets the string that was matched.

Specified by:
getMatchString in interface MatchItem
Returns:
the property value

getMatchItemType

public MatchItemType getMatchItemType()
Gets the match item type, i.e. "Property"

Specified by:
getMatchItemType in interface MatchItem
Returns:
MatchItemType for property

equals

public boolean equals(Object obj)
Compares this DTSProperty to the specified object.

Overrides:
equals in class Object
Parameters:
obj - the object to compare this String against.
Returns:
true if the object is equal to this DTSProperty; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this DTSProperty.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

toString

public String toString()
Returns description of property

Overrides:
toString in class Object
Returns:
description


Copyright © 2011. All Rights Reserved.