ecologylab.appframework.types.prefs
Class MetaPrefSet

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.xml.ElementState
          extended by ecologylab.appframework.types.prefs.MetaPrefSet
All Implemented Interfaces:
FieldTypes, XMLTranslationExceptionTypes

public class MetaPrefSet
extends ElementState

Groupings of MetaPrefs, by category. Categories are also ordered in a separate ArrayList. Contains functions related to adding MetaPrefs to the grouping, getting MetaPrefs, getting the categories, etc.

Author:
Cae

Nested Class Summary
 
Nested classes/interfaces inherited from class ecologylab.xml.ElementState
ElementState.DeclarationStyle, ElementState.xml_attribute, ElementState.xml_bind_from, ElementState.xml_bind_to, ElementState.xml_class, ElementState.xml_classes, ElementState.xml_collection, ElementState.xml_format, ElementState.xml_leaf, ElementState.xml_map, ElementState.xml_nested, ElementState.xml_nowrap, ElementState.xml_other_tags, ElementState.xml_scope, ElementState.xml_tag, ElementState.xml_text
 
Field Summary
 
Fields inherited from class ecologylab.xml.ElementState
CDATA, NORMAL, UTF16, UTF16_LE, UTF8
 
Fields inherited from interface ecologylab.xml.FieldTypes
ATTRIBUTE, AWFUL_OLD_NESTED_ELEMENT, BAD_FIELD, COLLECTION_ELEMENT, COLLECTION_SCALAR, IGNORED_ATTRIBUTE, IGNORED_ELEMENT, LEAF, MAP_ELEMENT, MAP_SCALAR, NAME_SPACE_ATTRIBUTE, NAME_SPACE_LEAF_NODE, NAME_SPACE_MASK, NAME_SPACE_NESTED_ELEMENT, NAMESPACE_IGNORED_ELEMENT, NAMESPACE_TRIAL_ELEMENT, NESTED_ELEMENT, PSEUDO_FIELD_DESCRIPTOR, ROOT, TEXT_ELEMENT, TEXT_NODE_VALUE, UNSET_TYPE, WRAPPER, XMLNS_ATTRIBUTE, XMLNS_IGNORED
 
Fields inherited from interface ecologylab.xml.XMLTranslationExceptionTypes
FILE_NOT_FOUND, IO_EXCEPTION, NULL_PURL, UNKNOWN
 
Constructor Summary
MetaPrefSet()
           
 
Method Summary
 boolean add(MetaPref metaPref)
          Register the MetaPref in the static global map, as well as adding it to the super ArrayListState.
 java.util.Set<java.lang.String> getCategories()
          Get the category names in a Set of Strings.
 int getHeight()
           
 java.util.ArrayList<MetaPref> getMetaPrefListByCategory(java.lang.String cat)
          Get the MetaPref ArrayList for a category name.
 int getNumberOfTabs()
          Return the number of categories.
 java.lang.String[] getOrderedTabNames(java.lang.String[] tabList)
          Return the ordered list of categories.
 java.lang.String getTitle()
           
 int getWidth()
           
static MetaPrefSet load(java.io.File file, TranslationScope translationSpace)
          Read MetaPref declarations from a file or across the net.
static MetaPrefSet load(ParsedURL purl, TranslationScope translationSpace)
          Read MetaPref declarations from a file or across the net.
 
Methods inherited from class ecologylab.xml.ElementState
buildDOM, buildDOM, buildDOM, buildDOM, buildDOM, buildDOMFromXMLCharSequence, buildDOMFromXMLString, checkAnnotation, classDescriptor, createParentDirs, getChildFieldAccessors, getElementStateById, getFieldDescriptors, getNestedNameSpace, getTextNodeString, hasScalarTextField, lookupNestedNameSpace, parent, recycle, setDeclarationStyle, setParent, setUseDOMForTranslateTo, translateFromXML, translateFromXML, translateFromXML, translateFromXML, translateFromXML, translateFromXMLCharSequence, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOMCharSequence, translateFromXMLDOMCharSequence, translateFromXMLRootNode, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateToDOM, translateToXML, translateToXML, translateToXML, translateToXML, writePrettyXML, writePrettyXML, writePrettyXML
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaPrefSet

public MetaPrefSet()
Method Detail

getOrderedTabNames

public java.lang.String[] getOrderedTabNames(java.lang.String[] tabList)
Return the ordered list of categories.

Parameters:
tabList - String Array that will hold category names.
Returns:
tabList String Array that will hold category names.

getNumberOfTabs

public int getNumberOfTabs()
Return the number of categories.

Returns:
Number of categories

getCategories

public java.util.Set<java.lang.String> getCategories()
Get the category names in a Set of Strings.

Returns:
String Set of categories.

getMetaPrefListByCategory

public java.util.ArrayList<MetaPref> getMetaPrefListByCategory(java.lang.String cat)
Get the MetaPref ArrayList for a category name.

Parameters:
cat - Name of category
Returns:
ArrayList of MetaPrefs

add

public boolean add(MetaPref metaPref)
Register the MetaPref in the static global map, as well as adding it to the super ArrayListState.

Parameters:
metaPref -
Returns:

load

public static MetaPrefSet load(java.io.File file,
                               TranslationScope translationSpace)
                        throws XMLTranslationException
Read MetaPref declarations from a file or across the net.

Parameters:
file -
translationSpace -
Returns:
Throws:
XMLTranslationException

load

public static MetaPrefSet load(ParsedURL purl,
                               TranslationScope translationSpace)
                        throws XMLTranslationException
Read MetaPref declarations from a file or across the net.

Parameters:
purl -
translationSpace -
Returns:
Throws:
XMLTranslationException

getHeight

public int getHeight()

getTitle

public java.lang.String getTitle()

getWidth

public int getWidth()