edu.indiana.iucbrf.feature.featurespec
Class AbstractFeatureSpecCollection

java.lang.Object
  extended by edu.indiana.iucbrf.feature.featurespec.AbstractFeatureSpecCollection
All Implemented Interfaces:
FeatureSpecCollection, SwingRepresentable, XMLRepresentable, java.io.Serializable
Direct Known Subclasses:
FeatureSpecMap, FeatureSpecRDB

public abstract class AbstractFeatureSpecCollection
extends java.lang.Object
implements FeatureSpecCollection

This class makes some assumptions on how a FeatureSpecCollection will do certain things. These assumptions are of such a general nature that they should be appropriate for most FeatureSpecCollection implementations.

See Also:
Serialized Form

Field Summary
protected  java.lang.String title
           
 
Fields inherited from interface edu.indiana.util.swing.SwingRepresentable
TITLE_FONT
 
Constructor Summary
protected AbstractFeatureSpecCollection()
          Creates a new instance of AbstractFeatureSpecCollection
 
Method Summary
 boolean equals(java.lang.Object other)
           
 void fromXML(java.lang.String XMLString)
           
 java.lang.String getTitle()
           
 boolean isFullyCompliant(FeatureCollection featureCollection)
          All feature slots must be filled and of the correct type.
 boolean isPartiallyCompliant(FeatureCollection featureCollection)
          All filled feature slots must be of the correct type, but unfilled slots are ignored.
 void putExtraData(FeatureKey featureKey, java.lang.Object dataKey, java.lang.Object data)
           
 void removeFeatureSpec(FeatureSpec featureSpec)
           
 void setDescription(FeatureKey featureKey, java.lang.String description)
           
 void setFormat(FeatureKey featureKey, FeatureValueFormat format)
           
 void setIsPrintable(FeatureKey featureKey, boolean isPrintable)
           
 void setIsSubFeature(FeatureKey featureKey, boolean isSubFeature)
           
 void setName(FeatureKey featureKey, java.lang.String name)
           
 void setStandardConstructor(FeatureKey featureKey, java.lang.Class[] argTypes)
           
 void setStandardConstructor(FeatureKey featureKey, java.lang.reflect.Constructor constructor)
           
 void setStandardConstructor(FeatureKey featureKey, java.lang.String[] argTypes)
           
 void setTitle(java.lang.String title)
           
 void setType(FeatureKey featureKey, java.lang.String typeName)
           
 java.lang.String toString()
           
 javax.swing.JComponent toSwing(int detailLevel)
          Detail level may be ignored by implementations.
 java.lang.String toXML(Domain domain)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.indiana.iucbrf.feature.featurespec.FeatureSpecCollection
addFeatureSpec, getFeatureSpec, getFeatureSpecCount, orderedAllEntryIterator, orderedAllKeyArray, orderedAllKeyIterator, orderedAllSpecIterator, removeFeatureSpec
 

Field Detail

title

protected java.lang.String title
Constructor Detail

AbstractFeatureSpecCollection

protected AbstractFeatureSpecCollection()
Creates a new instance of AbstractFeatureSpecCollection

Method Detail

removeFeatureSpec

public void removeFeatureSpec(FeatureSpec featureSpec)
Specified by:
removeFeatureSpec in interface FeatureSpecCollection

isFullyCompliant

public boolean isFullyCompliant(FeatureCollection featureCollection)
All feature slots must be filled and of the correct type.

Specified by:
isFullyCompliant in interface FeatureSpecCollection

isPartiallyCompliant

public boolean isPartiallyCompliant(FeatureCollection featureCollection)
All filled feature slots must be of the correct type, but unfilled slots are ignored.

Specified by:
isPartiallyCompliant in interface FeatureSpecCollection

setTitle

public void setTitle(java.lang.String title)
Specified by:
setTitle in interface FeatureSpecCollection

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface FeatureSpecCollection

toString

public java.lang.String toString()
Specified by:
toString in interface FeatureSpecCollection
Overrides:
toString in class java.lang.Object

toXML

public java.lang.String toXML(Domain domain)
Specified by:
toXML in interface FeatureSpecCollection
Specified by:
toXML in interface XMLRepresentable

fromXML

public void fromXML(java.lang.String XMLString)
Specified by:
fromXML in interface FeatureSpecCollection
Specified by:
fromXML in interface XMLRepresentable

toSwing

public javax.swing.JComponent toSwing(int detailLevel)
Description copied from interface: SwingRepresentable
Detail level may be ignored by implementations. If used, the standard is for detailLevel 0 to be least detail, with higher values growing more detailed. 0 is least detail, higher numbers are more

Specified by:
toSwing in interface SwingRepresentable

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface FeatureSpecCollection
Overrides:
equals in class java.lang.Object

setStandardConstructor

public void setStandardConstructor(FeatureKey featureKey,
                                   java.lang.Class[] argTypes)
Specified by:
setStandardConstructor in interface FeatureSpecCollection

setStandardConstructor

public void setStandardConstructor(FeatureKey featureKey,
                                   java.lang.String[] argTypes)
Specified by:
setStandardConstructor in interface FeatureSpecCollection

setStandardConstructor

public void setStandardConstructor(FeatureKey featureKey,
                                   java.lang.reflect.Constructor constructor)
Specified by:
setStandardConstructor in interface FeatureSpecCollection

setIsPrintable

public void setIsPrintable(FeatureKey featureKey,
                           boolean isPrintable)
Specified by:
setIsPrintable in interface FeatureSpecCollection

setIsSubFeature

public void setIsSubFeature(FeatureKey featureKey,
                            boolean isSubFeature)
Specified by:
setIsSubFeature in interface FeatureSpecCollection

putExtraData

public void putExtraData(FeatureKey featureKey,
                         java.lang.Object dataKey,
                         java.lang.Object data)
Specified by:
putExtraData in interface FeatureSpecCollection

setFormat

public void setFormat(FeatureKey featureKey,
                      FeatureValueFormat format)
Specified by:
setFormat in interface FeatureSpecCollection

setName

public void setName(FeatureKey featureKey,
                    java.lang.String name)
Specified by:
setName in interface FeatureSpecCollection

setDescription

public void setDescription(FeatureKey featureKey,
                           java.lang.String description)
Specified by:
setDescription in interface FeatureSpecCollection

setType

public void setType(FeatureKey featureKey,
                    java.lang.String typeName)
Specified by:
setType in interface FeatureSpecCollection