aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TopflytechProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-24 22:57:38 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-24 22:57:38 +1300
commit5538a83ac7eda6ad5775e582688dd0199e6c538c (patch)
tree7b261a5e9767fd807124c868d2c4a5d72315e7df /src/org/traccar/protocol/TopflytechProtocolDecoder.java
parentbe1baf2b062587099171b485ac1e3f591034816f (diff)
downloadtrackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.tar.gz
trackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.tar.bz2
trackermap-server-5538a83ac7eda6ad5775e582688dd0199e6c538c.zip
Refactor pattern builder class
Diffstat (limited to 'src/org/traccar/protocol/TopflytechProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TopflytechProtocolDecoder.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/TopflytechProtocolDecoder.java b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
index 5fa4b3456..768de3463 100644
--- a/src/org/traccar/protocol/TopflytechProtocolDecoder.java
+++ b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
@@ -33,16 +33,16 @@ public class TopflytechProtocolDecoder extends BaseProtocolDecoder {
}
private static final Pattern PATTERN = new PatternBuilder()
- .txt("(")
- .num("(d+)") // imei
+ .text("(")
+ .number("(d+)") // imei
.any()
- .num("(dd)(dd)(dd)") // date (yymmdd)
- .num("(dd)(dd)(dd)") // time
- .xpr("([AV])")
- .num("(dd)(dd.dddd)([NS])") // latitude
- .num("(ddd)(dd.dddd)([EW])") // longitude
- .num("(ddd.d)") // speed
- .num("(d+.d+)") // course
+ .number("(dd)(dd)(dd)") // date (yymmdd)
+ .number("(dd)(dd)(dd)") // time
+ .expression("([AV])")
+ .number("(dd)(dd.dddd)([NS])") // latitude
+ .number("(ddd)(dd.dddd)([EW])") // longitude
+ .number("(ddd.d)") // speed
+ .number("(d+.d+)") // course
.compile();
@Override