[Batchserver-cvs] Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl CharactersImpl.java, 1.1.1.
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-10-18 23:04:37
|
Update of /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5865 Modified Files: CharactersImpl.java CharReader.java EndDocumentImpl.java EndElementImpl.java OFXSGMLParser.java StartDocumentImpl.java StartElementImpl.java Log Message: no message Index: EndDocumentImpl.java =================================================================== RCS file: /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl/EndDocumentImpl.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** EndDocumentImpl.java 18 Oct 2006 03:19:19 -0000 1.1.1.1 --- EndDocumentImpl.java 18 Oct 2006 23:04:34 -0000 1.2 *************** *** 15,27 **** /** * ! * @author Suresh Pragada */ public class EndDocumentImpl implements EndDocument { protected String endTagName=null; /** ! * Creates a new instance of EndDocumentImpl */ public EndDocumentImpl(String endTagName) --- 15,36 ---- /** + * <p> + * EndDocumentImpl provides the implementation for the EndDocument OFXEvent. + * </p> * ! * @author Suresh Pragada ! * @version 1.1 ! * @since 1.1 */ public class EndDocumentImpl implements EndDocument { + /** + * Holds the end tag name. + */ protected String endTagName=null; + /** ! * Initializes the end tag name. */ public EndDocumentImpl(String endTagName) *************** *** 30,33 **** --- 39,45 ---- } + /** + * Returns the END DOCUMENT event type. + */ public int getEventType() { *************** *** 35,38 **** --- 47,53 ---- } + /** + * Returns the name of the end document. + */ public String getEventValue() { Index: StartElementImpl.java =================================================================== RCS file: /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl/StartElementImpl.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** StartElementImpl.java 18 Oct 2006 03:19:19 -0000 1.1.1.1 --- StartElementImpl.java 18 Oct 2006 23:04:34 -0000 1.2 *************** *** 16,27 **** /** * ! * @author Suresh Pragada */ public class StartElementImpl implements StartElement { protected String startTagName=null; /** ! * Creates a new instance of StartElementImpl */ public StartElementImpl(String startTagName) --- 16,33 ---- /** + * <p> + * StartElementImpl provides the implementation for the StartElement OFXEvent. + * </p> * ! * @author Suresh Pragada ! * @version 1.1 ! * @since 1.1 */ public class StartElementImpl implements StartElement { protected String startTagName=null; + /** ! * Initializes the StartElementImpl */ public StartElementImpl(String startTagName) Index: EndElementImpl.java =================================================================== RCS file: /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl/EndElementImpl.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** EndElementImpl.java 18 Oct 2006 03:19:19 -0000 1.1.1.1 --- EndElementImpl.java 18 Oct 2006 23:04:34 -0000 1.2 *************** *** 15,25 **** /** * ! * @author Suresh Pragada */ public class EndElementImpl implements EndElement { protected String endTagName=null; ! /** Creates a new instance of EndElementImpl */ public EndElementImpl(String endTagName) { --- 15,32 ---- /** + * <p> + * EndElementImpl provides the implementation for the EndElement OFXEvent. + * </p> * ! * @author Suresh Pragada ! * @version 1.1 ! * @since 1.1 */ public class EndElementImpl implements EndElement { protected String endTagName=null; ! /** ! * Initalizes the EndElementImpl ! */ public EndElementImpl(String endTagName) { Index: CharactersImpl.java =================================================================== RCS file: /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl/CharactersImpl.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CharactersImpl.java 18 Oct 2006 03:19:18 -0000 1.1.1.1 --- CharactersImpl.java 18 Oct 2006 23:04:34 -0000 1.2 *************** *** 15,20 **** /** * ! * @author Suresh Pragada */ public class CharactersImpl implements Characters --- 15,25 ---- /** + * <p> + * CharactersImpl provides the implementation for the Characters OFXEvent. + * </p> * ! * @author Suresh Pragada ! * @version 1.1 ! * @since 1.1 */ public class CharactersImpl implements Characters *************** *** 23,27 **** private boolean isCdata=false; private boolean isWhiteSpace=true; ! /** Creates a new instance of CharactersImpl */ public CharactersImpl(boolean isCdata) { --- 28,34 ---- private boolean isCdata=false; private boolean isWhiteSpace=true; ! /** ! * Creates a new instance of CharactersImpl ! */ public CharactersImpl(boolean isCdata) { *************** *** 30,33 **** --- 37,43 ---- } + /** + * @see org.jmonks.batch.io.ofx.parser.Characters#getEventType + */ public int getEventType() { *************** *** 35,38 **** --- 45,51 ---- } + /** + * Returns the character data by escaping all the special characters. + */ public String getEventValue() { *************** *** 47,50 **** --- 60,66 ---- } + /** + * Tells whether this data is whitespace or not. + */ public boolean isWhiteSpace() { *************** *** 52,60 **** } public boolean isCDATA() { return this.isCdata; } ! public void addChar(char ch) { --- 68,82 ---- } + /** + * @see org.jmonks.batch.io.ofx.parser.Characters#getCDATA() + */ public boolean isCDATA() { return this.isCdata; } ! ! /** ! * Adds the given character to the buffer. ! */ public void addChar(char ch) { *************** *** 75,78 **** --- 97,103 ---- } + /** + * @see org.jmonks.batch.io.ofx.parser.Characters#getCDATA() + */ public String getCDATA() { Index: StartDocumentImpl.java =================================================================== RCS file: /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl/StartDocumentImpl.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** StartDocumentImpl.java 18 Oct 2006 03:19:19 -0000 1.1.1.1 --- StartDocumentImpl.java 18 Oct 2006 23:04:34 -0000 1.2 *************** *** 15,26 **** /** * ! * @author Suresh Pragada */ public class StartDocumentImpl implements StartDocument { protected String startTagName=null; /** ! * Creates a new instance of StartDocumentImpl */ public StartDocumentImpl(String startTagName) --- 15,35 ---- /** + * <p> + * StartDocumentImpl provides the implementation for the StartDocument OFXEvent. + * </p> * ! * @author Suresh Pragada ! * @version 1.1 ! * @since 1.1 */ public class StartDocumentImpl implements StartDocument { + /** + * Holds the tag name. + */ protected String startTagName=null; + /** ! * Initializes with the tag name. */ public StartDocumentImpl(String startTagName) *************** *** 29,32 **** --- 38,44 ---- } + /** + * Returns the Start Document Event Type. + */ public int getEventType() { *************** *** 34,37 **** --- 46,52 ---- } + /** + * Returns the name of the start document. + */ public String getEventValue() { Index: CharReader.java =================================================================== RCS file: /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl/CharReader.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CharReader.java 18 Oct 2006 03:19:18 -0000 1.1.1.1 --- CharReader.java 18 Oct 2006 23:04:34 -0000 1.2 *************** *** 17,22 **** /** * ! * @author Suresh Pragada */ class CharReader --- 17,28 ---- /** + * <p> + * CharReader is a wrapper to the given reader. It provides the characters on + * needed basis. + * </p> * ! * @author Suresh Pragada ! * @version 1.1 ! * @since 1.1 */ class CharReader *************** *** 27,31 **** private int currentPosition=0; private int dataLength=-1; ! CharReader(Reader reader) { --- 33,40 ---- private int currentPosition=0; private int dataLength=-1; ! ! /** ! * Constructs the CharReader. ! */ CharReader(Reader reader) { *************** *** 34,37 **** --- 43,49 ---- } + /** + * Reads the data to the buffer. + */ private void readData() { *************** *** 47,51 **** } } ! boolean isEmpty() { --- 59,66 ---- } } ! ! /** ! * Returns true if there are no more characters in the reader, false otherwise. ! */ boolean isEmpty() { *************** *** 53,56 **** --- 68,74 ---- } + /** + * Gets the line number of the current character. + */ int getLineNumber() { *************** *** 58,61 **** --- 76,82 ---- } + /** + * Returns the character that is going to serve in the next call to the getChar. + */ char seekChar() { *************** *** 67,72 **** /** ! * Assumes callers always checks the availability of chars using either ! * isEmpty or seekChar. */ char getChar() --- 88,93 ---- /** ! * Gets the next available char. Caller should check using isEmpty before attempting ! * to read the next character. */ char getChar() Index: OFXSGMLParser.java =================================================================== RCS file: /cvsroot/batchserver/Batch_IO_1.1/src/org/jmonks/batch/io/ofx/parser/impl/OFXSGMLParser.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** OFXSGMLParser.java 18 Oct 2006 03:19:19 -0000 1.1.1.1 --- OFXSGMLParser.java 18 Oct 2006 23:04:34 -0000 1.2 *************** *** 16,28 **** /** * ! * @author Suresh Pragada */ public class OFXSGMLParser implements OFXParser { public static final String OFX_DOCUMENT_ELEMENT="OFX"; private OFXEvent prevStartElement=null; ! private CharReader reader=null; public OFXSGMLParser(Reader reader) { --- 16,46 ---- /** + * <p> + * OFXSGMLParser reads the stream in the form of SMGL and XML and returns the + * appropriate events. + * </p> * ! * @author Suresh Pragada ! * @version 1.1 ! * @since 1.1 */ public class OFXSGMLParser implements OFXParser { + /** + * Represents the element name for the OFX. + */ public static final String OFX_DOCUMENT_ELEMENT="OFX"; + /** + * Tells whether previous event is start element or not. + */ private OFXEvent prevStartElement=null; ! /** ! * Holds the reference of the CharReader. ! */ ! protected CharReader reader=null; + /** + * Constructs the parser with the given reader. + */ public OFXSGMLParser(Reader reader) { *************** *** 94,97 **** --- 112,118 ---- } + /** + * Reads the tag name. + */ private String readTagName() { *************** *** 115,119 **** return tagName.toString(); } ! private void readCharaters(CharactersImpl chars) { --- 136,143 ---- return tagName.toString(); } ! ! /** ! * Reads the characters. ! */ private void readCharaters(CharactersImpl chars) { *************** *** 136,139 **** --- 160,166 ---- } + /** + * Reads the CDATA section. + */ private void readCDATA(CharactersImpl cdata) { |