Skip to content

Commit def7018

Browse files
committed
Initial commit
0 parents  commit def7018

File tree

86 files changed

+220830
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+220830
-0
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/target
2+
/build
3+
/classes
4+
/dist
5+
/.idea
6+
*.iml
7+
.dbshell
8+
.gradle

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: java
2+
3+
jdk:
4+
- oraclejdk8
5+
6+
before_install:
7+
- chmod +x gradlew
8+
9+
notifications:
10+
email:
11+
- mayc@imsweb.com
12+

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Copyright (c) 2015, Information Management Services, Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
10+
Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
Neither the name of the National Cancer Institute, the SEER program, Information
15+
Management Services, nor the names of its contributors may be used to endorse
16+
or promote products derived from this software without specific prior written
17+
permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# X12 Parser
2+
3+
[![Build Status](https://travis-ci.org/imsweb/x12-parser.svg?branch=master)](https://travis-ci.org/imsweb/x12-parser)
4+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.imsweb/x12-parser/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.imsweb/x12-parser)
5+
6+
A parser for ANSI ASC X12 documents. This project was originally based on the Python project [pyx12](https://github.com/azoner/pyx12).
7+
8+
The library supports the following file types:
9+
10+
- ANSI 835 5010 X221
11+
- ANSI 835 4010 X091
12+
- ANSI 837 4010 X096
13+
- ANSI 837 4010 X097
14+
- ANSI 837 4010 X098
15+
- ANSI 837 5010 X222
16+
17+
## Download
18+
19+
Java 8 is the minimum version required to use the library.
20+
21+
Download [the latest JAR][1] or grab via Maven:
22+
23+
```xml
24+
<dependency>
25+
<groupId>com.imsweb</groupId>
26+
<artifactId>x12-parser</artifactId>
27+
<version>1.0</version>
28+
</dependency>
29+
```
30+
31+
or via Gradle:
32+
33+
```groovy
34+
compile 'com.imsweb.com:x12-parser:1.0'
35+
```
36+
37+
[1]: http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.imsweb&a=x12-parser&v=LATEST

build.gradle

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
plugins {
2+
id 'java'
3+
id 'checkstyle'
4+
id 'findbugs'
5+
id 'com.bmuschko.nexus' version '2.3.1'
6+
}
7+
8+
group = 'com.imsweb'
9+
version = '1.0-SNAPSHOT'
10+
description = 'Java client library for parsing x12 files'
11+
12+
// UTF-8 for all compilation tasks
13+
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
14+
15+
repositories {
16+
mavenCentral()
17+
}
18+
19+
dependencies {
20+
compile 'com.thoughtworks.xstream:xstream:1.4.9'
21+
22+
testCompile 'junit:junit:4.12'
23+
}
24+
25+
jar {
26+
manifest {
27+
attributes('Implementation-Title': project.name,
28+
'Implementation-Version': version,
29+
'Implementation-Vendor': group,
30+
'Created-By': System.properties['java.vm.version'] + ' (' + System.properties['java.vm.vendor'] + ')',
31+
'Built-By': System.getProperty('user.name'),
32+
'Built-Date': new Date(),
33+
'Built-JDK': System.getProperty('java.version'),
34+
)
35+
}
36+
}
37+
38+
checkstyle {
39+
configFile = file('config/checkstyle/checkstyle.xml')
40+
}
41+
42+
findbugs {
43+
excludeFilter = file('config/findbugs/findbugs-exclude.xml')
44+
}
45+
46+
task wrapper(type: Wrapper) {
47+
gradleVersion = '3.5'
48+
}
49+
50+
modifyPom {
51+
project {
52+
name 'X12 Parser'
53+
description 'A Java library for parsing X12 files, including ANSI 837'
54+
url 'https://github.com/imsweb/x12-parser'
55+
inceptionYear '2015'
56+
57+
scm {
58+
url 'https://github.com/imsweb/x12-parser'
59+
connection 'scm:https://github.com/imsweb/x12-parser.git'
60+
developerConnection 'scm:git@github.com:imsweb/x12-parser.git'
61+
}
62+
63+
licenses {
64+
license {
65+
name 'A modified BSD License (BSD)'
66+
url 'https://github.com/imsweb/x12-parser/blob/master/LICENSE'
67+
distribution 'repo'
68+
}
69+
}
70+
71+
developers {
72+
developer {
73+
id 'AngelaszekD'
74+
name 'David Angelaszek'
75+
email 'AngelaszekD@imsweb.com'
76+
}
77+
developer {
78+
id 'ctmay4'
79+
name 'Chuck May'
80+
email 'mayc@imsweb.com'
81+
}
82+
}
83+
}
84+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0"?><!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
2+
<suppressions>
3+
</suppressions>

config/checkstyle/checkstyle.xml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
3+
<module name="Checker">
4+
<metadata name="com.atlas-sw.eclipse" value="I like Sydney" />
5+
<property name="severity" value="warning" />
6+
<module name="FileTabCharacter" />
7+
<module name="TreeWalker">
8+
<property name="tabWidth" value="4" />
9+
<module name="ConstantName">
10+
<property name="format" value="^[A-Z_][A-Z0-9]*(_[A-Z0-9]+)*$" />
11+
</module>
12+
<module name="LeftCurly">
13+
<property name="tokens" value="CLASS_DEF,INTERFACE_DEF,METHOD_DEF,CTOR_DEF" />
14+
</module>
15+
<module name="LeftCurly">
16+
<property name="tokens"
17+
value="LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_SWITCH,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE" />
18+
</module>
19+
<module name="LineLength">
20+
<property name="severity" value="ignore" />
21+
<property name="ignorePattern" value="^\s+\*" />
22+
<property name="max" value="250" />
23+
</module>
24+
<module name="AvoidStarImport" />
25+
<module name="EmptyBlock">
26+
<property name="severity" value="ignore" />
27+
</module>
28+
<module name="EmptyForIteratorPad">
29+
<property name="severity" value="ignore" />
30+
</module>
31+
<module name="EqualsHashCode" />
32+
<module name="IllegalCatch">
33+
<property name="severity" value="ignore" />
34+
</module>
35+
<module name="ImportControl">
36+
<property name="severity" value="ignore" />
37+
</module>
38+
<module name="IllegalImport" />
39+
<module name="IllegalInstantiation" />
40+
<module name="IllegalThrows" />
41+
<module name="InnerAssignment">
42+
<property name="severity" value="ignore" />
43+
</module>
44+
<module name="JavadocType">
45+
<property name="severity" value="ignore" />
46+
<property name="authorFormat" value="\S" />
47+
</module>
48+
<module name="JavadocMethod">
49+
<property name="severity" value="ignore" />
50+
<property name="allowUndeclaredRTE" value="true" />
51+
<property name="allowThrowsTagsForSubclasses" value="true" />
52+
</module>
53+
<module name="JavadocVariable">
54+
<property name="severity" value="ignore" />
55+
</module>
56+
<module name="JavadocStyle">
57+
<property name="severity" value="ignore" />
58+
<property name="scope" value="public" />
59+
</module>
60+
<module name="LocalFinalVariableName" />
61+
<module name="LocalVariableName" />
62+
<module name="MemberName">
63+
<property name="format" value="^_[a-zA-Z0-9]*$" />
64+
</module>
65+
<module name="MethodLength">
66+
<property name="severity" value="ignore" />
67+
<property name="max" value="300" />
68+
</module>
69+
<module name="MethodName" />
70+
<module name="MethodParamPad">
71+
<property name="severity" value="ignore" />
72+
</module>
73+
<module name="ModifierOrder" />
74+
<module name="NeedBraces">
75+
<property name="severity" value="ignore" />
76+
</module>
77+
<module name="NoWhitespaceAfter">
78+
<property name="severity" value="ignore" />
79+
</module>
80+
<module name="NoWhitespaceBefore">
81+
<property name="severity" value="ignore" />
82+
</module>
83+
<module name="NoWhitespaceBefore">
84+
<property name="severity" value="ignore" />
85+
<property name="allowLineBreaks" value="true" />
86+
<property name="tokens" value="DOT" />
87+
</module>
88+
<module name="OperatorWrap">
89+
<property name="severity" value="ignore" />
90+
</module>
91+
<module name="OperatorWrap">
92+
<property name="severity" value="ignore" />
93+
<property name="option" value="eol" />
94+
<property name="tokens"
95+
value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN, BAND_ASSIGN" />
96+
</module>
97+
<module name="PackageName" />
98+
<module name="ParameterName" />
99+
<module name="ParameterNumber">
100+
<property name="severity" value="ignore" />
101+
<property name="max" value="15" />
102+
</module>
103+
<module name="ParenPad">
104+
<property name="severity" value="ignore" />
105+
</module>
106+
<module name="TypecastParenPad">
107+
<property name="severity" value="ignore" />
108+
</module>
109+
<module name="RedundantImport" />
110+
<module name="RedundantModifier">
111+
<property name="severity" value="ignore" />
112+
</module>
113+
<module name="RightCurly">
114+
<property name="option" value="alone" />
115+
</module>
116+
<module name="SimplifyBooleanExpression" />
117+
<module name="SimplifyBooleanReturn" />
118+
<module name="StaticVariableName">
119+
<property name="format" value="^[A-Z_][A-Z0-9_]*$" />
120+
</module>
121+
<module name="TypeName" />
122+
<module name="UnusedImports" />
123+
<module name="UpperEll" />
124+
<module name="VisibilityModifier">
125+
<property name="severity" value="ignore" />
126+
</module>
127+
<module name="WhitespaceAfter">
128+
<property name="severity" value="ignore" />
129+
<property name="tokens" value="COMMA, SEMI" />
130+
</module>
131+
<module name="WhitespaceAround">
132+
<property name="severity" value="ignore" />
133+
<property name="tokens"
134+
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH, LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN, LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN" />
135+
</module>
136+
<module name="FinalClass" />
137+
<module name="MissingSwitchDefault" />
138+
<module name="MagicNumber">
139+
<property name="severity" value="ignore" />
140+
</module>
141+
<module name="Indentation">
142+
<property name="severity" value="ignore" />
143+
<property name="caseIndent" value="0" />
144+
</module>
145+
<module name="ArrayTrailingComma">
146+
<property name="severity" value="ignore" />
147+
</module>
148+
<module name="FinalLocalVariable">
149+
<property name="severity" value="ignore" />
150+
</module>
151+
<module name="CyclomaticComplexity">
152+
<property name="severity" value="ignore" />
153+
</module>
154+
<module name="NestedIfDepth">
155+
<property name="max" value="8" />
156+
</module>
157+
<module name="NestedTryDepth">
158+
<property name="max" value="6" />
159+
</module>
160+
<module name="ExplicitInitialization">
161+
<property name="severity" value="ignore" />
162+
</module>
163+
<module name="HiddenField" />
164+
</module>
165+
<module name="SuppressionFilter">
166+
<property name="file" value="config/checkstyle/checkstyle-exclude.xml"/>
167+
</module>
168+
<module name="Translation" />
169+
</module>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<FindBugsFilter>
2+
<Match>
3+
<Bug category="MALICIOUS_CODE" />
4+
</Match>
5+
<Match>
6+
<Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE"/>
7+
</Match>
8+
<Match>
9+
<!-- Ignore lab classes -->
10+
<Package name="~com\.imsweb\.x12\.lab.*"/>
11+
</Match>
12+
<Match>
13+
<!-- This bug doesn't need to be reported in LoopTest -->
14+
<Class name="com.imsweb.x12.LoopTest"/>
15+
<Bug pattern="RV_RETURN_VALUE_IGNORED_INFERRED"/>
16+
</Match>
17+
</FindBugsFilter>

gradle/wrapper/gradle-wrapper.jar

53.5 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Apr 28 13:30:23 EDT 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip

0 commit comments

Comments
 (0)