Class AbstractOperatorDictionary
- java.lang.Object
-
- net.sourceforge.jeuclid.elements.support.operatordict.AbstractOperatorDictionary
-
- All Implemented Interfaces:
java.io.Serializable,OperatorDictionary
- Direct Known Subclasses:
OperatorDictionary2,OperatorDictionary3
public abstract class AbstractOperatorDictionary extends java.lang.Object implements OperatorDictionary, java.io.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
Constructors Modifier Constructor Description protectedAbstractOperatorDictionary()Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static OperatorDictionarydeserialize(java.lang.String path)Get the for singleton instance.java.lang.StringgetDefaultAttributeValue(java.lang.String operator, java.lang.String form, java.lang.String attributeName)Determines default value of the operator attribute.protected abstract voidinitializeFromXML(java.util.Map<OperatorAttribute,java.util.Map<java.lang.String,java.util.Map<OperatorForm,java.lang.String>>> d)Initializes Dictionary.
-
-
-
Method Detail
-
deserialize
protected static OperatorDictionary deserialize(java.lang.String path)
Get the for singleton instance.- Parameters:
path- path for the serialized object.- Returns:
- an instance of OperatorDictionary.
-
initializeFromXML
protected abstract void initializeFromXML(java.util.Map<OperatorAttribute,java.util.Map<java.lang.String,java.util.Map<OperatorForm,java.lang.String>>> d)
Initializes Dictionary.- Parameters:
d- the dictionary to initialize.
-
getDefaultAttributeValue
public java.lang.String getDefaultAttributeValue(java.lang.String operator, java.lang.String form, java.lang.String attributeName) throws UnknownAttributeExceptionDetermines default value of the operator attribute.- Specified by:
getDefaultAttributeValuein interfaceOperatorDictionary- Parameters:
operator- operator characterform- form stringattributeName- name of attribute- Returns:
- VALUE_UNKOWN or value from dict.
- Throws:
UnknownAttributeException- Raised, if wrong attributeName was provided.
-
-