hnscnvt
Class HNSManualConverter

java.lang.Object
  extended by hnscnvt.HNSManualConverter

public class HNSManualConverter
extends java.lang.Object

Supports the conversion of a string of manual HNS to the corresponding <hamnosys_manual> HNS-SiGML element. This element contains a sequence of HNS token name elements. The conversion process produces the element text. The primary interface is the convert(String, String, StringBuilder) method, which appends the generated element text to a StringBuilder.


Constructor Summary
HNSManualConverter()
          Constructs a new manual HNS converter, allocating its character-to-token-name map.
 
Method Summary
 void convert(java.lang.String hnsman, java.lang.String indent, java.lang.StringBuilder hnsbuf)
          Converts the given manual HNS string to a <hamnosys_manual> element and appends the text of that element to the given StringBuilder with the given indentation at the start of each line.
 java.lang.String manElement(java.lang.String hnsman, java.lang.String indent)
          Converts the given manual HNS string to a <hamnosys_manual> element and returns a string containing the text of that element, with the given indentation at the start of each line.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HNSManualConverter

public HNSManualConverter()
Constructs a new manual HNS converter, allocating its character-to-token-name map.

Method Detail

convert

public void convert(java.lang.String hnsman,
                    java.lang.String indent,
                    java.lang.StringBuilder hnsbuf)
Converts the given manual HNS string to a <hamnosys_manual> element and appends the text of that element to the given StringBuilder with the given indentation at the start of each line. If the given manual HNS string is null or empty an empty <hamnosys_manual> is still generated.


manElement

public java.lang.String manElement(java.lang.String hnsman,
                                   java.lang.String indent)
Converts the given manual HNS string to a <hamnosys_manual> element and returns a string containing the text of that element, with the given indentation at the start of each line.