Commit 7b2d8e63 by fukai

修复d格式错误

parent 75e8fe6c
...@@ -21,11 +21,12 @@ public class App ...@@ -21,11 +21,12 @@ public class App
{ {
public static void main( String[] args ) throws IOException public static void main( String[] args ) throws IOException
{ {
TagFormat.WalkTagCell("61", "6!n[4!n]2a[1!a]15d1!a3!c16x['//'16x]['CRLF'34x]");
// System.out.println( TagFormat.TagMap.get("71F").toAnalyzeReg() ); // System.out.println( TagFormat.TagMap.get("71F").toAnalyzeReg() );
// TagLine t59 = TagFormat.TagMap.get("79"); // TagLine t59 = TagFormat.TagMap.get("79");
// t59.setValue("14314321\n423424234\nasdgfasdgfasf\nafdagfadsf\r\nasdfasdfsaf"); // t59.setValue("14314321\n423424234\nasdgfasdgfasf\nafdagfadsf\r\nasdfasdfsaf");
// System.out.println(t59); // System.out.println(t59);
System.out.println(new Gson().toJson(TagFormat.TagMap.get("34B").toSegRegMap())); // System.out.println(new Gson().toJson(TagFormat.TagMap.get("34B").toSegRegMap()));
// System.out.println(new Gson().toJson(TagFormat.WalkTagCell("51A", "['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>"))); // System.out.println(new Gson().toJson(TagFormat.WalkTagCell("51A", "['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>")));
// for(Map.Entry<String, TagLine> entry: TagFormat.TagMap.entrySet()) // for(Map.Entry<String, TagLine> entry: TagFormat.TagMap.entrySet())
// { // {
...@@ -38,7 +39,8 @@ public class App ...@@ -38,7 +39,8 @@ public class App
// generMTFormat(); // generMTFormat();
// System.out.println("111"); // System.out.println("111");
// System.out.println("103".matches("(?!202)\\d{3}")); // System.out.println("103".matches("(?!202)\\d{3}"));
// SWFMessage swf = MessageFormat.getSWFMessage("940");
// System.out.println(swf.toFormatJSON());
} }
public static void generMTFormat() throws IOException public static void generMTFormat() throws IOException
{ {
......
...@@ -11,7 +11,7 @@ import java.util.Properties; ...@@ -11,7 +11,7 @@ import java.util.Properties;
public class TagFormat { public class TagFormat {
public static Properties TagProps = new Properties(); public static Properties TagProps = new Properties();
public static Map<String,TagLine> TagMap = new HashMap<String,TagLine>(); public static Map<String,TagLine> TagMap = new HashMap<String,TagLine>();
public static final char[] CharTypes = "ABacehnxyz".toCharArray(); public static final char[] CharTypes = "ABacdehnxyz".toCharArray();
static{ static{
try { try {
TagProps.load(TagFormat.class.getClassLoader().getResourceAsStream("tags.properties")); TagProps.load(TagFormat.class.getClassLoader().getResourceAsStream("tags.properties"));
......
...@@ -16,15 +16,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; ...@@ -16,15 +16,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.brilliace.swifteditor.tag.TagFormat; import com.brilliace.swifteditor.tag.TagFormat;
import com.brilliace.swifteditor.tag.TagLine; import com.brilliace.swifteditor.tag.TagLine;
import com.google.gson.Gson; import com.google.gson.Gson;
//import com.thoughtworks.xstream.XStream;
//import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
//import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
//import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver;
//import com.thoughtworks.xstream.io.json.JsonWriter;
//import com.thoughtworks.xstream.XStream;
//import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
//import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver;
//import com.thoughtworks.xstream.io.json.JsonWriter;
public class MessageFormat { public class MessageFormat {
private static final String MT_PATTERN = "swift_pattern_2018.xlsx"; private static final String MT_PATTERN = "swift_pattern_2018.xlsx";
...@@ -46,25 +38,7 @@ public class MessageFormat { ...@@ -46,25 +38,7 @@ public class MessageFormat {
} }
return null; return null;
} }
// private static XStream xstream ;
// static{
// xstream = new XStream(new JsonHierarchicalStreamDriver(){
// public HierarchicalStreamWriter createWriter(Writer writer) {
// return new JsonWriter(writer, JsonWriter.DROP_ROOT_MODE)
//;
// }
// });
//// xstream.setMode(XStream.NO_REFERENCES);
// xstream.processAnnotations(SWFMessage.class);
// xstream.processAnnotations(TagLine.class);
// xstream.processAnnotations(AbstractMessageArea.class);
// xstream.processAnnotations(CYC.class);
// xstream.processAnnotations(SEQ.class);
// }
// public static String toJSON(MessageArea ma)
// {
// return xstream.toXML(ma);
// }
public static Gson gson = new Gson(); public static Gson gson = new Gson();
public static void loadSWFMessage() public static void loadSWFMessage()
......
#Generated by Maven Integration for Eclipse #Generated by Maven Integration for Eclipse
#Wed Oct 31 22:38:53 CST 2018 #Tue Nov 06 10:48:36 CST 2018
version=0.0.1-SNAPSHOT version=0.0.1-SNAPSHOT
groupId=com.brilliace groupId=com.brilliace
m2e.projectName=swifteditor m2e.projectName=swifteditor
......
#Generated by Maven #Generated by Maven
#Wed Oct 31 22:39:08 CST 2018 #Tue Nov 06 10:48:50 CST 2018
version=0.0.1-SNAPSHOT version=0.0.1-SNAPSHOT
groupId=com.brilliace groupId=com.brilliace
artifactId=swifteditor artifactId=swifteditor
com/brilliace/swifteditor/tag/message/CYCList.class
com/brilliace/swifteditor/tag/message/CYC.class
com/brilliace/swifteditor/tag/TagFormat.class
com/brilliace/swifteditor/tag/message/MessageArea.class
com/brilliace/swifteditor/tag/message/SWFMessage.class
com/brilliace/swifteditor/tag/message/MessageAnalyzer.class
com/brilliace/swifteditor/tag/message/SEQ.class com/brilliace/swifteditor/tag/message/SEQ.class
com/brilliace/swifteditor/tag/message/AbstractMessageArea.class com/brilliace/swifteditor/tag/message/AbstractMessageArea.class
com/brilliace/swifteditor/tag/message/JSOutputTools.class com/brilliace/swifteditor/tag/message/JSOutputTools.class
com/brilliace/swifteditor/tag/message/CYCList.class
com/brilliace/swifteditor/tag/TagLine.class com/brilliace/swifteditor/tag/TagLine.class
com/brilliace/swifteditor/tag/message/MessageFormat.class com/brilliace/swifteditor/tag/message/MessageFormat.class
com/brilliace/swifteditor/tag/message/CYC.class
com/brilliace/swifteditor/tag/TagFormat.class
com/brilliace/swifteditor/tag/message/MessageArea.class
com/brilliace/swifteditor/tag/TagAnalyzer.class com/brilliace/swifteditor/tag/TagAnalyzer.class
com/brilliace/swifteditor/App.class com/brilliace/swifteditor/App.class
com/brilliace/swifteditor/tag/message/SWFMessage.class
com/brilliace/swifteditor/tag/TagCell.class com/brilliace/swifteditor/tag/TagCell.class
com/brilliace/swifteditor/tag/message/SEQList.class com/brilliace/swifteditor/tag/message/SEQList.class
com/brilliace/swifteditor/tag/message/MessageAnalyzer.class
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="com.brilliace.swifteditor.AppTest" time="0.002" errors="0" skipped="0"> <testsuite tests="1" failures="0" name="com.brilliace.swifteditor.AppTest" time="0.004" errors="0" skipped="0">
<properties> <properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/> <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib"/> <property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib"/>
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
"/> "/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/> <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="os.name" value="Mac OS X"/> <property name="os.name" value="Mac OS X"/>
<property name="classworlds.conf" value="/Users/fukai/Documents/workspace/.metadata/.plugins/org.eclipse.m2e.launching/launches/m2conf386825928787213812.tmp"/> <property name="classworlds.conf" value="/Users/fukai/Documents/workspace/.metadata/.plugins/org.eclipse.m2e.launching/launches/m2conf6118131129949174889.tmp"/>
<property name="sun.jnu.encoding" value="UTF-8"/> <property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.library.path" value="/Users/fukai/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/> <property name="java.library.path" value="/Users/fukai/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.specification.name" value="Java Platform API Specification"/> <property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/> <property name="java.class.version" value="52.0"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/> <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="os.version" value="10.14"/> <property name="os.version" value="10.14.1"/>
<property name="user.home" value="/Users/fukai"/> <property name="user.home" value="/Users/fukai"/>
<property name="user.timezone" value="Asia/Shanghai"/> <property name="user.timezone" value="Asia/Shanghai"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/> <property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
...@@ -59,5 +59,5 @@ ...@@ -59,5 +59,5 @@
<property name="sun.io.unicode.encoding" value="UnicodeBig"/> <property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="sun.cpu.isalist" value=""/> <property name="sun.cpu.isalist" value=""/>
</properties> </properties>
<testcase classname="com.brilliace.swifteditor.AppTest" name="testApp" time="0.002"/> <testcase classname="com.brilliace.swifteditor.AppTest" name="testApp" time="0.004"/>
</testsuite> </testsuite>
\ No newline at end of file
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Test set: com.brilliace.swifteditor.AppTest Test set: com.brilliace.swifteditor.AppTest
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment