|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tue.win.riaca.openmath.lang.OMObject
nl.tue.win.riaca.openmath.lang.OMAttribution
Models an OpenMath attribution object.
Field Summary | |
protected java.util.Hashtable |
attributions
Stores the attributions. |
protected OMObject |
constructor
Stores the constructor. |
Fields inherited from class nl.tue.win.riaca.openmath.lang.OMObject |
attributes |
Constructor Summary | |
OMAttribution()
Constructor. |
|
OMAttribution(java.util.Hashtable newAttributions,
OMObject newConstructor)
Constructor. |
Method Summary | |
java.lang.Object |
clone()
Clones the object (shallow copy). |
java.lang.Object |
copy()
Copies the object (full copy). |
OMAttribution |
flatten()
Flatten the attribution. |
OMObject |
get(OMObject key)
Gets the value of the attribution. |
java.util.Hashtable |
getAttributions()
Get the attributions. |
OMObject |
getConstructor()
Get the attribution constructor. |
java.util.Enumeration |
getKeys()
Get the symbol (keys). |
java.lang.String |
getType()
Gets the type. |
java.util.Enumeration |
getValues()
Get the values. |
boolean |
hasKey(OMObject key)
Has symbol. |
boolean |
hasValue(OMObject value)
Has value. |
boolean |
isAtom()
Are we an atom object. |
boolean |
isComposite()
Are we a composite object. |
boolean |
isSame(OMObject object)
Determines if this is the same object. |
boolean |
isValid()
Determines if this is a valid object. |
void |
put(OMObject key,
OMObject value)
Puts an attribution. |
void |
remove(OMObject key)
Removes an attribution. |
OMObject |
replace(OMObject source,
OMObject dest)
Replace any occurrence of source to destination. |
void |
setAttributions(java.util.Hashtable newAttributions)
Set the attributions. |
void |
setConstructor(OMObject newConstructor)
Set the attribution constructor. |
OMObject |
strip()
Strip the attribution. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class nl.tue.win.riaca.openmath.lang.OMObject |
getAttribute, getAttributes, removeAttribute, setAttribute, setAttributes |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected OMObject constructor
protected java.util.Hashtable attributions
Constructor Detail |
public OMAttribution()
public OMAttribution(java.util.Hashtable newAttributions, OMObject newConstructor)
newAttributions
- the table of attributions.newConstructor
- the attribution constructor.Method Detail |
public java.lang.String getType()
getType
in class OMObject
public java.util.Hashtable getAttributions()
public void setAttributions(java.util.Hashtable newAttributions)
newAttributions
- the hashtable of attributionspublic OMObject getConstructor()
public void setConstructor(OMObject newConstructor)
newConstructor
- the attribution constructor.public void put(OMObject key, OMObject value)
key
- the key of the attribution.value
- the value of the attribution.public void remove(OMObject key)
key
- the attribution to remove by key.public OMObject get(OMObject key)
key
- the attribution to look for by key.
public boolean hasKey(OMObject key)
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.
key
- the key to look for.
public boolean hasValue(OMObject value)
value
- the value to look for.
public java.util.Enumeration getKeys()
public java.util.Enumeration getValues()
public java.lang.String toString()
toString
in class OMObject
public OMAttribution flatten()
public OMObject strip()
public java.lang.Object clone()
clone
in class OMObject
public java.lang.Object copy()
copy
in class OMObject
public boolean isComposite()
isComposite
in class OMObject
public boolean isAtom()
isAtom
in class OMObject
public boolean isSame(OMObject object)
isSame
in class OMObject
object
- the object to test against.
public boolean isValid()
isValid
in class OMObject
public OMObject replace(OMObject source, OMObject dest)
source
- the source object.dest
- the destination object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |