Browse Source

Extractor project

Imports training data. Closes #41
tags/SensorLogger/0.2.0
Chris Smith 14 years ago
parent
commit
0d97dff2c1

+ 3
- 0
.gitmodules View File

@@ -1,3 +1,6 @@
1 1
 [submodule "website/openid"]
2 2
 	path = website/openid
3 3
 	url = git://chris.smith.name/~chris/poidsy
4
+[submodule "code/Extractor/modules/util"]
5
+	path = code/Extractor/modules/util
6
+	url = git://dmdirc.com/~dmdirc/util

+ 74
- 0
code/Extractor/build.xml View File

@@ -0,0 +1,74 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!-- You may freely edit this file. See commented blocks below for -->
3
+<!-- some examples of how to customize the build. -->
4
+<!-- (If you delete it and reopen the project it will be recreated.) -->
5
+<!-- By default, only the Clean and Build commands use this build script. -->
6
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
7
+<!-- the Compile on Save feature is turned off for the project. -->
8
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
9
+<!-- in the project's Project Properties dialog box.-->
10
+<project name="Extractor" default="default" basedir=".">
11
+    <description>Builds, tests, and runs the project Extractor.</description>
12
+    <import file="nbproject/build-impl.xml"/>
13
+    <!--
14
+
15
+    There exist several targets which are by default empty and which can be 
16
+    used for execution of your tasks. These targets are usually executed 
17
+    before and after some main targets. They are: 
18
+
19
+      -pre-init:                 called before initialization of project properties
20
+      -post-init:                called after initialization of project properties
21
+      -pre-compile:              called before javac compilation
22
+      -post-compile:             called after javac compilation
23
+      -pre-compile-single:       called before javac compilation of single file
24
+      -post-compile-single:      called after javac compilation of single file
25
+      -pre-compile-test:         called before javac compilation of JUnit tests
26
+      -post-compile-test:        called after javac compilation of JUnit tests
27
+      -pre-compile-test-single:  called before javac compilation of single JUnit test
28
+      -post-compile-test-single: called after javac compilation of single JUunit test
29
+      -pre-jar:                  called before JAR building
30
+      -post-jar:                 called after JAR building
31
+      -post-clean:               called after cleaning build products
32
+
33
+    (Targets beginning with '-' are not intended to be called on their own.)
34
+
35
+    Example of inserting an obfuscator after compilation could look like this:
36
+
37
+        <target name="-post-compile">
38
+            <obfuscate>
39
+                <fileset dir="${build.classes.dir}"/>
40
+            </obfuscate>
41
+        </target>
42
+
43
+    For list of available properties check the imported 
44
+    nbproject/build-impl.xml file. 
45
+
46
+
47
+    Another way to customize the build is by overriding existing main targets.
48
+    The targets of interest are: 
49
+
50
+      -init-macrodef-javac:     defines macro for javac compilation
51
+      -init-macrodef-junit:     defines macro for junit execution
52
+      -init-macrodef-debug:     defines macro for class debugging
53
+      -init-macrodef-java:      defines macro for class execution
54
+      -do-jar-with-manifest:    JAR building (if you are using a manifest)
55
+      -do-jar-without-manifest: JAR building (if you are not using a manifest)
56
+      run:                      execution of project 
57
+      -javadoc-build:           Javadoc generation
58
+      test-report:              JUnit report generation
59
+
60
+    An example of overriding the target for project execution could look like this:
61
+
62
+        <target name="run" depends="Extractor-impl.jar">
63
+            <exec dir="bin" executable="launcher.exe">
64
+                <arg file="${dist.jar}"/>
65
+            </exec>
66
+        </target>
67
+
68
+    Notice that the overridden target depends on the jar target and not only on 
69
+    the compile target as the regular run target does. Again, for a list of available 
70
+    properties which you can use, check the target you are overriding in the
71
+    nbproject/build-impl.xml file. 
72
+
73
+    -->
74
+</project>

BIN
code/Extractor/dist/Extractor.jar View File


+ 33
- 0
code/Extractor/dist/README.TXT View File

@@ -0,0 +1,33 @@
1
+========================
2
+BUILD OUTPUT DESCRIPTION
3
+========================
4
+
5
+When you build an Java application project that has a main class, the IDE
6
+automatically copies all of the JAR
7
+files on the projects classpath to your projects dist/lib folder. The IDE
8
+also adds each of the JAR files to the Class-Path element in the application
9
+JAR files manifest file (MANIFEST.MF).
10
+
11
+To run the project from the command line, go to the dist folder and
12
+type the following:
13
+
14
+java -jar "Extractor.jar" 
15
+
16
+To distribute this project, zip up the dist folder (including the lib folder)
17
+and distribute the ZIP file.
18
+
19
+Notes:
20
+
21
+* If two JAR files on the project classpath have the same name, only the first
22
+JAR file is copied to the lib folder.
23
+* Only JAR files are copied to the lib folder.
24
+If the classpath contains other types of files or folders, none of the
25
+classpath elements are copied to the lib folder. In such a case,
26
+you need to copy the classpath elements to the lib folder manually after the build.
27
+* If a library on the projects classpath also has a Class-Path element
28
+specified in the manifest,the content of the Class-Path element has to be on
29
+the projects runtime path.
30
+* To set a main class in a standard Java project, right-click the project node
31
+in the Projects window and choose Properties. Then click Run and enter the
32
+class name in the Main Class field. Alternatively, you can manually type the
33
+class name in the manifest Main-Class element.

+ 59469
- 0
code/Extractor/dist/data.txt
File diff suppressed because it is too large
View File


+ 1
- 0
code/Extractor/modules/util

@@ -0,0 +1 @@
1
+Subproject commit a15db1ca96c9cea7bd0749ba3e020b86abac1427

+ 818
- 0
code/Extractor/nbproject/build-impl.xml View File

@@ -0,0 +1,818 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!--
3
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
4
+***         EDIT ../build.xml INSTEAD         ***
5
+
6
+For the purpose of easier reading the script
7
+is divided into following sections:
8
+
9
+  - initialization
10
+  - compilation
11
+  - jar
12
+  - execution
13
+  - debugging
14
+  - javadoc
15
+  - junit compilation
16
+  - junit execution
17
+  - junit debugging
18
+  - applet
19
+  - cleanup
20
+
21
+        -->
22
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Extractor-impl">
23
+    <fail message="Please build using Ant 1.7.1 or higher.">
24
+        <condition>
25
+            <not>
26
+                <antversion atleast="1.7.1"/>
27
+            </not>
28
+        </condition>
29
+    </fail>
30
+    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
31
+    <!-- 
32
+                ======================
33
+                INITIALIZATION SECTION 
34
+                ======================
35
+            -->
36
+    <target name="-pre-init">
37
+        <!-- Empty placeholder for easier customization. -->
38
+        <!-- You can override this target in the ../build.xml file. -->
39
+    </target>
40
+    <target depends="-pre-init" name="-init-private">
41
+        <property file="nbproject/private/config.properties"/>
42
+        <property file="nbproject/private/configs/${config}.properties"/>
43
+        <property file="nbproject/private/private.properties"/>
44
+    </target>
45
+    <target depends="-pre-init,-init-private" name="-init-user">
46
+        <property file="${user.properties.file}"/>
47
+        <!-- The two properties below are usually overridden -->
48
+        <!-- by the active platform. Just a fallback. -->
49
+        <property name="default.javac.source" value="1.4"/>
50
+        <property name="default.javac.target" value="1.4"/>
51
+    </target>
52
+    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
53
+        <property file="nbproject/configs/${config}.properties"/>
54
+        <property file="nbproject/project.properties"/>
55
+    </target>
56
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
57
+        <available file="${manifest.file}" property="manifest.available"/>
58
+        <condition property="main.class.available">
59
+            <and>
60
+                <isset property="main.class"/>
61
+                <not>
62
+                    <equals arg1="${main.class}" arg2="" trim="true"/>
63
+                </not>
64
+            </and>
65
+        </condition>
66
+        <condition property="manifest.available+main.class">
67
+            <and>
68
+                <isset property="manifest.available"/>
69
+                <isset property="main.class.available"/>
70
+            </and>
71
+        </condition>
72
+        <condition property="do.mkdist">
73
+            <and>
74
+                <isset property="libs.CopyLibs.classpath"/>
75
+                <not>
76
+                    <istrue value="${mkdist.disabled}"/>
77
+                </not>
78
+            </and>
79
+        </condition>
80
+        <condition property="manifest.available+main.class+mkdist.available">
81
+            <and>
82
+                <istrue value="${manifest.available+main.class}"/>
83
+                <isset property="do.mkdist"/>
84
+            </and>
85
+        </condition>
86
+        <condition property="manifest.available+mkdist.available">
87
+            <and>
88
+                <istrue value="${manifest.available}"/>
89
+                <isset property="do.mkdist"/>
90
+            </and>
91
+        </condition>
92
+        <condition property="manifest.available-mkdist.available">
93
+            <or>
94
+                <istrue value="${manifest.available}"/>
95
+                <isset property="do.mkdist"/>
96
+            </or>
97
+        </condition>
98
+        <condition property="manifest.available+main.class-mkdist.available">
99
+            <or>
100
+                <istrue value="${manifest.available+main.class}"/>
101
+                <isset property="do.mkdist"/>
102
+            </or>
103
+        </condition>
104
+        <condition property="have.tests">
105
+            <or>
106
+                <available file="${test.src.dir}"/>
107
+                <available file="${test.test.dir}"/>
108
+            </or>
109
+        </condition>
110
+        <condition property="have.sources">
111
+            <or>
112
+                <available file="${src.dir}"/>
113
+                <available file="${src.src.dir}"/>
114
+            </or>
115
+        </condition>
116
+        <condition property="netbeans.home+have.tests">
117
+            <and>
118
+                <isset property="netbeans.home"/>
119
+                <isset property="have.tests"/>
120
+            </and>
121
+        </condition>
122
+        <condition property="no.javadoc.preview">
123
+            <and>
124
+                <isset property="javadoc.preview"/>
125
+                <isfalse value="${javadoc.preview}"/>
126
+            </and>
127
+        </condition>
128
+        <property name="run.jvmargs" value=""/>
129
+        <property name="javac.compilerargs" value=""/>
130
+        <property name="work.dir" value="${basedir}"/>
131
+        <condition property="no.deps">
132
+            <and>
133
+                <istrue value="${no.dependencies}"/>
134
+            </and>
135
+        </condition>
136
+        <property name="javac.debug" value="true"/>
137
+        <property name="javadoc.preview" value="true"/>
138
+        <property name="application.args" value=""/>
139
+        <property name="source.encoding" value="${file.encoding}"/>
140
+        <property name="runtime.encoding" value="${source.encoding}"/>
141
+        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
142
+            <and>
143
+                <isset property="javadoc.encoding"/>
144
+                <not>
145
+                    <equals arg1="${javadoc.encoding}" arg2=""/>
146
+                </not>
147
+            </and>
148
+        </condition>
149
+        <property name="javadoc.encoding.used" value="${source.encoding}"/>
150
+        <property name="includes" value="**"/>
151
+        <property name="excludes" value=""/>
152
+        <property name="do.depend" value="false"/>
153
+        <condition property="do.depend.true">
154
+            <istrue value="${do.depend}"/>
155
+        </condition>
156
+        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
157
+        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
158
+            <length length="0" string="${endorsed.classpath}" when="greater"/>
159
+        </condition>
160
+        <property name="javac.fork" value="false"/>
161
+    </target>
162
+    <target name="-post-init">
163
+        <!-- Empty placeholder for easier customization. -->
164
+        <!-- You can override this target in the ../build.xml file. -->
165
+    </target>
166
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
167
+        <fail unless="src.dir">Must set src.dir</fail>
168
+        <fail unless="src.src.dir">Must set src.src.dir</fail>
169
+        <fail unless="test.src.dir">Must set test.src.dir</fail>
170
+        <fail unless="test.test.dir">Must set test.test.dir</fail>
171
+        <fail unless="build.dir">Must set build.dir</fail>
172
+        <fail unless="dist.dir">Must set dist.dir</fail>
173
+        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
174
+        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
175
+        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
176
+        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
177
+        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
178
+        <fail unless="dist.jar">Must set dist.jar</fail>
179
+    </target>
180
+    <target name="-init-macrodef-property">
181
+        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
182
+            <attribute name="name"/>
183
+            <attribute name="value"/>
184
+            <sequential>
185
+                <property name="@{name}" value="${@{value}}"/>
186
+            </sequential>
187
+        </macrodef>
188
+    </target>
189
+    <target name="-init-macrodef-javac">
190
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
191
+            <attribute default="${src.dir}:${src.src.dir}" name="srcdir"/>
192
+            <attribute default="${build.classes.dir}" name="destdir"/>
193
+            <attribute default="${javac.classpath}" name="classpath"/>
194
+            <attribute default="${includes}" name="includes"/>
195
+            <attribute default="${excludes}" name="excludes"/>
196
+            <attribute default="${javac.debug}" name="debug"/>
197
+            <attribute default="${empty.dir}" name="sourcepath"/>
198
+            <attribute default="${empty.dir}" name="gensrcdir"/>
199
+            <element name="customize" optional="true"/>
200
+            <sequential>
201
+                <property location="${build.dir}/empty" name="empty.dir"/>
202
+                <mkdir dir="${empty.dir}"/>
203
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
204
+                    <src>
205
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
206
+                            <include name="*"/>
207
+                        </dirset>
208
+                    </src>
209
+                    <classpath>
210
+                        <path path="@{classpath}"/>
211
+                    </classpath>
212
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
213
+                    <compilerarg line="${javac.compilerargs}"/>
214
+                    <customize/>
215
+                </javac>
216
+            </sequential>
217
+        </macrodef>
218
+        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
219
+            <attribute default="${src.dir}:${src.src.dir}" name="srcdir"/>
220
+            <attribute default="${build.classes.dir}" name="destdir"/>
221
+            <attribute default="${javac.classpath}" name="classpath"/>
222
+            <sequential>
223
+                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
224
+                    <classpath>
225
+                        <path path="@{classpath}"/>
226
+                    </classpath>
227
+                </depend>
228
+            </sequential>
229
+        </macrodef>
230
+        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
231
+            <attribute default="${build.classes.dir}" name="destdir"/>
232
+            <sequential>
233
+                <fail unless="javac.includes">Must set javac.includes</fail>
234
+                <pathconvert pathsep="," property="javac.includes.binary">
235
+                    <path>
236
+                        <filelist dir="@{destdir}" files="${javac.includes}"/>
237
+                    </path>
238
+                    <globmapper from="*.java" to="*.class"/>
239
+                </pathconvert>
240
+                <delete>
241
+                    <files includes="${javac.includes.binary}"/>
242
+                </delete>
243
+            </sequential>
244
+        </macrodef>
245
+    </target>
246
+    <target name="-init-macrodef-junit">
247
+        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
248
+            <attribute default="${includes}" name="includes"/>
249
+            <attribute default="${excludes}" name="excludes"/>
250
+            <attribute default="**" name="testincludes"/>
251
+            <sequential>
252
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
253
+                    <batchtest todir="${build.test.results.dir}">
254
+                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
255
+                            <filename name="@{testincludes}"/>
256
+                        </fileset>
257
+                        <fileset dir="${test.test.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
258
+                            <filename name="@{testincludes}"/>
259
+                        </fileset>
260
+                    </batchtest>
261
+                    <classpath>
262
+                        <path path="${run.test.classpath}"/>
263
+                    </classpath>
264
+                    <syspropertyset>
265
+                        <propertyref prefix="test-sys-prop."/>
266
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
267
+                    </syspropertyset>
268
+                    <formatter type="brief" usefile="false"/>
269
+                    <formatter type="xml"/>
270
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
271
+                    <jvmarg line="${run.jvmargs}"/>
272
+                </junit>
273
+            </sequential>
274
+        </macrodef>
275
+    </target>
276
+    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
277
+        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
278
+            <attribute default="${main.class}" name="name"/>
279
+            <attribute default="${debug.classpath}" name="classpath"/>
280
+            <attribute default="" name="stopclassname"/>
281
+            <sequential>
282
+                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
283
+                    <classpath>
284
+                        <path path="@{classpath}"/>
285
+                    </classpath>
286
+                </nbjpdastart>
287
+            </sequential>
288
+        </macrodef>
289
+        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
290
+            <attribute default="${build.classes.dir}" name="dir"/>
291
+            <sequential>
292
+                <nbjpdareload>
293
+                    <fileset dir="@{dir}" includes="${fix.classes}">
294
+                        <include name="${fix.includes}*.class"/>
295
+                    </fileset>
296
+                </nbjpdareload>
297
+            </sequential>
298
+        </macrodef>
299
+    </target>
300
+    <target name="-init-debug-args">
301
+        <property name="version-output" value="java version &quot;${ant.java.version}"/>
302
+        <condition property="have-jdk-older-than-1.4">
303
+            <or>
304
+                <contains string="${version-output}" substring="java version &quot;1.0"/>
305
+                <contains string="${version-output}" substring="java version &quot;1.1"/>
306
+                <contains string="${version-output}" substring="java version &quot;1.2"/>
307
+                <contains string="${version-output}" substring="java version &quot;1.3"/>
308
+            </or>
309
+        </condition>
310
+        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
311
+            <istrue value="${have-jdk-older-than-1.4}"/>
312
+        </condition>
313
+        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
314
+            <os family="windows"/>
315
+        </condition>
316
+        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
317
+            <isset property="debug.transport"/>
318
+        </condition>
319
+    </target>
320
+    <target depends="-init-debug-args" name="-init-macrodef-debug">
321
+        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
322
+            <attribute default="${main.class}" name="classname"/>
323
+            <attribute default="${debug.classpath}" name="classpath"/>
324
+            <element name="customize" optional="true"/>
325
+            <sequential>
326
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
327
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
328
+                    <jvmarg line="${debug-args-line}"/>
329
+                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
330
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
331
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
332
+                    <jvmarg line="${run.jvmargs}"/>
333
+                    <classpath>
334
+                        <path path="@{classpath}"/>
335
+                    </classpath>
336
+                    <syspropertyset>
337
+                        <propertyref prefix="run-sys-prop."/>
338
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
339
+                    </syspropertyset>
340
+                    <customize/>
341
+                </java>
342
+            </sequential>
343
+        </macrodef>
344
+    </target>
345
+    <target name="-init-macrodef-java">
346
+        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
347
+            <attribute default="${main.class}" name="classname"/>
348
+            <attribute default="${run.classpath}" name="classpath"/>
349
+            <element name="customize" optional="true"/>
350
+            <sequential>
351
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
352
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
353
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
354
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
355
+                    <jvmarg line="${run.jvmargs}"/>
356
+                    <classpath>
357
+                        <path path="@{classpath}"/>
358
+                    </classpath>
359
+                    <syspropertyset>
360
+                        <propertyref prefix="run-sys-prop."/>
361
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
362
+                    </syspropertyset>
363
+                    <customize/>
364
+                </java>
365
+            </sequential>
366
+        </macrodef>
367
+    </target>
368
+    <target name="-init-presetdef-jar">
369
+        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
370
+            <jar compress="${jar.compress}" jarfile="${dist.jar}">
371
+                <j2seproject1:fileset dir="${build.classes.dir}"/>
372
+            </jar>
373
+        </presetdef>
374
+    </target>
375
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
376
+    <!--
377
+                ===================
378
+                COMPILATION SECTION
379
+                ===================
380
+            -->
381
+    <target name="-deps-jar-init" unless="built-jar.properties">
382
+        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
383
+        <delete file="${built-jar.properties}" quiet="true"/>
384
+    </target>
385
+    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
386
+        <echo level="warn" message="Cycle detected: Extractor was already built"/>
387
+    </target>
388
+    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
389
+        <mkdir dir="${build.dir}"/>
390
+        <touch file="${built-jar.properties}" verbose="false"/>
391
+        <property file="${built-jar.properties}" prefix="already.built.jar."/>
392
+        <antcall target="-warn-already-built-jar"/>
393
+        <propertyfile file="${built-jar.properties}">
394
+            <entry key="${basedir}" value=""/>
395
+        </propertyfile>
396
+    </target>
397
+    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
398
+    <target depends="init" name="-check-automatic-build">
399
+        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
400
+    </target>
401
+    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
402
+        <antcall target="clean"/>
403
+    </target>
404
+    <target depends="init,deps-jar" name="-pre-pre-compile">
405
+        <mkdir dir="${build.classes.dir}"/>
406
+    </target>
407
+    <target name="-pre-compile">
408
+        <!-- Empty placeholder for easier customization. -->
409
+        <!-- You can override this target in the ../build.xml file. -->
410
+    </target>
411
+    <target if="do.depend.true" name="-compile-depend">
412
+        <pathconvert property="build.generated.subdirs">
413
+            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
414
+                <include name="*"/>
415
+            </dirset>
416
+        </pathconvert>
417
+        <j2seproject3:depend srcdir="${src.dir}:${src.src.dir}:${build.generated.subdirs}"/>
418
+    </target>
419
+    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
420
+        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
421
+        <copy todir="${build.classes.dir}">
422
+            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
423
+            <fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
424
+        </copy>
425
+    </target>
426
+    <target name="-post-compile">
427
+        <!-- Empty placeholder for easier customization. -->
428
+        <!-- You can override this target in the ../build.xml file. -->
429
+    </target>
430
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
431
+    <target name="-pre-compile-single">
432
+        <!-- Empty placeholder for easier customization. -->
433
+        <!-- You can override this target in the ../build.xml file. -->
434
+    </target>
435
+    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
436
+        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
437
+        <j2seproject3:force-recompile/>
438
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}:${src.src.dir}"/>
439
+    </target>
440
+    <target name="-post-compile-single">
441
+        <!-- Empty placeholder for easier customization. -->
442
+        <!-- You can override this target in the ../build.xml file. -->
443
+    </target>
444
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
445
+    <!--
446
+                ====================
447
+                JAR BUILDING SECTION
448
+                ====================
449
+            -->
450
+    <target depends="init" name="-pre-pre-jar">
451
+        <dirname file="${dist.jar}" property="dist.jar.dir"/>
452
+        <mkdir dir="${dist.jar.dir}"/>
453
+    </target>
454
+    <target name="-pre-jar">
455
+        <!-- Empty placeholder for easier customization. -->
456
+        <!-- You can override this target in the ../build.xml file. -->
457
+    </target>
458
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
459
+        <j2seproject1:jar/>
460
+    </target>
461
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
462
+        <j2seproject1:jar manifest="${manifest.file}"/>
463
+    </target>
464
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
465
+        <j2seproject1:jar manifest="${manifest.file}">
466
+            <j2seproject1:manifest>
467
+                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
468
+            </j2seproject1:manifest>
469
+        </j2seproject1:jar>
470
+        <echo>To run this application from the command line without Ant, try:</echo>
471
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
472
+        <property location="${dist.jar}" name="dist.jar.resolved"/>
473
+        <pathconvert property="run.classpath.with.dist.jar">
474
+            <path path="${run.classpath}"/>
475
+            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
476
+        </pathconvert>
477
+        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
478
+    </target>
479
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
480
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
481
+        <pathconvert property="run.classpath.without.build.classes.dir">
482
+            <path path="${run.classpath}"/>
483
+            <map from="${build.classes.dir.resolved}" to=""/>
484
+        </pathconvert>
485
+        <pathconvert pathsep=" " property="jar.classpath">
486
+            <path path="${run.classpath.without.build.classes.dir}"/>
487
+            <chainedmapper>
488
+                <flattenmapper/>
489
+                <globmapper from="*" to="lib/*"/>
490
+            </chainedmapper>
491
+        </pathconvert>
492
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
493
+        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
494
+            <fileset dir="${build.classes.dir}"/>
495
+            <manifest>
496
+                <attribute name="Main-Class" value="${main.class}"/>
497
+                <attribute name="Class-Path" value="${jar.classpath}"/>
498
+            </manifest>
499
+        </copylibs>
500
+        <echo>To run this application from the command line without Ant, try:</echo>
501
+        <property location="${dist.jar}" name="dist.jar.resolved"/>
502
+        <echo>java -jar "${dist.jar.resolved}"</echo>
503
+    </target>
504
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
505
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
506
+        <pathconvert property="run.classpath.without.build.classes.dir">
507
+            <path path="${run.classpath}"/>
508
+            <map from="${build.classes.dir.resolved}" to=""/>
509
+        </pathconvert>
510
+        <pathconvert pathsep=" " property="jar.classpath">
511
+            <path path="${run.classpath.without.build.classes.dir}"/>
512
+            <chainedmapper>
513
+                <flattenmapper/>
514
+                <globmapper from="*" to="lib/*"/>
515
+            </chainedmapper>
516
+        </pathconvert>
517
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
518
+        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
519
+            <fileset dir="${build.classes.dir}"/>
520
+            <manifest>
521
+                <attribute name="Class-Path" value="${jar.classpath}"/>
522
+            </manifest>
523
+        </copylibs>
524
+    </target>
525
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
526
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
527
+        <pathconvert property="run.classpath.without.build.classes.dir">
528
+            <path path="${run.classpath}"/>
529
+            <map from="${build.classes.dir.resolved}" to=""/>
530
+        </pathconvert>
531
+        <pathconvert pathsep=" " property="jar.classpath">
532
+            <path path="${run.classpath.without.build.classes.dir}"/>
533
+            <chainedmapper>
534
+                <flattenmapper/>
535
+                <globmapper from="*" to="lib/*"/>
536
+            </chainedmapper>
537
+        </pathconvert>
538
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
539
+        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
540
+            <fileset dir="${build.classes.dir}"/>
541
+            <manifest>
542
+                <attribute name="Class-Path" value="${jar.classpath}"/>
543
+            </manifest>
544
+        </copylibs>
545
+    </target>
546
+    <target name="-post-jar">
547
+        <!-- Empty placeholder for easier customization. -->
548
+        <!-- You can override this target in the ../build.xml file. -->
549
+    </target>
550
+    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
551
+    <!--
552
+                =================
553
+                EXECUTION SECTION
554
+                =================
555
+            -->
556
+    <target depends="init,compile" description="Run a main class." name="run">
557
+        <j2seproject1:java>
558
+            <customize>
559
+                <arg line="${application.args}"/>
560
+            </customize>
561
+        </j2seproject1:java>
562
+    </target>
563
+    <target name="-do-not-recompile">
564
+        <property name="javac.includes.binary" value=""/>
565
+    </target>
566
+    <target depends="init,compile-single" name="run-single">
567
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
568
+        <j2seproject1:java classname="${run.class}"/>
569
+    </target>
570
+    <target depends="init,compile-test-single" name="run-test-with-main">
571
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
572
+        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
573
+    </target>
574
+    <!--
575
+                =================
576
+                DEBUGGING SECTION
577
+                =================
578
+            -->
579
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
580
+        <j2seproject1:nbjpdastart name="${debug.class}"/>
581
+    </target>
582
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
583
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
584
+    </target>
585
+    <target depends="init,compile" name="-debug-start-debuggee">
586
+        <j2seproject3:debug>
587
+            <customize>
588
+                <arg line="${application.args}"/>
589
+            </customize>
590
+        </j2seproject3:debug>
591
+    </target>
592
+    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
593
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
594
+        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
595
+    </target>
596
+    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
597
+    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
598
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
599
+        <j2seproject3:debug classname="${debug.class}"/>
600
+    </target>
601
+    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
602
+    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
603
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
604
+        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
605
+    </target>
606
+    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
607
+    <target depends="init" name="-pre-debug-fix">
608
+        <fail unless="fix.includes">Must set fix.includes</fail>
609
+        <property name="javac.includes" value="${fix.includes}.java"/>
610
+    </target>
611
+    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
612
+        <j2seproject1:nbjpdareload/>
613
+    </target>
614
+    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
615
+    <!--
616
+                ===============
617
+                JAVADOC SECTION
618
+                ===============
619
+            -->
620
+    <target depends="init" name="-javadoc-build">
621
+        <mkdir dir="${dist.javadoc.dir}"/>
622
+        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
623
+            <classpath>
624
+                <path path="${javac.classpath}"/>
625
+            </classpath>
626
+            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
627
+                <filename name="**/*.java"/>
628
+            </fileset>
629
+            <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
630
+                <filename name="**/*.java"/>
631
+            </fileset>
632
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
633
+                <include name="**/*.java"/>
634
+            </fileset>
635
+        </javadoc>
636
+    </target>
637
+    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
638
+        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
639
+    </target>
640
+    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
641
+    <!--
642
+                =========================
643
+                JUNIT COMPILATION SECTION
644
+                =========================
645
+            -->
646
+    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
647
+        <mkdir dir="${build.test.classes.dir}"/>
648
+    </target>
649
+    <target name="-pre-compile-test">
650
+        <!-- Empty placeholder for easier customization. -->
651
+        <!-- You can override this target in the ../build.xml file. -->
652
+    </target>
653
+    <target if="do.depend.true" name="-compile-test-depend">
654
+        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}:${test.test.dir}"/>
655
+    </target>
656
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
657
+        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}:${test.test.dir}"/>
658
+        <copy todir="${build.test.classes.dir}">
659
+            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
660
+            <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
661
+        </copy>
662
+    </target>
663
+    <target name="-post-compile-test">
664
+        <!-- Empty placeholder for easier customization. -->
665
+        <!-- You can override this target in the ../build.xml file. -->
666
+    </target>
667
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
668
+    <target name="-pre-compile-test-single">
669
+        <!-- Empty placeholder for easier customization. -->
670
+        <!-- You can override this target in the ../build.xml file. -->
671
+    </target>
672
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
673
+        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
674
+        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
675
+        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}:${test.test.dir}" srcdir="${test.src.dir}:${test.test.dir}"/>
676
+        <copy todir="${build.test.classes.dir}">
677
+            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
678
+            <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
679
+        </copy>
680
+    </target>
681
+    <target name="-post-compile-test-single">
682
+        <!-- Empty placeholder for easier customization. -->
683
+        <!-- You can override this target in the ../build.xml file. -->
684
+    </target>
685
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
686
+    <!--
687
+                =======================
688
+                JUNIT EXECUTION SECTION
689
+                =======================
690
+            -->
691
+    <target depends="init" if="have.tests" name="-pre-test-run">
692
+        <mkdir dir="${build.test.results.dir}"/>
693
+    </target>
694
+    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
695
+        <j2seproject3:junit testincludes="**/*Test.java"/>
696
+    </target>
697
+    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
698
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
699
+    </target>
700
+    <target depends="init" if="have.tests" name="test-report"/>
701
+    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
702
+    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
703
+    <target depends="init" if="have.tests" name="-pre-test-run-single">
704
+        <mkdir dir="${build.test.results.dir}"/>
705
+    </target>
706
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
707
+        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
708
+        <j2seproject3:junit excludes="" includes="${test.includes}"/>
709
+    </target>
710
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
711
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
712
+    </target>
713
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
714
+    <!--
715
+                =======================
716
+                JUNIT DEBUGGING SECTION
717
+                =======================
718
+            -->
719
+    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
720
+        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
721
+        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
722
+        <delete file="${test.report.file}"/>
723
+        <mkdir dir="${build.test.results.dir}"/>
724
+        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
725
+            <customize>
726
+                <syspropertyset>
727
+                    <propertyref prefix="test-sys-prop."/>
728
+                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
729
+                </syspropertyset>
730
+                <arg value="${test.class}"/>
731
+                <arg value="showoutput=true"/>
732
+                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
733
+                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
734
+            </customize>
735
+        </j2seproject3:debug>
736
+    </target>
737
+    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
738
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
739
+    </target>
740
+    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
741
+    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
742
+        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
743
+    </target>
744
+    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
745
+    <!--
746
+                =========================
747
+                APPLET EXECUTION SECTION
748
+                =========================
749
+            -->
750
+    <target depends="init,compile-single" name="run-applet">
751
+        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
752
+        <j2seproject1:java classname="sun.applet.AppletViewer">
753
+            <customize>
754
+                <arg value="${applet.url}"/>
755
+            </customize>
756
+        </j2seproject1:java>
757
+    </target>
758
+    <!--
759
+                =========================
760
+                APPLET DEBUGGING  SECTION
761
+                =========================
762
+            -->
763
+    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
764
+        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
765
+        <j2seproject3:debug classname="sun.applet.AppletViewer">
766
+            <customize>
767
+                <arg value="${applet.url}"/>
768
+            </customize>
769
+        </j2seproject3:debug>
770
+    </target>
771
+    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
772
+    <!--
773
+                ===============
774
+                CLEANUP SECTION
775
+                ===============
776
+            -->
777
+    <target name="-deps-clean-init" unless="built-clean.properties">
778
+        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
779
+        <delete file="${built-clean.properties}" quiet="true"/>
780
+    </target>
781
+    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
782
+        <echo level="warn" message="Cycle detected: Extractor was already built"/>
783
+    </target>
784
+    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
785
+        <mkdir dir="${build.dir}"/>
786
+        <touch file="${built-clean.properties}" verbose="false"/>
787
+        <property file="${built-clean.properties}" prefix="already.built.clean."/>
788
+        <antcall target="-warn-already-built-clean"/>
789
+        <propertyfile file="${built-clean.properties}">
790
+            <entry key="${basedir}" value=""/>
791
+        </propertyfile>
792
+    </target>
793
+    <target depends="init" name="-do-clean">
794
+        <delete dir="${build.dir}"/>
795
+        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
796
+    </target>
797
+    <target name="-post-clean">
798
+        <!-- Empty placeholder for easier customization. -->
799
+        <!-- You can override this target in the ../build.xml file. -->
800
+    </target>
801
+    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
802
+    <target name="-check-call-dep">
803
+        <property file="${call.built.properties}" prefix="already.built."/>
804
+        <condition property="should.call.dep">
805
+            <not>
806
+                <isset property="already.built.${call.subproject}"/>
807
+            </not>
808
+        </condition>
809
+    </target>
810
+    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
811
+        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
812
+            <propertyset>
813
+                <propertyref prefix="transfer."/>
814
+                <mapper from="transfer.*" to="*" type="glob"/>
815
+            </propertyset>
816
+        </ant>
817
+    </target>
818
+</project>

