Commit 75e8fe6c by fukai

Initial commit

parents
File added
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>swifteditor</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources/tags.properties=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.brilliace</groupId>
<artifactId>swifteditor</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>swifteditor</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.10.1</version>
</dependency>
<!-- <dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.10</version>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.3.5</version>
</dependency> -->
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.freemarker/freemarker -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
<!-- <scope>test</scope> -->
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>swifteditor</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
File added
package com.brilliace.swifteditor;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Map;
import com.brilliace.swifteditor.tag.TagFormat;
import com.brilliace.swifteditor.tag.TagLine;
import com.brilliace.swifteditor.tag.message.MessageFormat;
import com.brilliace.swifteditor.tag.message.SWFMessage;
import com.google.gson.Gson;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args ) throws IOException
{
// System.out.println( TagFormat.TagMap.get("71F").toAnalyzeReg() );
// TagLine t59 = TagFormat.TagMap.get("79");
// t59.setValue("14314321\n423424234\nasdgfasdgfasf\nafdagfadsf\r\nasdfasdfsaf");
// System.out.println(t59);
System.out.println(new Gson().toJson(TagFormat.TagMap.get("34B").toSegRegMap()));
// System.out.println(new Gson().toJson(TagFormat.WalkTagCell("51A", "['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>")));
// for(Map.Entry<String, TagLine> entry: TagFormat.TagMap.entrySet())
// {
// System.out.println(entry.getKey()+"="+entry.getValue().getAnalyzeReg());
// }
// MessageFormat.loadSWFMessage();
// SWFMessage swf = MessageFormat.getSWFMessage("202");
// //toJSON();
// System.out.println(swf.toFormatJSON());
// generMTFormat();
// System.out.println("111");
// System.out.println("103".matches("(?!202)\\d{3}"));
}
public static void generMTFormat() throws IOException
{
File path = new File("/Volumes/FUKAI/MT/bak");
if(path.exists())
path.delete();
path.mkdirs();
StringBuilder sb = new StringBuilder();
StringBuilder sbh = new StringBuilder();
for(Map.Entry<String, SWFMessage> entry : MessageFormat.mtCache.entrySet())
{
File item = new File(path,"MT"+entry.getKey()+".js");
FileOutputStream fos = new FileOutputStream(item);
fos.write(entry.getValue().toFormatJSON().getBytes());
fos.close();
if(entry.getKey().matches("n\\d{2}"))
sb.append("\tif(/mt"+entry.getKey().replace("n", "\\d")+"/.test(mty))\r\n");
else
sb.append("\tif(mty==\"mt"+entry.getKey()+"\")\r\n");
sb.append("\t\treturn MT"+entry.getKey()+"\r\n");
sbh.append("import MT"+entry.getKey()+" from './MT"+entry.getKey()+"'\r\n");
}
StringBuilder tsb = new StringBuilder();
tsb.append(sbh);
tsb.append("\r\nexport default function MTFactory(mty) \r\n{\r\n");
tsb.append(sb);
tsb.append("}");
File indexFile = new File(path,"index.js");
FileOutputStream fos = new FileOutputStream(indexFile);
fos.write(tsb.toString().getBytes());
fos.close();
}
}
package com.brilliace.swifteditor.tag;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class TagAnalyzer {
public static Map<Integer,String> analyze(TagLine line,String value)
{
String reg = line.getAnalyzeReg();
Matcher m = Pattern.compile(reg).matcher(value);
if(!m.matches()) //值与栏位格式不匹配
return null;
Map<Integer,String> subValues = new HashMap<Integer,String>();
int gcnt = line.getMaxCnt();
for(int i=1;i<=gcnt;i++)
subValues.put(i, m.group("S"+i+""));
return subValues;
}
}
package com.brilliace.swifteditor.tag;
public class TagCell {
public final static String CONST = "CONST";
public final static String FUNC = "FUNC";
public boolean fixed;
public int length;
public int minLen;
public String type;
public int cnt;
public String content;
public int line;
public String value;
public TagCell clone()
{
TagCell cell = new TagCell();
cell.fixed = fixed;
cell.length = length;
cell.type = type;
cell.cnt = cnt;
cell.content = content;
cell.line=line;
cell.value = value;
return cell;
}
public void setValue(String amt)
{
if("d".equals(type) || ("AMOUNT".equals(content)&&"FUNC".equals(type)))
{
if(amt.endsWith(","))
this.value = amt.substring(0,amt.length() - 1);
else
this.value = amt.replaceAll(",", ".");
return ;
}
this.value = amt;
}
public String toReg()
{
return toReg(true);
}
public String toReg(boolean useRegName)
{
String cnt = "S"+this.cnt;
if(CONST.equals(type))
{
if("CRLF".equals(content))
return "[\\r\\n]{1,2}";
return content;
}
else if(FUNC.equals(type))
{
if("AMOUNT".equals(content))
{
if(useRegName)
return "(?<"+cnt+">[\\d,]{1,"+this.length+"})";
else
return "[\\d,]{1,"+this.length+"}";
}
else if("NUMBER".equals(content))
{
if(useRegName)
return "(?<"+cnt+">[\\d,]{1,"+this.length+"})";
else
return "[\\d,]{1,"+this.length+"}";
}
else if("HHMM".equals(content)) //hhmm
{
if(useRegName)
return "(?<"+cnt+">\\d{4})";
else
return "\\d{4}";
}
else if("TIME2".equals(content))
{
if(useRegName)
return "(?<"+cnt+">\\d{6})";
else
return "\\d{6}";
}
else if("TIME3".equals(content))
{
if(useRegName)
return "(?<"+cnt+">\\d{2}\\d{2}?)";
else
return "\\d{2}\\d{2}?";
}
else if("OFFSET".equals(content))//hhmm
{
if(useRegName)
return "(?<"+cnt+">\\d{4})";
else
return "\\d{4}";
}
else if("SIGN".equals(content)) // +/-
{
if(useRegName)
return "(?<"+cnt+">\\+|\\-)";
else
return "\\+|\\-";
}
else if("DATE1".equals(content)) //yyMMdd
{
if(useRegName)
return "(?<"+cnt+">\\d{4})";
else
return "\\d{4}";
}
else if("DATE2".equals(content)) //yyMMdd
{
if(useRegName)
return "(?<"+cnt+">\\d{6})";
else
return "\\d{6}";
}
else if("YEAR".equals(content))
{
if(useRegName)
return "(?<"+cnt+">\\d{4})";
else
return "\\d{4}";
}
else if("DATE4".equals(content)) //yyyyMMdd
{
if(useRegName)
return "(?<"+cnt+">\\d{8})";
else
return "\\d{8}";
}
else if("CUR".equals(content)) //yyyyMMdd
{
if(useRegName)
return "(?<"+cnt+">[A-Z]{3})";
else
return "[A-Z]{3}";
}
else if("DC".equals(content)) //yyyyMMdd
{
if(useRegName)
return "(?<"+cnt+">C|D|RC|RD)";
else
return "C|D|RC|RD";
}
else if("SWIFTBIC".equals(content)) //4!a2!a2!c3!c
{
if(useRegName)
return "(?<"+cnt+">[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?)";
else
return "[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?";
}
else if("MT".equals(content))
{
if(useRegName)
return "(?<"+cnt+">[1-9]\\d{2})";
else
return "[1-9]\\d{2}";
}
else if("SB-LC".equals(content))
{
if(useRegName)
return "(?<"+cnt+">[A-Z]{4}[A-Z0-9]{2}\\d{4}[A-Z]{4}[A-Z0-9]{2})";
else
return "[A-Z]{4}[A-Z0-9]{2}\\d{4}[A-Z]{4}[A-Z0-9]{2}";
}
else if("DM".equals(content))
{
if(useRegName)
return "(?<"+cnt+">D|M)";
else
return "D|M";
}
else if("CC".equals(content))
{
if(useRegName)
return "(?<"+cnt+">[A-Z]{2})";
else
return "[A-Z]{2}";
}
else{
System.err.println("unknow function:"+content);
}
}
else
{
String type = "";
char c = this.type.charAt(0);
switch(c)
{
case 'n': type = "\\d";break;
case 'a': type = "[A-Z]";break;
case 'd': type = "[\\d,]";break;
case 'x': type = "[\\w/\\-\\?:\\(\\)\\.,'+\\{\\} ]";break;
case 'y': type = "[0-9A-Z\\.,\\-\\(\\)/='\\+:\\?\\!\"%&\\*\\<\\>;\\s]";break;
case 'z': type = "[\\w\\.,\\-\\(\\)/='\\+:\\?!\"%&\\*\\<\\>;\\{\\s@#]";break;
case 'c': type = "[A-Z0-9]";break;
case 'h': type = "[A-F0-9]";break;
case 'e': type = "\\s";break;
case 'A': type = "[A-Za-z]";break;
case 'B': type = "[A-Za-z0-9]";break;
default:System.err.println("unknow type:"+type);
}
//String length = "";
String nolines = "";
if(fixed || minLen==length)
{
nolines = type+"{"+length+"}";
}else
nolines = type+"{"+minLen+","+length+"}";
if(line > 1)
{
if(useRegName)
nolines = nolines+"([\\r\\n]{1,2}"+nolines +"){0,"+(line-1)+"}";
else //校验所用的,只转换单行
{
if(fixed || minLen==length)
{
nolines = type+"{"+length+"}";
}else
nolines = type+"{"+0+","+length+"}";
}
}
if(useRegName)
return "(?<"+cnt+">"+nolines+")";
else
return nolines;
}
return null;
}
}
package com.brilliace.swifteditor.tag;
import java.io.IOException;
import java.io.StringReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
public class TagFormat {
public static Properties TagProps = new Properties();
public static Map<String,TagLine> TagMap = new HashMap<String,TagLine>();
public static final char[] CharTypes = "ABacehnxyz".toCharArray();
static{
try {
TagProps.load(TagFormat.class.getClassLoader().getResourceAsStream("tags.properties"));
for(Entry<Object, Object> entry :TagProps.entrySet())
{
String tag = (String)entry.getKey();
String pattern = (String) entry.getValue();
TagLine line = WalkTagCell(tag,pattern.trim());
TagMap.put(tag, line);
}
} catch (IOException e) {
e.printStackTrace();
}
}
public static TagLine getTagLine(String tag)
{
TagLine tl = TagMap.get(tag);
if(tl!=null)
return tl.clone();
return new TagLine();
}
public static TagLine WalkTagCell (String tag,String pattern)
{
StringReader reader = new StringReader(pattern);
TagLine line = new TagLine();
line.setPattern(pattern);
line.setName(tag);
try {
int ic = -1;
boolean isFixed = false;
boolean isFunc = false;
StringBuilder content = new StringBuilder();
StringBuilder len = new StringBuilder();
int lines = 1;
int cnt = 1;
int minLen = 1;
boolean isConst = false;
TagCell cell = null;
while(true)
{
ic=reader.read();
char c = (char) ic;
if( (c< '0' || c > '9') && cell != null && "FUNC".equals(cell.type) && "AMOUNT|NUMBER".indexOf( cell.content) > -1)
{
//函数表示长度
if(len.length() > 0)
cell.length = Integer.parseInt(len.toString());
else
cell = null ; //清理
len.delete(0, len.length());
}
if(ic == -1)
break;
if(isConst && c!='\'')
{
content.append(c);
}
else if(isFunc && c!='>')
{
content.append(c);
}
else if(c>='0' && c <= '9') //长度区间 1
{
len.append(c);
}
else if(c=='!')
isFixed = true;
else if(c == '*')
{
if(len.length() > 0)
{
lines = Integer.parseInt(len.toString());
len.delete(0, len.length());
}
}
else if(c == '-')
{
if(len.length() > 0)
{
minLen = Integer.parseInt(len.toString());
len.delete(0, len.length());
}
}
else if(Arrays.binarySearch(CharTypes, c) >= 0 && len.length() > 0)
{
//字符块
// System.err.println("c type:"+c+"---"+Arrays.binarySearch(CharTypes, c));
// System.err.println("c number:"+((int) c)+"--"+((int)'['));
cell = new TagCell();
cell.fixed = isFixed;
cell.length = Integer.parseInt(len.toString());
cell.type = String.valueOf(c);
cell.cnt = cnt++;
cell.line = lines;
cell.minLen = minLen;
//清理
isFixed = false;
minLen = 1;
len.delete(0, len.length());
lines = 1;
line.add(cell);
}
else if(c == '\'')
{
if(!isConst)
{
isConst = true;
continue;
}
cell = new TagCell();
cell.fixed = true;
cell.length = content.length();
cell.type = TagCell.CONST;
cell.content = content.toString();
cell.cnt = -1;
cell.line = 1;
content.delete(0, content.length());
isConst = false;
line.add(cell);
}else if(c == '<')
{
isFunc = true;
}
else if(c == '>')
{
isFunc = false;
cell = new TagCell();
cell.fixed = true;
cell.length = content.length();
cell.type = TagCell.FUNC;
cell.content = content.toString();
cell.cnt = cnt++;
cell.line = 1;
content.delete(0, content.length());
line.add(cell);
}
else if(c == '[')
{
line.addOptions(new int[]{line.cellList.size(),-1});
}
else if(c == ']')
{
//if("51A".equals(tag))
line.fillLastOption(line.cellList.size());
}
}
line.setMaxCnt(cnt-1);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
line.getAnalyzeReg(); //生成栏位表达式
return line;
}
}
package com.brilliace.swifteditor.tag;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.brilliace.swifteditor.tag.message.MessageArea;
public class TagLine implements MessageArea {
public List<TagCell> cellList = new ArrayList<TagCell>();
public List<int[]> options = new ArrayList<int[]>();
private String pattern;
private String value;
private String tagName;
private String status;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
private int maxCnt = 0;
private int tno = 0;
private String desp = "";
private final int type = TAG;
private List<String> suffix = new ArrayList<String>();
public void add(TagCell cell) {
cellList.add(cell);
}
public void addOptions(int[] points)
{
options.add(points);
}
public void fillLastOption(int point)
{
if(options.size() ==0)
{
System.err.println("error pattern:"+this.getName()+"----"+this.getPattern());
return ;
}
options.get(options.size() -1)[1] = point;
}
public void setPattern(String pattern) {
this.pattern = pattern;
}
public String getPattern()
{
return pattern;
}
public void setValue(String value)
{
if(value == null)
{
this.value = null;
return ;
}
if(this.value!=null && this.value.equals(value))
return;
this.value = value;
this.fillCellValue();
}
public String getSourceValue()
{
return this.value;
}
/***
* 返回组装后的值
* @return
*/
public String getValue()
{
StringBuilder sb = new StringBuilder();
this.toSwfMessage(sb);
return sb.toString();
}
public String getCellValue(int position)
{
for(TagCell cell : this.cellList)
{
if(cell.cnt == position)
return cell.value;
}
return null;
}
/***
* 将栏位值填充到指定的栏位中去
*/
private void fillCellValue()
{
Map<Integer,String> subValues = TagAnalyzer.analyze(this, value);
if(subValues == null)
return ;
for(Map.Entry<Integer, String> entry : subValues.entrySet())
{
int cnt = entry.getKey();
for(TagCell cell : cellList)
{
if(cell.cnt == cnt)
{
cell.setValue( entry.getValue());
break;
}
}
}
}
public TagLine clone()
{
TagLine cp = new TagLine();
for(TagCell cell: cellList)
{
cp.add(cell.clone());
}
for(int[] option : options)
{
int[] cpopt = Arrays.copyOf(option, 2);
cp.addOptions(cpopt);
}
cp.setValue(value);
cp.setPattern(pattern);
cp.setDesp(desp);
cp.setMaxCnt(maxCnt);
cp.setSuffix(this.suffix);
cp.setTno(tno);
cp.setName(this.getName());
cp.setStatus(this.getStatus());
cp.analyzeReg = this.analyzeReg;
return cp;
}
public void toSwfMessage(StringBuilder sb) {
for(TagCell cell : this.cellList)
if("CONST".equals(cell.type))
sb.append(cell.content);
else if(cell.value != null)
sb.append(cell.value);
}
public String getName() {
return tagName;
}
public void addSubArea(MessageArea sub) {
}
public boolean isEnd()
{
return true;
}
public int getType() {
return type;
}
public void setName(String name) {
this.tagName = name;
}
/***
* 返回解析字符串
* @return
*/
public String toAnalyzeReg()
{
StringBuilder sb = new StringBuilder();
int cnt = 0;
boolean hasOpen = false;
for(TagCell cell : cellList)
{
for(int[] opt : options)
{
if(cnt == opt[0])
{
sb.append('(');
hasOpen=true;
// break;
}
else if(cnt == opt[1])
{
sb.append(")?");
hasOpen=false;
// break;
}
}
cnt++;
sb.append(cell.toReg());
}
if(hasOpen)
sb.append(")?");
return sb.toString();
}
//分段校验信息
public Map<String,Object> toSegRegMap()
{
Map<String,Object> set = new HashMap<String,Object>();
// int cnt = 0;
for(int cnt =0;cnt<this.cellList.size();cnt++)
{
TagCell cell = this.cellList.get(cnt);
if(cell.cnt < 0)
continue;
String key = "s"+cell.cnt;
HashMap<String,Object> info = new HashMap<String,Object>();
set.put(key, info);
info.put("reg", cell.toReg(false));
info.put("type", cell.type);
info.put("content", cell.content);
info.put("option", "M");
info.put("fixed", cell.fixed);
info.put("length", cell.length);
info.put("line", cell.line);
for(int[] opt : options)
{
if(cnt >= opt[0] && cnt<opt[1])
{
info.put("option", "O");
}
}
}
return set;
}
String analyzeReg = null;
public String getAnalyzeReg()
{
if(analyzeReg==null)
analyzeReg = this.toAnalyzeReg();
return analyzeReg;
}
public int getMaxCnt() {
return maxCnt;
}
public void setMaxCnt(int maxCnt) {
this.maxCnt = maxCnt;
}
public int getTno() {
return tno;
}
public void setTno(int tno) {
this.tno = tno;
}
public String getDesp() {
return desp;
}
public void setDesp(String desp) {
this.desp = desp;
}
public void setSuffix(List<String> tagSuffix) {
this.suffix.clear();
this.suffix.addAll(tagSuffix);
}
public List<String> getSuffix()
{
return this.suffix;
}
public Map<String,String> getIndexMap() {
Map<String,String> indexMap = new HashMap<String,String>();
for(TagCell cell : cellList)
{
if(cell.cnt > 0 && cell.value!=null)
indexMap.put("s"+cell.cnt, cell.value);
}
return indexMap;
}
}
package com.brilliace.swifteditor.tag.message;
import java.util.ArrayList;
import java.util.List;
public abstract class AbstractMessageArea implements MessageArea {
private List<MessageArea> fields = new ArrayList<MessageArea>();
private String name;
private String anlyReg;
private String desp;
public String getDesp() {
return desp;
}
public void setDesp(String desp) {
this.desp = desp;
}
public void toSwfMessage(StringBuilder sb) {
for(MessageArea field : fields)
field.toSwfMessage(sb);
}
public String getName() {
// TODO Auto-generated method stub
return name;
}
public void setName(String name)
{
this.name = name;
}
public List<MessageArea> getFields()
{
return fields;
}
public void addSubArea(MessageArea sub) {
// TODO Auto-generated method stub
fields.add(sub);
}
public MessageArea clone()
{
return null;
}
public boolean isEnd()
{
return false;
}
private MessageArea pattern;
public void setPattern(MessageArea pattern)
{
this.pattern = pattern;
}
public MessageArea getPattern()
{
return this.pattern;
}
public String getAnlyReg() {
return anlyReg;
}
public void setAnlyReg(String anlyReg) {
this.anlyReg = anlyReg;
}
}
package com.brilliace.swifteditor.tag.message;
import java.util.List;
public class CYC extends AbstractMessageArea {
private final int type = CYC;
public MessageArea clone() {
CYC cp =new CYC();
cp.setName(this.getName());
List<MessageArea> fields = this.getFields();
for(MessageArea field : fields)
cp.addSubArea(field.clone());
cp.setAnlyReg(this.getAnlyReg());
return cp;
}
public int getType() {
return type;
}
}
package com.brilliace.swifteditor.tag.message;
import java.util.List;
public class CYCList extends AbstractMessageArea {
private final int type = CYCLIST;
public CYCList clone() {
CYCList cp =new CYCList();
cp.setName(this.getName());
List<MessageArea> fields = this.getFields();
for(MessageArea field : fields)
cp.addSubArea(field.clone());
cp.setPattern(this.getPattern().clone());
cp.setAnlyReg(this.getAnlyReg());
return cp;
}
public int getType() {
return type;
}
}
package com.brilliace.swifteditor.tag.message;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;
import com.brilliace.swifteditor.tag.TagFormat;
import com.brilliace.swifteditor.tag.TagLine;
import com.google.gson.Gson;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
public class JSOutputTools {
private static Template TAG_TEMP ;
private static Template INDEX_TEMP;
private static Template TAG_VALIDATE;
static
{
try{
Configuration config = new Configuration();
config.setClassLoaderForTemplateLoading(JSOutputTools.class.getClassLoader(),"");
config.setDefaultEncoding("UTF-8");
TAG_TEMP = config.getTemplate("tag.ftl");
INDEX_TEMP = config.getTemplate("index.ftl");
TAG_VALIDATE = config.getTemplate("tag_validate.ftl");
}catch(Exception e)
{
}
}
public static void main(String[] args) throws IOException, TemplateException
{
// System.out.println(TagFormat.TagMap.get("52A").toAnalyzeReg());
// System.out.println(new Gson().toJson(TagFormat.TagMap.get("52A").toSegRegMap()));
Map<String,String> rs = new HashMap<String,String>();
for(Map.Entry<String, TagLine> entry : TagFormat.TagMap.entrySet())
{
rs.put(entry.getKey(),new Gson().toJson(entry.getValue().toSegRegMap()) );
}
File file = new File("/Volumes/FUKAI/Git/swiftedit/src/swift");
FileWriter fw = new FileWriter(new File(file,"TagRegMap.js"));
Map<String,Object> c = new HashMap<String,Object>();
c.put("regs", rs);
TAG_VALIDATE.process(c, fw);
fw.close();
}
public static void outputTags() {
// TODO Auto-generated method stub
MessageFormat.loadSWFMessage();
Map<String,TagLine> tags = new HashMap<String,TagLine>();
for(Map.Entry<String, SWFMessage> entry : MessageFormat.mtCache.entrySet())
{
SWFMessage swf = entry.getValue();
swf.getFields();
Stack<MessageArea> stack = new Stack<MessageArea>();
stack.add(swf);
while(!stack.isEmpty())
{
AbstractMessageArea aba = (AbstractMessageArea)stack.pop();
for(MessageArea ma:aba.getFields())
{
if(ma.getType() != MessageArea.TAG)
{
stack.add(ma);
continue;
}
TagLine tl = (TagLine)ma;
if(tl.getSuffix().size() > 0)
{
for(String tag : tl.getSuffix())
{
if(tags.containsKey(tag))
continue;
TagLine tl2 = tl.clone();
tl2.setName(tag);
tags.put(tag, tl2);
}
continue;
}
if(tags.containsKey(tl.getName()))
continue;
tags.put(tl.getName(), tl);
}
}
}
File path = new File("/Volumes/FUKAI/Tags");
if(path.exists())
{
path.delete();
path.mkdirs();
}
path.mkdirs();
Map<String,Map> root = new HashMap<String,Map>();
root.put("tags", tags);
FileWriter fw;
try {
fw = new FileWriter(new File(path,"index.js"));
INDEX_TEMP.process(root,fw );
fw.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
for(Map.Entry<String, TagLine> entry : tags.entrySet())
{
outputTagJS(path,entry.getValue());
}
}
public static void outputTagJS(File path,TagLine tag)
{
try {
File des = new File(path,"T"+tag.getName()+".js");
System.out.println(des.getAbsolutePath());
if(!des.exists() && !des.createNewFile())
return ;
FileWriter fw = new FileWriter(des);
Map<String,Object> root = new HashMap<String,Object>();
root.put("tag", tag.getName());
root.put("desp", tag.getDesp());
root.put("pattern", tag.getPattern()==null?"":tag.getPattern());
//root.put("T", tag);
TAG_TEMP.process(root, fw);
fw.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void outputMsgFormat(File path)
{
}
}
package com.brilliace.swifteditor.tag.message;
public interface MessageArea {
final int CYC = 1;
final int TAG = 0;
final int SEQ = 2;
final int CYCLIST=3;
final int SEQLIST=4;
final int MESSAGE = 5;
void toSwfMessage(StringBuilder sb);
MessageArea clone();
String getName();
void setName(String name);
void addSubArea(MessageArea sub);
int getType();
boolean isEnd();
// void toJSON(StringBuilder sb);
// void fromJSON(String json);
}
package com.brilliace.swifteditor.tag.message;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.brilliace.swifteditor.tag.TagFormat;
import com.brilliace.swifteditor.tag.TagLine;
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 {
private static final String MT_PATTERN = "swift_pattern_2018.xlsx";
public static Map<String,SWFMessage> mtCache = new HashMap<String,SWFMessage>();
static{
loadSWFMessage();
}
public static SWFMessage getSWFMessage(String mtType){
SWFMessage swfmsg = mtCache.get(mtType);
if(swfmsg == null && mtType.charAt(1)=='9')
swfmsg = mtCache.get('n'+mtType.substring(1));
if(swfmsg != null)
{
swfmsg.setMtType(mtType);
return swfmsg.clone();
}
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 void loadSWFMessage()
{
InputStream ins = MessageFormat.class.getClassLoader().getResourceAsStream(MT_PATTERN);
try {
@SuppressWarnings("resource")
XSSFWorkbook workBook = new XSSFWorkbook(ins);
int sheetCount = workBook.getNumberOfSheets();
for(int i=0;i<sheetCount;i++)
{
Sheet sheet = workBook.getSheetAt(i);
loadSingleSWFSheet(sheet);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private static void loadSingleSWFSheet(Sheet sheet)
{
System.out.println(sheet.getSheetName());
//获得当前sheet的开始行
int firstRowNum = sheet.getFirstRowNum();
//获得当前sheet的结束行
int lastRowNum = sheet.getLastRowNum();
Stack<MessageArea> stack = new Stack<MessageArea>();
SWFMessage message = new SWFMessage();
message.setMtType(sheet.getSheetName());
mtCache.put(sheet.getSheetName(), message);
stack.add(message);
int lastTno = 0;
rowBegin:
for(int i= firstRowNum;i<=lastRowNum ;i++)
{
Row row = sheet.getRow(i);
if(row == null)
continue;
//获得当前行的开始列
int firstCellNum = row.getFirstCellNum();
//获得当前行的列数
int lastCellNum = row.getPhysicalNumberOfCells();
for(int j=0;j<= lastCellNum - firstCellNum;j++)
{
Cell cell = row.getCell(j+firstCellNum);
String cellValue = getCellValue(cell).trim();
if(j==0)
{
if(cellValue.length() == 0) //空行
continue rowBegin;
if(cellValue.matches("O|M"))
{
String tagName = getCellValue(row.getCell(j+firstCellNum+1));
String desp = getCellValue(row.getCell(j+firstCellNum+2));
String tno = getCellValue(row.getCell(j+firstCellNum+4)).replaceAll("\\D", "");
String pattern = getCellValue(row.getCell(j+firstCellNum+3));
TagLine tagLine = TagFormat.getTagLine(tagName); //一行tag
tagLine.setStatus(cellValue);
tagLine.setDesp(desp);
try{
tagLine.setTno(Integer.parseInt(tno));
lastTno = tagLine.getTno();
}catch(Exception e)
{
System.out.println(Integer.valueOf(tno.charAt(0)));
}
tagLine.setName(tagName);
if(tagName.endsWith("a") && pattern.contains(" or "))
{
tagName = tagName.substring(0,tagName.length() - 1);
String[] sube = pattern.split(",|or");
//String[] tagSuffix = new String[sube.length];
List<String> tagSuffix = new ArrayList<String>();
boolean hasNoLetter = false;
for(int m=0; m<sube.length; m++)
{
if(sube[m].trim().length() == 0)
continue;
if(!hasNoLetter && sube[m].contains("No") && sube[m].contains("letter") && sube[m].contains("option"))
{
tagSuffix.add(tagName);
hasNoLetter = true;
continue;
}
tagSuffix.add(tagName + sube[m].trim());
}
tagLine.setSuffix(tagSuffix);
}
stack.peek().addSubArea(tagLine);
continue rowBegin;
}
else if(cellValue.matches("[\\-]{1,}\\>")) //循环开发
{
//循环开始
CYCList cycLst = new CYCList();
cycLst.setName((lastTno+1)+"");
CYC cyc = new CYC();
cycLst.addSubArea(cyc);
cycLst.setPattern(cyc);
stack.peek().addSubArea(cycLst);
stack.push(cyc);
continue rowBegin;
}
else if(cellValue.matches("[\\-]{1,}\\|")) //循环结束
{
//循环结束
stack.pop();
continue rowBegin;
}
else if(cellValue.indexOf("End of") >= 0) //序列接收
{
//循环结束
stack.pop();
continue rowBegin;
}
int idx0 = cellValue.indexOf("Sequence");
int idx1 = cellValue.indexOf("Subsequence");
if(idx0 >=0 || idx1>= 0 ) //序列开始
{
SEQList seqlst = new SEQList();
//判断是否有循环
if(cellValue.indexOf("Repetitive") >= 0)
seqlst.setCyc(1);
else
seqlst.setCyc(0);
//判断是否必填
if(cellValue.indexOf("Mandatory") >= 0)
seqlst.setOm("M");
else
seqlst.setOm("O");
//取出名字
int idx = 0;
if(idx0>=0)
idx = idx0+ "Sequence".length();
if(idx1>=0)
idx = idx1+ "Subsequence".length();
String name = "";
while(idx < cellValue.length())
{
char c = cellValue.charAt(idx);
if(c>='a' && c<='z' || (c>='0' && c<= '9') || (c>='A' && c<='Z'))
{
name= name +c;
}
else
{
if(name.length() !=0)
break;
}
idx++;
}
seqlst.setName(name);
SEQ seq = new SEQ();
seqlst.addSubArea(seq);
seqlst.setPattern(seq);
seqlst.setDesp(cellValue);
stack.peek().addSubArea(seqlst);
stack.push(seq);
continue rowBegin;
}
else //标题
{
if(message.getName()==null)
message.setName(cellValue);
}
}
System.out.print(cellValue);
}
System.out.print("\r\n");
}
message.setAnlyReg(MessageAnalyzer.generReg(message));
}
private static String getCellValue(Cell cell){
String cellValue = "";
if(cell == null){
return cellValue;
}
//把数字当成String来读,避免出现1读成1.0的情况
if(cell.getCellType() == Cell.CELL_TYPE_NUMERIC){
cell.setCellType(Cell.CELL_TYPE_STRING);
}
//判断数据的类型
switch (cell.getCellType()){
case Cell.CELL_TYPE_NUMERIC: //数字
cellValue = String.valueOf(cell.getNumericCellValue());
break;
case Cell.CELL_TYPE_STRING: //字符串
cellValue = String.valueOf(cell.getStringCellValue());
break;
case Cell.CELL_TYPE_BOOLEAN: //Boolean
cellValue = String.valueOf(cell.getBooleanCellValue());
break;
case Cell.CELL_TYPE_FORMULA: //公式
cellValue = String.valueOf(cell.getCellFormula());
break;
case Cell.CELL_TYPE_BLANK: //空值
cellValue = "";
break;
case Cell.CELL_TYPE_ERROR: //故障
cellValue = "非法字符";
break;
default:
cellValue = "未知类型";
break;
}
return cellValue.replace((char) 12288, ' ').trim();
}
}
package com.brilliace.swifteditor.tag.message;
import java.util.List;
public class SEQ extends AbstractMessageArea{
private final int type = SEQ;
public MessageArea clone() {
SEQ cp =new SEQ();
cp.setName(this.getName());
List<MessageArea> fields = this.getFields();
for(MessageArea field : fields)
cp.addSubArea(field.clone());
cp.setAnlyReg(this.getAnlyReg());
return cp;
}
public int getType() {
return type;
}
}
package com.brilliace.swifteditor.tag.message;
import java.util.List;
public class SEQList extends AbstractMessageArea {
private final int type = SEQLIST;
private String om;
private int cyc;
public int getCyc() {
return cyc;
}
public void setCyc(int cyc) {
this.cyc = cyc;
}
public String getOm() {
return om;
}
public void setOm(String om) {
this.om = om;
}
public SEQList clone() {
SEQList cp =new SEQList();
cp.setName(this.getName());
List<MessageArea> fields = this.getFields();
for(MessageArea field : fields)
cp.addSubArea(field.clone());
cp.setPattern(this.getPattern().clone());
cp.setAnlyReg(this.getAnlyReg());
cp.setDesp(this.getDesp());
cp.setOm(this.getOm());
return cp;
}
public int getType() {
return type;
}
}
package com.brilliace.swifteditor.tag.message;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import com.brilliace.swifteditor.tag.TagLine;
import com.google.gson.Gson;
public class SWFMessage extends AbstractMessageArea {
private String mtType;
private Map<Integer,String> headers;
public Map<Integer, String> getHeaders() {
return headers;
}
public void setHeaders(Map<Integer, String> headers) {
Map<Integer,String> clone = new HashMap<Integer,String>();
clone.putAll(headers);
clone.remove(4);
this.headers = clone;
}
public Map<String, String> getBscInfo() {
return bscInfo;
}
public void setBscInfo(Map<String, String> bscInfo) {
this.bscInfo = bscInfo;
}
private Map<String,String> bscInfo;
public String getMtType() {
return mtType;
}
public void setMtType(String mtType) {
this.mtType = mtType;
}
protected SWFMessage()
{
}
public static SWFMessage loadMTTemp(String mt)
{
return null;
}
/***
*
* @param sb 缓存4文首域名
*/
public void toSwfMessage(StringBuilder sb)
{
sb.append("{4:\r\n");
for(MessageArea sub : this.getFields())
sub.toSwfMessage(sb);
sb.append("\r\n}");
}
public String toSwfMessage()
{
StringBuilder sb = new StringBuilder();
toSwfMessage(sb);
return sb.toString();
}
public SWFMessage clone()
{
SWFMessage msg = new SWFMessage();
msg.mtType = this.mtType;
for(MessageArea field : this.getFields())
{
msg.addSubArea(field.clone());
}
msg.setName(this.getName());
msg.setAnlyReg(this.getAnlyReg());
return msg;
}
public String toJSON()
{
Map<String,Object> rs = new HashMap<String,Object>();
rs.put("title", this.getName());
rs.put("mty", this.mtType);
rs.put("snd_bic", bscInfo.get("sndbic"));
rs.put("rcv_bic", bscInfo.get("rcvbic"));
rs.put("tdheaders", bscInfo.get("tdmsgHead"));
rs.put("headers", headers);
rs.put("swift_message", toFormatJSON());
return new Gson().toJson(rs);
// return String.format("{\r\ntitle:\"%s\",\r\nmty:'%s',\r\nrcv_bic:'%s',\r\ntdheader:'%s',\r\nheaders:%s,\r\nswift_message:%s\r\n}",
// this.getName(),
// this.mtType,
// this.bscInfo.get("rcvbic"),
// this.bscInfo.get("tdmsgHead")==null?null:URLEncoder.encode(this.bscInfo.get("tdmsgHead")),
// new Gson().toJson( headers),
// this.toFormatJSON()
// );
}
public String toFormatJSON()
{
StringBuilder sb = new StringBuilder();
// sb.append("const M='M' \r\n");
// sb.append("const O='O' \r\n");
// sb.append("const Tags=");
toSubJson(this,sb);
// sb.append("\r\nconst Title=\""+this.getName()+"\"");
// sb.append("\r\n\r\nexport default { Tags,Title}");
return sb.toString();
}
private static void toSubJson(AbstractMessageArea ma,StringBuilder sb)
{
sb.append("[\r\n");
for(MessageArea sma :ma.getFields())
{
if(sma.getType() == TAG)
{
TagLine tag = (TagLine) sma;
sb.append(String.format("\t{\"tag\":\"%s\",\"status\":\"%s\",\"tno\":%d,\"letter\":%s,\"label\":\"%s\",\"tagValue\":%s},\r\n",
tag.getSuffix().size() > 0 ?tag.getSuffix().get(0) :tag.getName(),
tag.getStatus(),
tag.getTno(),
new Gson().toJson(tag.getSuffix()),
tag.getDesp(),
new Gson().toJson(new Object[]{tag.getIndexMap(),tag.getSourceValue()})
)
);
}
else if(sma.getType() == CYCLIST)
{
StringBuilder buff = new StringBuilder();
// int first = 9999;
for(MessageArea ssma : ((AbstractMessageArea)sma).getFields() )
{
AbstractMessageArea temp = (AbstractMessageArea)ssma ;
toSubJson(temp,buff);
buff.append(',');
}
sb.append(String.format("\t{\"cyclist\":\"%s\",\"cycs\":[",sma.getName()));
//String temp = buff.toString().trim();
sb.append(buff.subSequence(0, buff.length()-1));
sb.append("],\r\n\t\"pattern\":");
buff = new StringBuilder();
toSubJson((AbstractMessageArea)((AbstractMessageArea)sma).getPattern(),buff);
sb.append(buff);
sb.append("\t},\r\n");
}
else if(sma.getType() == SEQLIST)
{
StringBuilder buff = new StringBuilder();
// int first = 9999;
for(MessageArea ssma : ((AbstractMessageArea)sma).getFields() )
{
AbstractMessageArea temp = (AbstractMessageArea)ssma ;
toSubJson(temp,buff);
buff.append(',');
}
SEQList seqlst = (SEQList)sma;
sb.append(String.format("\t{\"seqlist\":\"%s\",\"cyccnt\":%d,\"status\":\"%s\",\"seqs\":[",sma.getName(),seqlst.getCyc(),seqlst.getOm()));
//String temp = buff.toString().trim();
sb.append(buff.subSequence(0, buff.length()-1));
sb.append("],\r\n\t\"pattern\":");
buff = new StringBuilder();
toSubJson((AbstractMessageArea)((AbstractMessageArea)sma).getPattern(),buff);
sb.append(buff);
sb.append(String.format(",\r\n\t\"desp\":\"%s\"",seqlst.getDesp() ));
sb.append("\t},\r\n");
}
}
if(sb.length() > 3 && sb.charAt(sb.length()-3)==',')
sb.setCharAt(sb.length()-3, ' ');
sb.append("]");
}
@Override
public int getType() {
return MESSAGE;
}
}
import React from 'react'
<#list tags as key, value>
import T${key} from "./T${key}"
</#list>
export default function(tag,props,onValue){
switch(tag)
{
<#list tags as key, value>
case "T${key}" :return <T${key} {...props} onValue={onValue} />;
</#list>
}
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
const FormItem = Form.Item;
export default class T${tag} extends Component
{
name='${tag}'
desp = "${desp}"
pattern = "${pattern}"
tno = -1
render()
{
return (<Row>
</Row>)
}
}
\ No newline at end of file
const RegMap = {
<#list regs as key,value>
T${key}:${value},
</#list>
}
export {RegMap}
\ No newline at end of file
11A=':'4!c'//'<CUR>
11R=<MT>'CRLF'<DATE2>['CRLF'4!n6!n]
11S=<MT>'CRLF'<DATE2>['CRLF'4!n6!n]
12=3!n
12A=':'4!c'/'[8c]'/'30x
12B=':'4!c'/'[8c]'/'4!c
12C=':'4!c'//'6!c
12D=4!c
12E=4!c
12F=4!c
12G=4!c
13A=':'4!c'//'3!c
13B=':'4!c'/'[8c]'/'30x
13C='/'8c'/'<HHMM><SIGN><OFFSET>
13D=<DATE2><HHMM><SIGN><OFFSET>
13J=':'4!c'//'5!c
13K=':'4!c'//'3!c'/'<NUMBER>15
14A=9a
14B=2!c
14C=4!n
14D=7x
14E=35x
14F=24x
14G=1a'/'8!a
14J=5a
14S=3!a2n['/'<HHMM>'/'4!c]
15A='CRLF'
15B='CRLF'
15C='CRLF'
15D='CRLF'
15E='CRLF'
15F='CRLF'
15G='CRLF'
15H='CRLF'
15I='CRLF'
15J='CRLF'
15K='CRLF'
15L='CRLF'
15M='CRLF'
15N='CRLF'
15O='CRLF'
15P='CRLF'
16A=5n
16C=2n
16R=16c
16S=16c
17A=1a
17B=':'4!c'//'1a
17E=1a
17F=1a
17G=1a
17H=1a
17I=1a
17L=1a
17M=1a
17N=1a
17O=1a
17P=1a
17Q=1a
17R=1a
17S=1a
17T=1a
17U=1a
17V=1a
17W=1a
17X=1a
17Y=1a
17Z=1a
18A=5n
18B=3n
18C=3n
18D=3n
19=<AMOUNT>17
19A=':'4!c'//'['N']<CUR><NUMBER>15
19B=':'4!c'//'<CUR><NUMBER>15
19C=['N']<NUMBER>15
19Y=<NUMBER>15
19Z=<NUMBER>15
20=16x
20C=':'4!c'//'16x
20D=':'4!c'//'25x
21=16x
21A=16x
21B=16x
21C=35x
21D=35x
21E=35x
21F=16x
21G=16x
21N=16x
21P=16x
21R=16x
22=8a'/'<SB-LC>
22A=4!c
22B=4!c
22C=<SB-LC>
22D=4!c
22E=4!c
22F=':'4!c'/'[8c]'/'4!c
22G=4!c
22H=':'4!c'//'4!c
22J=4!c
22K=4!c['/'35x]
22L=35x
22M=30x
22N=32x
22P=30x
22Q=10x
22R=32x
22S=1a'/'35x
22T=35x
22U=6a
22V=35x
22W=42x
22X=4!c
22Y=4!c
22Z=6a
23=16x
23A=10a'/'5a
23B=4!c
23C=7a
23D=10a
23E=4!c['/'30x]
23G=4!c['/'4!c]
23H=8!c
23S=6!a
23X=4!c'/'65x
24B=':'4!c'/'[8c]'/'4!c
24D=4!c['/'35x]
25=35x
25A='/'34x
25D=':'4!c'/'[8c]'/'4!c
25P=35x'CRLF'<SWIFTBIC>
26A=16x['/'4!x]
26B=16x['/'16x]
26C=[3!a]'/'15x'/'5!a4!a[4x]['//'8x]
26D=30*65x
26E=3n
26F=9a
26H=16x
26T=3!c
27=1!n'/'1!n
28=5n['/'2n]
28C=5n['/'5n]
28D=5n'/'5n
28E=5n'/'4!c
29A=4*35x
29B=4*35x
29E=4!c'/'<HHMM>
29H=4!c
29J=4!c['/'<HHMM>]
29K=4!c'/'<HHMM>
29L=<DATE4>'/'4!c'/'<HHMM>
29M=4!c'/'<HHMM>
29N=<DATE4>'/'4!c'/'<HHMM>
30=<DATE2>
30F=<DATE4>
30G=<DATE4>'/'<DATE4>
30H=<DATE4>
30J=1a3!n
30M=<DATE4>
30N=<DATE4>
30P=<DATE4>
30Q=<DATE4>
30S=<DATE4>
30T=<DATE4>
30U=<DATE4>
30V=<DATE4>
30X=<DATE4>
30Y=<DATE4>
30Z=<DATE4>
31C=<DATE2>
31D=<DATE2>29x
31E=<DATE2>
31F=<DATE2>['/'<DATE2>]['//'35x]
31G=<DATE2>'/'<HHMM>'/'12a
31L=<DATE2>
31P=<DATE2>[29x]
31S=<DATE2>
31X=[6!n[4!n]][7!a]
32A=<DATE2><CUR><AMOUNT>15
32B=<CUR><AMOUNT>15
32C=<DATE2><CUR><AMOUNT>15
32D=<DATE2><CUR><AMOUNT>15
32E=<CUR>
32F=3!a<NUMBER>15
32G=<CUR><AMOUNT>15
32H=['N']<CUR><AMOUNT>15
32K=<DM>3!n2!a<CUR><AMOUNT>15
32M=<CUR><AMOUNT>15
32Q=<CUR>'/'<CUR>
32R=['N']3!a<NUMBER>15
32U=<CUR><AMOUNT>15
33A=<DATE2><CUR><AMOUNT>15
33B=3!a15d
33C=<DATE2><CUR><AMOUNT>15
33D=<DATE2><CUR><AMOUNT>15
33E=<CUR><AMOUNT>15
33F=<CUR><AMOUNT>15
33G=<CUR><NUMBER>15[5!c]
33H=<CUR><AMOUNT>15
33J=3!a<NUMBER>15
33K=<DM>3!n2!a<CUR><AMOUNT>15
33P=<DATE2><CUR><AMOUNT>15
33S=3!a<NUMBER>15
33T=3!a<NUMBER>15
34A=<DATE2><CUR><AMOUNT>15
34B=<CUR><AMOUNT>15
34C=4!c'/'['N']<CUR><AMOUNT>15
34E=['N']<CUR><AMOUNT>15
34F=<CUR>[<DC>]<AMOUNT>15
34J=['N']3!a<AMOUNT>15
34P=<DATE2><CUR><AMOUNT>15
34R=<DATE2><CUR><AMOUNT>15
35A=3!a<NUMBER>15
35B=['ISIN'1e12!c]['CRLF'4*35x]
35C=3!c
35D=<DATE2>
35E=6*50x
35H=['N']3!a<NUMBER>15
35L=4*35x
35N=3!a<NUMBER>15
35S=3!a<NUMBER>15
35U=3!a<NUMBER>15[1a]
36=12d
36B=':'4!c'//'4!c'/'<NUMBER>15
36C=':'4!c'//'4!c
36E=':'4!c'//'4!c'/'['N']<NUMBER>15
37A=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37B=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37C=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37D=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37E=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37F=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37G=['N']<NUMBER>12
37H=<DC>['N']<NUMBER>12
37J=<NUMBER>12
37K=3!a<NUMBER>12
37L=<NUMBER>12
37M=['N']<NUMBER>12
37N=35x['CRLF'35x]0-5
37P=<NUMBER>12
37R=['N']<NUMBER>12
37U=<NUMBER>12
37V=['N']<NUMBER>12
38A=3n
38D=4n
38E=2n1a
38G=2n1a'/'2n1a
38H=2n1a'/'2n1a
38J=<DM>3!n
39A=2n'/'2n
39B=13x
39C=4*35x
39M=2!a
40A=24x
40B=24x'CRLF'24x
40C=4!a['/'35x]
40E=30x['/'35x]
40F=30x
41A=<SWIFTBIC>'CRLF'14x
41D=4*35x'CRLF'14x
42A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
42C=3*35x
42D=['/'<DC>]['/'34x]['CRLF']4*35x
42M=4*35x
42P=4*35x
43P=11x
43T=11x
44A=65x
44B=65x
44C=<DATE2>
44D=6*65x
44E=65x
44F=65x
45A=100*65z
45B=100*65z
45D=150*65z
46A=100*65z
46B=100*65z
47A=100*65z
47B=100*65z
48=3n['/'35x]
49=7!x
49G=100*65z
49H=100*65z
49M=100*65z
49N=100*65z
50=4*35x
50A=['/'34x'CRLF']<SWIFTBIC>
50B=4*35x
50C=<SWIFTBIC>
50D=['/'<DC>]['/'34x]['CRLF']4*35x
50F=35x'CRLF'4*35x
50G='/'34x'CRLF'<SWIFTBIC>
50H='/'34x'CRLF'4*35x
50K=['/'34x'CRLF']4*35x
50L=35x
51A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
51C='/'34x
51D=['/'<DC>]['/'34x]['CRLF']4*35x
52A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
52B=['/'<DC>]['/'34x]['CRLF'][35x]
52C='/'34x
52D=['/'<DC>]['/'34x]['CRLF']4*35x
53A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
53B=['/'<DC>]['/'34x]['CRLF'][35x]
53C='/'34x
53D=['/'<DC>]['/'34x]['CRLF']4*35x
54A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
54B=['/'<DC>]['/'34x]['CRLF'][35x]
54D=['/'<DC>]['/'34x]['CRLF']4*35x
55A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
55B=['/'<DC>]['/'34x]['CRLF'][35x]
55D=['/'<DC>]['/'34x]['CRLF']4*35x
56A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
56B=['/'<DC>]['/'34x]['CRLF'][35x]
56C='/'34x
56D=['/'<DC>]['/'34x]['CRLF']4*35x
56J=5*40x
57A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
57B=['/'<DC>]['/'34x]['CRLF'][35x]
57C='/'34x
57D=['/'<DC>]['/'34x]['CRLF']4*35x
57J=5*40x
58A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
58B=['/'<DC>]['/'34x]['CRLF'][35x]
58D=['/'<DC>]['/'34x]['CRLF']4*35x
58J=5*40x
59=['/'34x'CRLF']4*35x
59A=['/'34x'CRLF']<SWIFTBIC>
59F=['/'34x'CRLF']4*35x
60=<DC><DATE2>3!a<AMOUNT>15
60F=<DC><DATE2><CUR><AMOUNT>15
60M=<DC><DATE2>3!a<AMOUNT>15
61=6!n[4!n]2a[1!a]15d1!a3!c16x['//'16x]['CRLF'34x]
62F=<DC><DATE2>3!a<AMOUNT>15
62M=<DC><DATE2>3!a<AMOUNT>15
64=<DC><DATE2>3!a<AMOUNT>15
65=<DC><DATE2>3!a<AMOUNT>15
68A=6n<CUR>6n'/'2n['/'<AMOUNT>15]['//'10x]
69A=':'4!c'//'<DATE4>'/'<DATE4>
69B=':'4!c'//'<DATE4><TIME2>'/'<DATE4><TIME2>
69C=':'4!c'//'<DATE4>'/'4!c
69D=':'4!c'//'<DATE4><TIME2>'/'4!c
69E=':'4!c'//'4!c'/'<DATE4>
69F=':'4!c'//'4!c'/'<DATE4><TIME2>
69J=':'4!c'//'4!c
70=4*35x
70C=':'4!c'//'4*35x
70D=':'4!c'//'6*35x
70E=':'4!c'//'10*35x
70F=':'4!c'//'8000z
70G=':'4!c'//'10*35z
71A=3!a
71B=6*35x
71C=6*35x
71D=6*35z
71F=<CUR><AMOUNT>15
71G=<CUR><AMOUNT>15
71N=4!c['CRLF'6*35z]
72=6*35x
72Z=6*35z
73=6*35x
73A=6*35z
73R=4!c['/'35x]
73S=4!c['/'35x]
74=6*35x
75=6*35x
76=6*35x
77=20*35z
77A=20*35x
77B=3*35x
77C=150*65x
77D=6*35x
77E=73z['CRLF'9999*78z]
77F=1800y
77H=6a['/'<DATE4>]['//'<YEAR>]
77J=70*50z
77T=9000z
78=12*65x
79=35*50x
79Z=35*50z
80=6*35x
81A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
81D=['/'<DC>]['/'34x]['CRLF']4*35x
81J=5*40x
82A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
82B=['/'<DC>]['/'34x]['CRLF'][35x]
82D=['/'<DC>]['/'34x]['CRLF']4*35x
82J=5*40x
83A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
83C='/'34x
83D=['/'<DC>]['/'34x]['CRLF']4*35x
83J=5*40x
84A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
84B=['/'<DC>]['/'34x]['CRLF'][35x]
84D=['/'<DC>]['/'34x]['CRLF']4*35x
84J=5*40x
85A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
85B=['/'<DC>]['/'34x]['CRLF'][35x]
85D=['/'<DC>]['/'34x]['CRLF']4*35x
85J=5*40x
86=6*65x
86A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
86B=['/'<DC>]['/'34x]['CRLF'][35x]
86D=['/'<DC>]['/'34x]['CRLF']4*35x
86J=5*40x
87A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
87B=['/'<DC>]['/'34x]['CRLF'][35x]
87D=['/'<DC>]['/'34x]['CRLF']4*35x
87J=5*40x
88A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
88B=['/'<DC>]['/'34x]['CRLF'][35x]
88D=['/'<DC>]['/'34x]['CRLF']4*35x
88J=5*40x
89A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
89D=['/'<DC>]['/'34x]['CRLF']4*35x
89J=5*40x
90A=':'4!c'//'4!c'/'['N']<NUMBER>15
90B=':'4!c'//'4!c'/'<CUR><NUMBER>15
90C=5n<CUR><AMOUNT>15
90D=5n<CUR><AMOUNT>15
90E=':'4!c'//'4!c
90F=':'4!c'//'4!c'/'<CUR><NUMBER>15'/'4!c'/'<NUMBER>15
90J=':'4!c'//'4!c'/'<CUR><NUMBER>15'/'<CUR><NUMBER>15
90K=':'4!c'//'<NUMBER>15
90L=':'4!c'//'['N']<NUMBER>15
91A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
91D=['/'<DC>]['/'34x]['CRLF']4*35x
91J=5*40x
92A=':'4!c'//'['N']<NUMBER>15
92B=':'4!c'//'<CUR>'/'<CUR>'/'<NUMBER>15
92C=':'4!c'/'[8c]'/'24x
92D=':'4!c'//'<NUMBER>15'/'<NUMBER>15
92F=':'4!c'//'<CUR><NUMBER>15
92H=':'4!c'//'<CUR><NUMBER>15'/'4!c
92J=':'4!c'/'[8c]'/'4!c'/'<CUR><NUMBER>15['/'4!c]
92K=':'4!c'//'4!c
92L=':'4!c'//'<CUR><NUMBER>15'/'<CUR><NUMBER>15
92M=':'4!c'//'<CUR><NUMBER>15'/'<NUMBER>15
92N=':'4!c'//'<NUMBER>15'/'<CUR><NUMBER>15
92P=':'4!c'//'<NUMBER>15
92R=':'4!c'/'[8c]'/'4!c'/'<NUMBER>15
93A=':'4!c'/'[8c]'/'4!c
93B=':'4!c'/'[8c]'/'4!c'/'['N']<NUMBER>15
93C=':'4!c'//'4!c'/'4!c'/'['N']<NUMBER>15
93D=':'4!c'//'['N']<NUMBER>15
94A=4!c
94B=':'4!c'/'[8c]'/'4!c['/'30x]
94C=':'4!c'//'<CC>
94D=':'4!c'//'[<CC>]'/'35x
94E=':'4!c'//'10*35x
94F=':'4!c'//'4!c'/'<SWIFTBIC>
94G=':'4!c'//'2*35x
94H=':'4!c'//'<SWIFTBIC>
94L=':'4!c'//'18!c2!n
95C=':'4!c'//'<CC>
95L=':'4!c'//'18!c2!n
95P=':'4!c'//'<SWIFTBIC>
95Q=':'4!c'//'4*35x
95R=':'4!c'/'8c'/'34x
95S=':'4!c'/'[8c]'/'4!c'/'<CC>'/'30x
95U=':'4!c'//'3*35x
95V=':'4!c'//'10*35x
96A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
96D=['/'<DC>]['/'34x]['CRLF']4*35x
96J=5*40x
97A=':'4!c'//'35x
97B=':'4!c'/'[8c]'/'4!c'/'35x
97C=':'4!c'//'4!c
97E=':'4!c'//'34x
98A=':'4!c'//'<DATE4>T50
98B=':'4!c'/'[8c]'/'4!c
98C=':'4!c'//'<DATE4><TIME2>
98D=<DATE4><TIME2>[','3n]['/'['N']<TIME3>]
98E=':'4!c'//'<DATE4><TIME2>[','3n]['/'['N']<TIME3>]
98F=':'4!c'/'[8c]'/'4!c<TIME2>
98G=<DATE4><TIME2>[','3n]['/'['N']<TIME3>]
98H=<TIME2>[','3n]['/'['N']<TIME3>]
98J=':'4!c'//'<DATE4><TIME2>'/'<SWIFTBIC>
98K=':'4!c'/'8c'/'<DATE4><TIME2>'/'34x
99A=':'4!c'//'['N']3!n
99B=':'4!c'//'3!n
99C=':'4!c'//'6!n
\ No newline at end of file
package com.brilliace.swifteditor;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
Manifest-Version: 1.0
Built-By: fukai
Build-Jdk: 1.8.0_121
Created-By: Maven Integration for Eclipse
#Generated by Maven Integration for Eclipse
#Wed Oct 31 22:38:53 CST 2018
version=0.0.1-SNAPSHOT
groupId=com.brilliace
m2e.projectName=swifteditor
m2e.projectLocation=/Users/fukai/Documents/workspace/swifteditor
artifactId=swifteditor
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.brilliace</groupId>
<artifactId>swifteditor</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>swifteditor</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.10.1</version>
</dependency>
<!-- <dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.10</version>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.3.5</version>
</dependency> -->
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.freemarker/freemarker -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
<!-- <scope>test</scope> -->
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>swifteditor</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
import React from 'react'
<#list tags as key, value>
import T${key} from "./T${key}"
</#list>
export default function(tag,props,onValue){
switch(tag)
{
<#list tags as key, value>
case "T${key}" :return <T${key} {...props} onValue={onValue} />;
</#list>
}
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
const FormItem = Form.Item;
export default class T${tag} extends Component
{
name='${tag}'
desp = "${desp}"
pattern = "${pattern}"
tno = -1
render()
{
return (<Row>
</Row>)
}
}
\ No newline at end of file
const RegMap = {
<#list regs as key,value>
T${key}:${value},
</#list>
}
export {RegMap}
\ No newline at end of file
11A=':'4!c'//'<CUR>
11R=<MT>'CRLF'<DATE2>['CRLF'4!n6!n]
11S=<MT>'CRLF'<DATE2>['CRLF'4!n6!n]
12=3!n
12A=':'4!c'/'[8c]'/'30x
12B=':'4!c'/'[8c]'/'4!c
12C=':'4!c'//'6!c
12D=4!c
12E=4!c
12F=4!c
12G=4!c
13A=':'4!c'//'3!c
13B=':'4!c'/'[8c]'/'30x
13C='/'8c'/'<HHMM><SIGN><OFFSET>
13D=<DATE2><HHMM><SIGN><OFFSET>
13J=':'4!c'//'5!c
13K=':'4!c'//'3!c'/'<NUMBER>15
14A=9a
14B=2!c
14C=4!n
14D=7x
14E=35x
14F=24x
14G=1a'/'8!a
14J=5a
14S=3!a2n['/'<HHMM>'/'4!c]
15A='CRLF'
15B='CRLF'
15C='CRLF'
15D='CRLF'
15E='CRLF'
15F='CRLF'
15G='CRLF'
15H='CRLF'
15I='CRLF'
15J='CRLF'
15K='CRLF'
15L='CRLF'
15M='CRLF'
15N='CRLF'
15O='CRLF'
15P='CRLF'
16A=5n
16C=2n
16R=16c
16S=16c
17A=1a
17B=':'4!c'//'1a
17E=1a
17F=1a
17G=1a
17H=1a
17I=1a
17L=1a
17M=1a
17N=1a
17O=1a
17P=1a
17Q=1a
17R=1a
17S=1a
17T=1a
17U=1a
17V=1a
17W=1a
17X=1a
17Y=1a
17Z=1a
18A=5n
18B=3n
18C=3n
18D=3n
19=<AMOUNT>17
19A=':'4!c'//'['N']<CUR><NUMBER>15
19B=':'4!c'//'<CUR><NUMBER>15
19C=['N']<NUMBER>15
19Y=<NUMBER>15
19Z=<NUMBER>15
20=16x
20C=':'4!c'//'16x
20D=':'4!c'//'25x
21=16x
21A=16x
21B=16x
21C=35x
21D=35x
21E=35x
21F=16x
21G=16x
21N=16x
21P=16x
21R=16x
22=8a'/'<SB-LC>
22A=4!c
22B=4!c
22C=<SB-LC>
22D=4!c
22E=4!c
22F=':'4!c'/'[8c]'/'4!c
22G=4!c
22H=':'4!c'//'4!c
22J=4!c
22K=4!c['/'35x]
22L=35x
22M=30x
22N=32x
22P=30x
22Q=10x
22R=32x
22S=1a'/'35x
22T=35x
22U=6a
22V=35x
22W=42x
22X=4!c
22Y=4!c
22Z=6a
23=16x
23A=10a'/'5a
23B=4!c
23C=7a
23D=10a
23E=4!c['/'30x]
23G=4!c['/'4!c]
23H=8!c
23S=6!a
23X=4!c'/'65x
24B=':'4!c'/'[8c]'/'4!c
24D=4!c['/'35x]
25=35x
25A='/'34x
25D=':'4!c'/'[8c]'/'4!c
25P=35x'CRLF'<SWIFTBIC>
26A=16x['/'4!x]
26B=16x['/'16x]
26C=[3!a]'/'15x'/'5!a4!a[4x]['//'8x]
26D=30*65x
26E=3n
26F=9a
26H=16x
26T=3!c
27=1!n'/'1!n
28=5n['/'2n]
28C=5n['/'5n]
28D=5n'/'5n
28E=5n'/'4!c
29A=4*35x
29B=4*35x
29E=4!c'/'<HHMM>
29H=4!c
29J=4!c['/'<HHMM>]
29K=4!c'/'<HHMM>
29L=<DATE4>'/'4!c'/'<HHMM>
29M=4!c'/'<HHMM>
29N=<DATE4>'/'4!c'/'<HHMM>
30=<DATE2>
30F=<DATE4>
30G=<DATE4>'/'<DATE4>
30H=<DATE4>
30J=1a3!n
30M=<DATE4>
30N=<DATE4>
30P=<DATE4>
30Q=<DATE4>
30S=<DATE4>
30T=<DATE4>
30U=<DATE4>
30V=<DATE4>
30X=<DATE4>
30Y=<DATE4>
30Z=<DATE4>
31C=<DATE2>
31D=<DATE2>29x
31E=<DATE2>
31F=<DATE2>['/'<DATE2>]['//'35x]
31G=<DATE2>'/'<HHMM>'/'12a
31L=<DATE2>
31P=<DATE2>[29x]
31S=<DATE2>
31X=[6!n[4!n]][7!a]
32A=<DATE2><CUR><AMOUNT>15
32B=<CUR><AMOUNT>15
32C=<DATE2><CUR><AMOUNT>15
32D=<DATE2><CUR><AMOUNT>15
32E=<CUR>
32F=3!a<NUMBER>15
32G=<CUR><AMOUNT>15
32H=['N']<CUR><AMOUNT>15
32K=<DM>3!n2!a<CUR><AMOUNT>15
32M=<CUR><AMOUNT>15
32Q=<CUR>'/'<CUR>
32R=['N']3!a<NUMBER>15
32U=<CUR><AMOUNT>15
33A=<DATE2><CUR><AMOUNT>15
33B=3!a15d
33C=<DATE2><CUR><AMOUNT>15
33D=<DATE2><CUR><AMOUNT>15
33E=<CUR><AMOUNT>15
33F=<CUR><AMOUNT>15
33G=<CUR><NUMBER>15[5!c]
33H=<CUR><AMOUNT>15
33J=3!a<NUMBER>15
33K=<DM>3!n2!a<CUR><AMOUNT>15
33P=<DATE2><CUR><AMOUNT>15
33S=3!a<NUMBER>15
33T=3!a<NUMBER>15
34A=<DATE2><CUR><AMOUNT>15
34B=<CUR><AMOUNT>15
34C=4!c'/'['N']<CUR><AMOUNT>15
34E=['N']<CUR><AMOUNT>15
34F=<CUR>[<DC>]<AMOUNT>15
34J=['N']3!a<AMOUNT>15
34P=<DATE2><CUR><AMOUNT>15
34R=<DATE2><CUR><AMOUNT>15
35A=3!a<NUMBER>15
35B=['ISIN'1e12!c]['CRLF'4*35x]
35C=3!c
35D=<DATE2>
35E=6*50x
35H=['N']3!a<NUMBER>15
35L=4*35x
35N=3!a<NUMBER>15
35S=3!a<NUMBER>15
35U=3!a<NUMBER>15[1a]
36=12d
36B=':'4!c'//'4!c'/'<NUMBER>15
36C=':'4!c'//'4!c
36E=':'4!c'//'4!c'/'['N']<NUMBER>15
37A=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37B=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37C=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37D=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37E=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37F=<NUMBER>12['//'<DATE2><DM>3n]['/'16x]
37G=['N']<NUMBER>12
37H=<DC>['N']<NUMBER>12
37J=<NUMBER>12
37K=3!a<NUMBER>12
37L=<NUMBER>12
37M=['N']<NUMBER>12
37N=35x['CRLF'35x]0-5
37P=<NUMBER>12
37R=['N']<NUMBER>12
37U=<NUMBER>12
37V=['N']<NUMBER>12
38A=3n
38D=4n
38E=2n1a
38G=2n1a'/'2n1a
38H=2n1a'/'2n1a
38J=<DM>3!n
39A=2n'/'2n
39B=13x
39C=4*35x
39M=2!a
40A=24x
40B=24x'CRLF'24x
40C=4!a['/'35x]
40E=30x['/'35x]
40F=30x
41A=<SWIFTBIC>'CRLF'14x
41D=4*35x'CRLF'14x
42A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
42C=3*35x
42D=['/'<DC>]['/'34x]['CRLF']4*35x
42M=4*35x
42P=4*35x
43P=11x
43T=11x
44A=65x
44B=65x
44C=<DATE2>
44D=6*65x
44E=65x
44F=65x
45A=100*65z
45B=100*65z
45D=150*65z
46A=100*65z
46B=100*65z
47A=100*65z
47B=100*65z
48=3n['/'35x]
49=7!x
49G=100*65z
49H=100*65z
49M=100*65z
49N=100*65z
50=4*35x
50A=['/'34x'CRLF']<SWIFTBIC>
50B=4*35x
50C=<SWIFTBIC>
50D=['/'<DC>]['/'34x]['CRLF']4*35x
50F=35x'CRLF'4*35x
50G='/'34x'CRLF'<SWIFTBIC>
50H='/'34x'CRLF'4*35x
50K=['/'34x'CRLF']4*35x
50L=35x
51A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
51C='/'34x
51D=['/'<DC>]['/'34x]['CRLF']4*35x
52A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
52B=['/'<DC>]['/'34x]['CRLF'][35x]
52C='/'34x
52D=['/'<DC>]['/'34x]['CRLF']4*35x
53A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
53B=['/'<DC>]['/'34x]['CRLF'][35x]
53C='/'34x
53D=['/'<DC>]['/'34x]['CRLF']4*35x
54A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
54B=['/'<DC>]['/'34x]['CRLF'][35x]
54D=['/'<DC>]['/'34x]['CRLF']4*35x
55A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
55B=['/'<DC>]['/'34x]['CRLF'][35x]
55D=['/'<DC>]['/'34x]['CRLF']4*35x
56A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
56B=['/'<DC>]['/'34x]['CRLF'][35x]
56C='/'34x
56D=['/'<DC>]['/'34x]['CRLF']4*35x
56J=5*40x
57A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
57B=['/'<DC>]['/'34x]['CRLF'][35x]
57C='/'34x
57D=['/'<DC>]['/'34x]['CRLF']4*35x
57J=5*40x
58A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
58B=['/'<DC>]['/'34x]['CRLF'][35x]
58D=['/'<DC>]['/'34x]['CRLF']4*35x
58J=5*40x
59=['/'34x'CRLF']4*35x
59A=['/'34x'CRLF']<SWIFTBIC>
59F=['/'34x'CRLF']4*35x
60=<DC><DATE2>3!a<AMOUNT>15
60F=<DC><DATE2><CUR><AMOUNT>15
60M=<DC><DATE2>3!a<AMOUNT>15
61=6!n[4!n]2a[1!a]15d1!a3!c16x['//'16x]['CRLF'34x]
62F=<DC><DATE2>3!a<AMOUNT>15
62M=<DC><DATE2>3!a<AMOUNT>15
64=<DC><DATE2>3!a<AMOUNT>15
65=<DC><DATE2>3!a<AMOUNT>15
68A=6n<CUR>6n'/'2n['/'<AMOUNT>15]['//'10x]
69A=':'4!c'//'<DATE4>'/'<DATE4>
69B=':'4!c'//'<DATE4><TIME2>'/'<DATE4><TIME2>
69C=':'4!c'//'<DATE4>'/'4!c
69D=':'4!c'//'<DATE4><TIME2>'/'4!c
69E=':'4!c'//'4!c'/'<DATE4>
69F=':'4!c'//'4!c'/'<DATE4><TIME2>
69J=':'4!c'//'4!c
70=4*35x
70C=':'4!c'//'4*35x
70D=':'4!c'//'6*35x
70E=':'4!c'//'10*35x
70F=':'4!c'//'8000z
70G=':'4!c'//'10*35z
71A=3!a
71B=6*35x
71C=6*35x
71D=6*35z
71F=<CUR><AMOUNT>15
71G=<CUR><AMOUNT>15
71N=4!c['CRLF'6*35z]
72=6*35x
72Z=6*35z
73=6*35x
73A=6*35z
73R=4!c['/'35x]
73S=4!c['/'35x]
74=6*35x
75=6*35x
76=6*35x
77=20*35z
77A=20*35x
77B=3*35x
77C=150*65x
77D=6*35x
77E=73z['CRLF'9999*78z]
77F=1800y
77H=6a['/'<DATE4>]['//'<YEAR>]
77J=70*50z
77T=9000z
78=12*65x
79=35*50x
79Z=35*50z
80=6*35x
81A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
81D=['/'<DC>]['/'34x]['CRLF']4*35x
81J=5*40x
82A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
82B=['/'<DC>]['/'34x]['CRLF'][35x]
82D=['/'<DC>]['/'34x]['CRLF']4*35x
82J=5*40x
83A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
83C='/'34x
83D=['/'<DC>]['/'34x]['CRLF']4*35x
83J=5*40x
84A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
84B=['/'<DC>]['/'34x]['CRLF'][35x]
84D=['/'<DC>]['/'34x]['CRLF']4*35x
84J=5*40x
85A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
85B=['/'<DC>]['/'34x]['CRLF'][35x]
85D=['/'<DC>]['/'34x]['CRLF']4*35x
85J=5*40x
86=6*65x
86A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
86B=['/'<DC>]['/'34x]['CRLF'][35x]
86D=['/'<DC>]['/'34x]['CRLF']4*35x
86J=5*40x
87A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
87B=['/'<DC>]['/'34x]['CRLF'][35x]
87D=['/'<DC>]['/'34x]['CRLF']4*35x
87J=5*40x
88A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
88B=['/'<DC>]['/'34x]['CRLF'][35x]
88D=['/'<DC>]['/'34x]['CRLF']4*35x
88J=5*40x
89A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
89D=['/'<DC>]['/'34x]['CRLF']4*35x
89J=5*40x
90A=':'4!c'//'4!c'/'['N']<NUMBER>15
90B=':'4!c'//'4!c'/'<CUR><NUMBER>15
90C=5n<CUR><AMOUNT>15
90D=5n<CUR><AMOUNT>15
90E=':'4!c'//'4!c
90F=':'4!c'//'4!c'/'<CUR><NUMBER>15'/'4!c'/'<NUMBER>15
90J=':'4!c'//'4!c'/'<CUR><NUMBER>15'/'<CUR><NUMBER>15
90K=':'4!c'//'<NUMBER>15
90L=':'4!c'//'['N']<NUMBER>15
91A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
91D=['/'<DC>]['/'34x]['CRLF']4*35x
91J=5*40x
92A=':'4!c'//'['N']<NUMBER>15
92B=':'4!c'//'<CUR>'/'<CUR>'/'<NUMBER>15
92C=':'4!c'/'[8c]'/'24x
92D=':'4!c'//'<NUMBER>15'/'<NUMBER>15
92F=':'4!c'//'<CUR><NUMBER>15
92H=':'4!c'//'<CUR><NUMBER>15'/'4!c
92J=':'4!c'/'[8c]'/'4!c'/'<CUR><NUMBER>15['/'4!c]
92K=':'4!c'//'4!c
92L=':'4!c'//'<CUR><NUMBER>15'/'<CUR><NUMBER>15
92M=':'4!c'//'<CUR><NUMBER>15'/'<NUMBER>15
92N=':'4!c'//'<NUMBER>15'/'<CUR><NUMBER>15
92P=':'4!c'//'<NUMBER>15
92R=':'4!c'/'[8c]'/'4!c'/'<NUMBER>15
93A=':'4!c'/'[8c]'/'4!c
93B=':'4!c'/'[8c]'/'4!c'/'['N']<NUMBER>15
93C=':'4!c'//'4!c'/'4!c'/'['N']<NUMBER>15
93D=':'4!c'//'['N']<NUMBER>15
94A=4!c
94B=':'4!c'/'[8c]'/'4!c['/'30x]
94C=':'4!c'//'<CC>
94D=':'4!c'//'[<CC>]'/'35x
94E=':'4!c'//'10*35x
94F=':'4!c'//'4!c'/'<SWIFTBIC>
94G=':'4!c'//'2*35x
94H=':'4!c'//'<SWIFTBIC>
94L=':'4!c'//'18!c2!n
95C=':'4!c'//'<CC>
95L=':'4!c'//'18!c2!n
95P=':'4!c'//'<SWIFTBIC>
95Q=':'4!c'//'4*35x
95R=':'4!c'/'8c'/'34x
95S=':'4!c'/'[8c]'/'4!c'/'<CC>'/'30x
95U=':'4!c'//'3*35x
95V=':'4!c'//'10*35x
96A=['/'<DC>]['/'34x]['CRLF']<SWIFTBIC>
96D=['/'<DC>]['/'34x]['CRLF']4*35x
96J=5*40x
97A=':'4!c'//'35x
97B=':'4!c'/'[8c]'/'4!c'/'35x
97C=':'4!c'//'4!c
97E=':'4!c'//'34x
98A=':'4!c'//'<DATE4>T50
98B=':'4!c'/'[8c]'/'4!c
98C=':'4!c'//'<DATE4><TIME2>
98D=<DATE4><TIME2>[','3n]['/'['N']<TIME3>]
98E=':'4!c'//'<DATE4><TIME2>[','3n]['/'['N']<TIME3>]
98F=':'4!c'/'[8c]'/'4!c<TIME2>
98G=<DATE4><TIME2>[','3n]['/'['N']<TIME3>]
98H=<TIME2>[','3n]['/'['N']<TIME3>]
98J=':'4!c'//'<DATE4><TIME2>'/'<SWIFTBIC>
98K=':'4!c'/'8c'/'<DATE4><TIME2>'/'34x
99A=':'4!c'//'['N']3!n
99B=':'4!c'//'3!n
99C=':'4!c'//'6!n
\ No newline at end of file
#Generated by Maven
#Wed Oct 31 22:39:08 CST 2018
version=0.0.1-SNAPSHOT
groupId=com.brilliace
artifactId=swifteditor
com/brilliace/swifteditor/tag/message/SEQ.class
com/brilliace/swifteditor/tag/message/AbstractMessageArea.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/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/App.class
com/brilliace/swifteditor/tag/message/SWFMessage.class
com/brilliace/swifteditor/tag/TagCell.class
com/brilliace/swifteditor/tag/message/SEQList.class
com/brilliace/swifteditor/tag/message/MessageAnalyzer.class
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="com.brilliace.swifteditor.AppTest" time="0.002" errors="0" skipped="0">
<properties>
<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="java.vm.version" value="25.121-b13"/>
<property name="gopherProxySet" value="false"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="maven.multiModuleProjectDirectory" value="/Users/fukai/Documents/workspace/swifteditor"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=":"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/>
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="user.country" value="CN"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="/Users/fukai/Documents/workspace/swifteditor"/>
<property name="java.runtime.version" value="1.8.0_121-b13"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/endorsed"/>
<property name="os.arch" value="x86_64"/>
<property name="java.io.tmpdir" value="/var/folders/pd/hbf3q9xx6fq6p9j1nn7kx0xw0000gn/T/"/>
<property name="line.separator" value="
"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<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="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.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="os.version" value="10.14"/>
<property name="user.home" value="/Users/fukai"/>
<property name="user.timezone" value="Asia/Shanghai"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="java.specification.version" value="1.8"/>
<property name="file.encoding" value="UTF-8"/>
<property name="user.name" value="fukai"/>
<property name="java.class.path" value="/Users/fukai/eclipse/jee-neon/Eclipse.app/Contents/Eclipse/../../../../../.p2/pool/plugins/org.eclipse.m2e.maven.runtime_1.7.0.20160603-1931/jars/plexus-classworlds-2.5.2.jar"/>
<property name="java.vm.specification.version" value="1.8"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B -gs /Users/fukai/apache-maven-3.3.9/conf/settings.xml -s /Users/fukai/apache-maven-3.3.9/conf/settings.xml install"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="user.language" value="zh"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.8.0_121"/>
<property name="java.ext.dirs" value="/Users/fukai/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java"/>
<property name="sun.boot.class.path" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/classes"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="maven.home" value="/Users/fukai/Documents/workspace/swifteditor/EMBEDDED"/>
<property name="file.separator" value="/"/>
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="sun.cpu.isalist" value=""/>
</properties>
<testcase classname="com.brilliace.swifteditor.AppTest" name="testApp" time="0.002"/>
</testsuite>
\ No newline at end of file
-------------------------------------------------------------------------------
Test set: com.brilliace.swifteditor.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
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