hnscnvt
Class HNSSign

java.lang.Object
  extended by hnscnvt.HNSSign

public class HNSSign
extends java.lang.Object

The data defining a single HamNoSys 4 sign. The main constituents are strings, one for each of the following features of the sign:

In addition, in the case where the sign is created from an HNS-SiGML (<hns_sign> element, either the text of this element or its DOM Element representation may be held with the sign.


Constructor Summary
HNSSign()
          Constructs a sign with null components.
HNSSign(java.lang.String man, java.lang.String nm, java.lang.String glss, java.lang.String err)
          Constructor forming the sign from the given manual, non-manual, gloss and input error text componenents, any of which may be null; there is no associated element or element text at this stage.
 
Method Summary
 java.lang.String duration()
          Returns the sign's duration attribute string.
 org.w3c.dom.Element element()
          Assuming it is available (as indicated by elementIsAvailable()), this method returns the text of the <hns_sign> element defining this sign.
 boolean elementIsAvailable()
          Returns a boolean indicating whether this sign has an associated <hns_sign> DOM Element.
 java.lang.String elementText()
          Assuming it is available (as indicated by elementTextIsAvailable()), this method returns the text of the <hns_sign> element defining this sign.
 boolean elementTextIsAvailable()
          Returns a boolean indicating whether this sign has an associated <hns_sign> element text.
 boolean equals(java.lang.Object other)
          Equality test, requiring matching manual, non-manual and gloss components.
 java.lang.String error()
          Returns the sign's input error text.
 java.lang.String gloss()
          Returns the sign's gloss string.
 boolean hasTiming()
          Returns a boolean indicating whether or not this sign has any timing attributes set.
 java.lang.String man()
          Returns the sign's HNS manual component.
 java.lang.String nonMan()
          Returns the sign's HNS non-manual component.
 void setElement(org.w3c.dom.Element el)
          Sets the <hns_sign> DOM Element from which this sign has been generated.
 void setElementText(java.lang.String el)
          Sets the <hns_sign> element text from which this sign has been generated.
 void setError(java.lang.String err)
          Sets the sign's input error text.
 void setGloss(java.lang.String glss)
          Sets the sign's gloss string.
 void setMan(java.lang.String man)
          Sets the sign's HNS manual component.
 void setNonMan(java.lang.String nm)
          Sets the sign's HNS non-manual component.
 void setTiming(java.lang.String d, java.lang.String s, java.lang.String ts)
          Sets the sign's timing attributes -- duration speed, timescale.
 java.lang.String speed()
          Returns the sign's speed attribute string.
 java.lang.String timeScale()
          Returns the sign's timescale attribute string.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HNSSign

public HNSSign()
Constructs a sign with null components.


HNSSign

public HNSSign(java.lang.String man,
               java.lang.String nm,
               java.lang.String glss,
               java.lang.String err)
Constructor forming the sign from the given manual, non-manual, gloss and input error text componenents, any of which may be null; there is no associated element or element text at this stage.

Method Detail

setMan

public void setMan(java.lang.String man)
Sets the sign's HNS manual component.


setNonMan

public void setNonMan(java.lang.String nm)
Sets the sign's HNS non-manual component.


setGloss

public void setGloss(java.lang.String glss)
Sets the sign's gloss string.


setError

public void setError(java.lang.String err)
Sets the sign's input error text.


setTiming

public void setTiming(java.lang.String d,
                      java.lang.String s,
                      java.lang.String ts)
Sets the sign's timing attributes -- duration speed, timescale.


setElementText

public void setElementText(java.lang.String el)
Sets the <hns_sign> element text from which this sign has been generated.


setElement

public void setElement(org.w3c.dom.Element el)
Sets the <hns_sign> DOM Element from which this sign has been generated.


man

public java.lang.String man()
Returns the sign's HNS manual component.


nonMan

public java.lang.String nonMan()
Returns the sign's HNS non-manual component.


gloss

public java.lang.String gloss()
Returns the sign's gloss string.


error

public java.lang.String error()
Returns the sign's input error text.


hasTiming

public boolean hasTiming()
Returns a boolean indicating whether or not this sign has any timing attributes set.


duration

public java.lang.String duration()
Returns the sign's duration attribute string.


speed

public java.lang.String speed()
Returns the sign's speed attribute string.


timeScale

public java.lang.String timeScale()
Returns the sign's timescale attribute string.


elementTextIsAvailable

public boolean elementTextIsAvailable()
Returns a boolean indicating whether this sign has an associated <hns_sign> element text.


elementText

public java.lang.String elementText()
Assuming it is available (as indicated by elementTextIsAvailable()), this method returns the text of the <hns_sign> element defining this sign.


elementIsAvailable

public boolean elementIsAvailable()
Returns a boolean indicating whether this sign has an associated <hns_sign> DOM Element.


element

public org.w3c.dom.Element element()
Assuming it is available (as indicated by elementIsAvailable()), this method returns the text of the <hns_sign> element defining this sign.


equals

public boolean equals(java.lang.Object other)
Equality test, requiring matching manual, non-manual and gloss components.

Overrides:
equals in class java.lang.Object