+ 8
- 0
code/Extractor/nbproject/genfiles.properties View File

@@ -0,0 +1,8 @@
1
+build.xml.data.CRC32=e9217d11
2
+build.xml.script.CRC32=c61c515a
3
+build.xml.stylesheet.CRC32=958a1d3e@1.32.1.45
4
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6
+nbproject/build-impl.xml.data.CRC32=e9217d11
7
+nbproject/build-impl.xml.script.CRC32=f4d06c9e
8
+nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.32.1.45

+ 65
- 0
code/Extractor/nbproject/project.properties View File

@@ -0,0 +1,65 @@
1
+application.title=Extractor
2
+application.vendor=chris
3
+build.classes.dir=${build.dir}/classes
4
+build.classes.excludes=**/*.java,**/*.form
5
+# This directory is removed when the project is cleaned:
6
+build.dir=build
7
+build.generated.dir=${build.dir}/generated
8
+build.generated.sources.dir=${build.dir}/generated-sources
9
+# Only compile against the classpath explicitly listed here:
10
+build.sysclasspath=ignore
11
+build.test.classes.dir=${build.dir}/test/classes
12
+build.test.results.dir=${build.dir}/test/results
13
+# Uncomment to specify the preferred debugger connection transport:
14
+#debug.transport=dt_socket
15
+debug.classpath=\
16
+    ${run.classpath}
17
+debug.test.classpath=\
18
+    ${run.test.classpath}
19
+# This directory is removed when the project is cleaned:
20
+dist.dir=dist
21
+dist.jar=${dist.dir}/Extractor.jar
22
+dist.javadoc.dir=${dist.dir}/javadoc
23
+endorsed.classpath=
24
+excludes=
25
+includes=**
26
+jar.compress=false
27
+javac.classpath=
28
+# Space-separated list of extra javac options
29
+javac.compilerargs=
30
+javac.deprecation=false
31
+javac.source=1.5
32
+javac.target=1.5
33
+javac.test.classpath=\
34
+    ${javac.classpath}:\
35
+    ${build.classes.dir}:\
36
+    ${libs.junit.classpath}:\
37
+    ${libs.junit_4.classpath}
38
+javadoc.additionalparam=
39
+javadoc.author=false
40
+javadoc.encoding=${source.encoding}
41
+javadoc.noindex=false
42
+javadoc.nonavbar=false
43
+javadoc.notree=false
44
+javadoc.private=false
45
+javadoc.splitindex=true
46
+javadoc.use=true
47
+javadoc.version=false
48
+javadoc.windowtitle=
49
+meta.inf.dir=${src.dir}/META-INF
50
+platform.active=default_platform
51
+run.classpath=\
52
+    ${javac.classpath}:\
53
+    ${build.classes.dir}
54
+# Space-separated list of JVM arguments used when running the project
55
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
56
+# or test-sys-prop.name=value to set system properties for unit tests):
57
+run.jvmargs=
58
+run.test.classpath=\
59
+    ${javac.test.classpath}:\
60
+    ${build.test.classes.dir}
61
+source.encoding=UTF-8
62
+src.dir=src
63
+src.src.dir=modules/util/src
64
+test.src.dir=test
65
+test.test.dir=modules/util/test

