org.annotation.util
Class FeatureMap

java.lang.Object
  extended byorg.annotation.util.FeatureMap
Direct Known Subclasses:
Annotation, AnnotationFile, Argument, Relation

public abstract class FeatureMap
extends java.lang.Object


Field Summary
static java.lang.String DEFAULT_SET_DELIMITER
          The delimiter used when treating features as sets of features.
protected  java.util.HashMap properties
           
 
Constructor Summary
FeatureMap()
           
 
Method Summary
 void addFeatureValue(java.lang.String p, java.lang.String v)
          Adds a value to this annotations feature set.
 void addFeatureValue(java.lang.String p, java.lang.String v, java.lang.String delim)
          Adds a value to this annotation's feature set.
 boolean existsFeature(java.lang.String f)
           
 java.lang.String getFeature(java.lang.String p)
           
 java.util.Set getFeatureAsSet(java.lang.String p)
          Converts this features into a set of features.
 java.util.Set getFeatureAsSet(java.lang.String p, java.lang.String delim)
          Converts this features into a set of features.
 java.util.Set getFeatureSet()
           
 void removeFeature(java.lang.String f)
           
 void removeFeatureValue(java.lang.String p, java.lang.String v)
          Removes a feature value from this annotation's feature set.
 void removeFeatureValue(java.lang.String p, java.lang.String v, java.lang.String delim)
          Removes a feature value from this annotation's feature set.
 void setFeature(java.lang.String p, java.lang.String v)
           
 void setFeatures(java.util.HashMap p)
           
 void setProperties(java.util.HashMap p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SET_DELIMITER

public static java.lang.String DEFAULT_SET_DELIMITER
The delimiter used when treating features as sets of features.


properties

protected java.util.HashMap properties
Constructor Detail

FeatureMap

public FeatureMap()
Method Detail

getFeatureSet

public java.util.Set getFeatureSet()

existsFeature

public boolean existsFeature(java.lang.String f)

getFeatureAsSet

public java.util.Set getFeatureAsSet(java.lang.String p)
Converts this features into a set of features.

Parameters:
p - the name of the feature.
Returns:
a set of features, or an empty set if no features are present.

getFeatureAsSet

public java.util.Set getFeatureAsSet(java.lang.String p,
                                     java.lang.String delim)
Converts this features into a set of features.

Parameters:
p - the name of the feature.
delim - the delimator to be used to seperate the features.
Returns:
a set of features, or an empty set if no features are present.

addFeatureValue

public void addFeatureValue(java.lang.String p,
                            java.lang.String v,
                            java.lang.String delim)
Adds a value to this annotation's feature set.

Parameters:
p - the name of the feature.
v - the value to be added to the set.
delim - the delimitor used to seperate the values.

addFeatureValue

public void addFeatureValue(java.lang.String p,
                            java.lang.String v)
Adds a value to this annotations feature set.

Parameters:
p - the name of the feature.
v - the value to be added to the set.

removeFeatureValue

public void removeFeatureValue(java.lang.String p,
                               java.lang.String v,
                               java.lang.String delim)
Removes a feature value from this annotation's feature set.

Parameters:
p - the name of the feature.
v - the value to be removed from the set.
delim - the delimitor which seperates the values.

removeFeatureValue

public void removeFeatureValue(java.lang.String p,
                               java.lang.String v)
Removes a feature value from this annotation's feature set.

Parameters:
p - the name of the feature.
v - the value to be removed from the set.

getFeature

public java.lang.String getFeature(java.lang.String p)

setFeature

public void setFeature(java.lang.String p,
                       java.lang.String v)

removeFeature

public void removeFeature(java.lang.String f)

setProperties

public void setProperties(java.util.HashMap p)

setFeatures

public void setFeatures(java.util.HashMap p)


Copyright © 2004 Thomas Morton and Jeremy LaCivita. All Rights Reserved.