Class OMAttribution
java.lang.Object
org.episteme.core.mathematics.loaders.openmath.OMObject
org.episteme.core.mathematics.loaders.openmath.OMAttribution
- All Implemented Interfaces:
Serializable, Cloneable
Models an OpenMath attribution object.
- Version:
- $Revision: 1.2 $
- Author:
- Manfred N. Riem (mriem@manorrock.org)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionStores the attributions.protected OMObjectStores the constructor.Fields inherited from class OMObject
attributes -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.OMAttribution(Hashtable<OMObject, OMObject> newAttributions, OMObject newConstructor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the object (shallow copy).copy()Copies the object (full copy).flatten()Flatten the attribution.Gets the value of the attribution.Get the attributions.Get the attribution constructor.getKeys()Get the symbol (keys).getType()Gets the type.Get the values.booleanHas symbol.booleanHas value.booleanisAtom()Are we an atom object.booleanAre we a composite object.booleanDetermines if this is the same object.booleanisValid()Determines if this is a valid object.voidPuts an attribution.voidRemoves an attribution.Replace any occurrence of source to destination.voidsetAttributions(Hashtable<OMObject, OMObject> newAttributions) Set the attributions.voidsetConstructor(OMObject newConstructor) Set the attribution constructor.strip()Strip the attribution.toString()Returns a string representation of the object.Methods inherited from class OMObject
getAttribute, getAttributes, removeAttribute, setAttribute, setAttributes
-
Field Details
-
constructor
Stores the constructor. -
attributions
-
-
Constructor Details
-
OMAttribution
public OMAttribution()Constructor. -
OMAttribution
-
-
Method Details
-
getType
-
getAttributions
-
setAttributions
-
getConstructor
Get the attribution constructor.- Returns:
- the attribution constructor.
-
setConstructor
Set the attribution constructor.- Parameters:
newConstructor- the attribution constructor.
-
put
-
remove
Removes an attribution.- Parameters:
key- the attribution to remove by key.
-
get
-
hasKey
Has symbol.
Note: this method does NOT do a (cd, name)-pair match. It does the comparison on object level. So an OMSymbol with the same CD and same Name is not necessarily the same object. This is done, because the standard allows multiple attribute-pairs with the same symbol.- Parameters:
key- the key to look for.- Returns:
- true if it contains the given key, false if not.
-
hasValue
Has value.- Parameters:
value- the value to look for.- Returns:
- true if it contains the given value, false otherwise.
-
getKeys
-
getValues
-
toString
-
flatten
-
strip
-
clone
-
copy
-
isComposite
public boolean isComposite()Are we a composite object.- Specified by:
isCompositein classOMObject- Returns:
- true if it is composite, false if it is not.
-
isAtom
-
isSame
-
isValid
-
replace
-