+ 17
- 0
code/Extractor/nbproject/project.xml View File

@@ -0,0 +1,17 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://www.netbeans.org/ns/project/1">
3
+    <type>org.netbeans.modules.java.j2seproject</type>
4
+    <configuration>
5
+        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
6
+            <name>Extractor</name>
7
+            <source-roots>
8
+                <root id="src.dir"/>
9
+                <root id="src.src.dir" name="DMDirc util src"/>
10
+            </source-roots>
11
+            <test-roots>
12
+                <root id="test.src.dir"/>
13
+                <root id="test.test.dir" name="DMDirc util test"/>
14
+            </test-roots>
15
+        </data>
16
+    </configuration>
17
+</project>

+ 61
- 0
code/Extractor/src/uk/co/md87/dsp/extractor/io/TrainingDataImporter.java View File

@@ -0,0 +1,61 @@
1
+/*
2
+ * To change this template, choose Tools | Templates
3
+ * and open the template in the editor.
4
+ */
5
+
6
+package uk.co.md87.dsp.extractor.io;
7
+
8
+import com.dmdirc.util.MapList;
9
+import com.dmdirc.util.TextFile;
10
+import java.io.IOException;
11
+import java.util.ArrayList;
12
+import java.util.List;
13
+
14
+/**
15
+ *
16
+ * @author chris
17
+ */
18
+public class TrainingDataImporter {
19
+
20
+    private final TextFile textFile;
21
+
22
+    public TrainingDataImporter(final String file) {
23
+        textFile = new TextFile(file);
24
+    }
25
+
26
+    public MapList<String, List<Float[]>> getTrainingData() throws IOException {
27
+        final MapList<String, List<Float[]>> res = new MapList<String, List<Float[]>>();
28
+
29
+        String activity = null;
30
+        List<Float[]> data = null;
31
+
32
+        for (String line : textFile.getLines()) {
33
+            if (line.trim().isEmpty()) {
34
+                continue;
35
+            }
36
+            
37
+            if (line.startsWith("Activity: ")) {
38
+                if (activity != null) {
39
+                    res.add(activity, data);
40
+                }
41
+
42
+                activity = line.trim().substring(10);
43
+                data = new ArrayList<Float[]>(100);
44
+            } else {
45
+                final String[] parts = line.split(":")[1].split(",");
46
+                final Float[] values = new Float[parts.length];
47
+
48
+                for (int i = 0; i < parts.length; i++) {
49
+                    values[i] = Float.valueOf(parts[i]);
50
+                }
51
+
52
+                data.add(values);
53
+            }
54
+        }
55
+
56
+        res.add(activity, data);
57
+
58
+        return res;
59
+    }
60
+
61
+}

+ 22
- 0
code/Extractor/src/uk/co/md87/dsp/extractor/test/TrainingDataAnalyser.java View File

@@ -0,0 +1,22 @@
1
+/*
2
+ * To change this template, choose Tools | Templates
3
+ * and open the template in the editor.
4
+ */
5
+
6
+package uk.co.md87.dsp.extractor.test;
7
+
8
+import java.io.IOException;
9
+import uk.co.md87.dsp.extractor.io.TrainingDataImporter;
10
+
11
+/**
12
+ *
13
+ * @author chris
14
+ */
15
+public class TrainingDataAnalyser {
16
+
17
+    public static void main(final String ... args) throws IOException {
18
+        final TrainingDataImporter importer = new TrainingDataImporter(args[0]);
19
+        System.out.println(importer.getTrainingData().getMap());
20
+    }
21
+
22
+}

BIN
code/SensorLogger/dist/SensorLogger.apk View File


Loading…
Cancel
Save