net.sourceforge.jeuclid.elements.support.operatordict
Class AbstractOperatorDictionary

java.lang.Object
  extended by net.sourceforge.jeuclid.elements.support.operatordict.AbstractOperatorDictionary
All Implemented Interfaces:
Serializable, OperatorDictionary
Direct Known Subclasses:
OperatorDictionary2, OperatorDictionary3

public abstract class AbstractOperatorDictionary
extends Object
implements OperatorDictionary, Serializable

Read default values of operators from xml file.

Version:
$Revision: c75d8b379394 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.sourceforge.jeuclid.elements.support.operatordict.OperatorDictionary
FORM_INFIX, FORM_POSTFIX, FORM_PREFIX, NAME_INFINITY, NAME_MEDIUMMATHSPACE, NAME_THICKMATHSPACE, NAME_THINMATHSPACE, NAME_VERYTHICKMATHSPACE, NAME_VERYTHINMATHSPACE, NAME_VERYVERYTHICKMATHSPACE, NAME_VERYVERYTHINMATHSPACE, VALUE_UNKNOWN
 
Constructor Summary
protected AbstractOperatorDictionary()
          Default constructor.
 
Method Summary
protected static OperatorDictionary deserialize(String path)
          Get the for singleton instance.
 String getDefaultAttributeValue(String operator, String form, String attributeName)
          Determines default value of the operator attribute.
protected abstract  void initializeFromXML(Map<OperatorAttribute,Map<String,Map<OperatorForm,String>>> d)
          Initializes Dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOperatorDictionary

protected AbstractOperatorDictionary()
Default constructor.

Method Detail

deserialize

protected static OperatorDictionary deserialize(String path)
Get the for singleton instance.

Parameters:
path - path for the serialized object.
Returns:
an instance of OperatorDictionary.

initializeFromXML

protected abstract void initializeFromXML(Map<OperatorAttribute,Map<String,Map<OperatorForm,String>>> d)
Initializes Dictionary.

Parameters:
d - the dictionary to initialize.

getDefaultAttributeValue

public String getDefaultAttributeValue(String operator,
                                       String form,
                                       String attributeName)
                                throws UnknownAttributeException
Determines default value of the operator attribute.

Specified by:
getDefaultAttributeValue in interface OperatorDictionary
Parameters:
operator - operator character
form - form string
attributeName - name of attribute
Returns:
VALUE_UNKOWN or value from dict.
Throws:
UnknownAttributeException - Raised, if wrong attributeName was provided.


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.