Source Code Cross Referenced for X12Parser.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » runtime » parser » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » cbesb 1.2 » com.bostechcorp.cbesb.runtime.parser.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ChainBuilder ESB
003:         *          Visual Enterprise Integration
004:         * 
005:         * Copyright (C) 2006 Bostech Corporation
006:         * 
007:         * This program is free software; you can redistribute it and/or modify it 
008:         * under the terms of the GNU General Public License as published by the 
009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
010:         * any later version.
011:         *
012:         * This program is distributed in the hope that it will be useful, 
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
015:         * for more details.
016:         * 
017:         * You should have received a copy of the GNU General Public License along with 
018:         * this program; if not, write to the Free Software Foundation, Inc., 
019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020:         *
021:         *
022:         * $Id: X12Parser.java 3622 2006-12-12 03:04:08Z lzheng $
023:         */
024:        package com.bostechcorp.cbesb.runtime.parser.impl;
025:
026:        import java.io.File;
027:        import java.io.InputStream;
028:        import java.net.URI;
029:
030:        import org.apache.commons.logging.Log;
031:        import org.apache.commons.logging.LogFactory;
032:        import org.w3c.dom.Document;
033:
034:        import com.bostechcorp.cbesb.common.mdl.MDLDocumentFactory;
035:        import com.bostechcorp.cbesb.common.mdl.x12.X12DocLocationResolver;
036:        import com.bostechcorp.cbesb.common.mdl.IMDLDocument;
037:        import com.bostechcorp.cbesb.common.mdl.IMessageDefinition;
038:        import com.bostechcorp.cbesb.common.mdl.IVariableFormatDefinition;
039:        import com.bostechcorp.cbesb.common.mdl.MDLException;
040:        import com.bostechcorp.cbesb.common.mdl.MDLParser;
041:        import com.bostechcorp.cbesb.runtime.parser.ParserException;
042:
043:        public class X12Parser extends VariantParser {
044:
045:            private char segmentTerminator = 0;
046:            private char fieldSeparator = 0;
047:            private char compositeSeparator = 0;
048:
049:            private static final Log log = LogFactory.getLog(X12Parser.class);
050:
051:            /**
052:             * @return the compositeSeparator
053:             */
054:            public char getCompositeSeparator() {
055:                return compositeSeparator;
056:            }
057:
058:            /**
059:             * @param compositeSeparator the compositeSeparator to set
060:             */
061:            public void setCompositeSeparator(char compositeSeparator) {
062:                this .compositeSeparator = compositeSeparator;
063:            }
064:
065:            /**
066:             * @return the fieldSeparator
067:             */
068:            public char getFieldSeparator() {
069:                return fieldSeparator;
070:            }
071:
072:            /**
073:             * @param fieldSeparator the fieldSeparator to set
074:             */
075:            public void setFieldSeparator(char fieldSeparator) {
076:                this .fieldSeparator = fieldSeparator;
077:            }
078:
079:            /**
080:             * @return the segmentTerminator
081:             */
082:            public char getSegmentTerminator() {
083:                return segmentTerminator;
084:            }
085:
086:            /**
087:             * @param segmentTerminator the segmentTerminator to set
088:             */
089:            public void setSegmentTerminator(char segmentTerminator) {
090:                this .segmentTerminator = segmentTerminator;
091:            }
092:
093:            /* (non-Javadoc)
094:             * @see com.bostechcorp.cbesb.runtime.parser.impl.VariantParser#getFsmClassName(java.lang.String)
095:             */
096:            @Override
097:            protected String getFsmClassName(String messageName) {
098:                String retVal;
099:                if (getVariant() == null || getVariant().equals(""))
100:                    retVal = "com.bostechcorp.cbesb.fsmparser.x12."
101:                            + getVersion() + "." + "messages." + messageName
102:                            + "." + messageName + "." + messageName;
103:                else {
104:                    retVal = "com.bostechcorp.cbesb.fsmparser."
105:                            + getProjectName().replace(File.separatorChar, '.')
106:                            + ".x12." + getVersion() + "." + getVariant()
107:                            + ".messages." + messageName + "." + messageName
108:                            + "." + messageName;
109:                }
110:                return retVal;
111:            }
112:
113:            /* (non-Javadoc)
114:             * @see com.bostechcorp.cbesb.runtime.parser.impl.VariantParser#preProcessMessage(java.lang.StringBuffer)
115:             */
116:            @Override
117:            protected void preProcessMessage(StringBuffer msgData)
118:                    throws ParserException {
119:                //No modifications to the message is necessary
120:                //Just override special characters if values 
121:                //have been set.
122:                if (segmentTerminator != 0) {
123:                    overrideMsgDefProperty("SegmentTerminator", String
124:                            .valueOf(segmentTerminator));
125:                }
126:                if (fieldSeparator != 0) {
127:                    overrideMsgDefProperty("FieldSeparator", String
128:                            .valueOf(fieldSeparator));
129:                }
130:                if (compositeSeparator != 0) {
131:                    overrideMsgDefProperty("CompositeSeparator", String
132:                            .valueOf(compositeSeparator));
133:                }
134:            }
135:
136:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.