agutierrez-ext 4 gadus atpakaļ
revīzija
08c5170b5a

+ 73 - 0
build.xml Parādīt failu

@@ -0,0 +1,73 @@
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="GenesisAPI" default="default" basedir=".">
11
+    <description>Builds, tests, and runs the project GenesisAPI.</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:                  JAR building
55
+      run:                      execution of project 
56
+      -javadoc-build:           Javadoc generation
57
+      test-report:              JUnit report generation
58
+
59
+    An example of overriding the target for project execution could look like this:
60
+
61
+        <target name="run" depends="GenesisAPI-impl.jar">
62
+            <exec dir="bin" executable="launcher.exe">
63
+                <arg file="${dist.jar}"/>
64
+            </exec>
65
+        </target>
66
+
67
+    Notice that the overridden target depends on the jar target and not only on 
68
+    the compile target as the regular run target does. Again, for a list of available 
69
+    properties which you can use, check the target you are overriding in the
70
+    nbproject/build-impl.xml file. 
71
+
72
+    -->
73
+</project>

+ 3 - 0
manifest.mf Parādīt failu

@@ -0,0 +1,3 @@
1
+Manifest-Version: 1.0
2
+X-COMMENT: Main-Class will be added automatically by build
3
+

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1771 - 0
nbproject/build-impl.xml


+ 8 - 0
nbproject/genfiles.properties Parādīt failu

@@ -0,0 +1,8 @@
1
+build.xml.data.CRC32=9f472633
2
+build.xml.script.CRC32=ff2bf120
3
+build.xml.stylesheet.CRC32=f85dc8f2@1.99.0.48
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=9f472633
7
+nbproject/build-impl.xml.script.CRC32=b100e3e1
8
+nbproject/build-impl.xml.stylesheet.CRC32=d549e5cc@1.99.0.48

+ 2 - 0
nbproject/private/private.properties Parādīt failu

@@ -0,0 +1,2 @@
1
+compile.on.save=true
2
+user.properties.file=C:\\Users\\aleja\\AppData\\Roaming\\NetBeans\\12.4\\build.properties

+ 95 - 0
nbproject/project.properties Parādīt failu

@@ -0,0 +1,95 @@
1
+annotation.processing.enabled=true
2
+annotation.processing.enabled.in.editor=false
3
+annotation.processing.processor.options=
4
+annotation.processing.processors.list=
5
+annotation.processing.run.all.processors=true
6
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
7
+build.classes.dir=${build.dir}/classes
8
+build.classes.excludes=**/*.java,**/*.form
9
+# This directory is removed when the project is cleaned:
10
+build.dir=build
11
+build.generated.dir=${build.dir}/generated
12
+build.generated.sources.dir=${build.dir}/generated-sources
13
+# Only compile against the classpath explicitly listed here:
14
+build.sysclasspath=ignore
15
+build.test.classes.dir=${build.dir}/test/classes
16
+build.test.results.dir=${build.dir}/test/results
17
+# Uncomment to specify the preferred debugger connection transport:
18
+#debug.transport=dt_socket
19
+debug.classpath=\
20
+    ${run.classpath}
21
+debug.modulepath=\
22
+    ${run.modulepath}
23
+debug.test.classpath=\
24
+    ${run.test.classpath}
25
+debug.test.modulepath=\
26
+    ${run.test.modulepath}
27
+# Files in build.classes.dir which should be excluded from distribution jar
28
+dist.archive.excludes=
29
+# This directory is removed when the project is cleaned:
30
+dist.dir=dist
31
+dist.jar=${dist.dir}/GenesisAPI.jar
32
+dist.javadoc.dir=${dist.dir}/javadoc
33
+dist.jlink.dir=${dist.dir}/jlink
34
+dist.jlink.output=${dist.jlink.dir}/GenesisAPI
35
+excludes=
36
+includes=**
37
+jar.compress=false
38
+javac.classpath=
39
+# Space-separated list of extra javac options
40
+javac.compilerargs=
41
+javac.deprecation=false
42
+javac.external.vm=true
43
+javac.modulepath=
44
+javac.processormodulepath=
45
+javac.processorpath=\
46
+    ${javac.classpath}
47
+javac.source=1.8
48
+javac.target=1.8
49
+javac.test.classpath=\
50
+    ${javac.classpath}:\
51
+    ${build.classes.dir}
52
+javac.test.modulepath=\
53
+    ${javac.modulepath}
54
+javac.test.processorpath=\
55
+    ${javac.test.classpath}
56
+javadoc.additionalparam=
57
+javadoc.author=false
58
+javadoc.encoding=${source.encoding}
59
+javadoc.html5=false
60
+javadoc.noindex=false
61
+javadoc.nonavbar=false
62
+javadoc.notree=false
63
+javadoc.private=false
64
+javadoc.splitindex=true
65
+javadoc.use=true
66
+javadoc.version=false
67
+javadoc.windowtitle=
68
+# The jlink additional root modules to resolve
69
+jlink.additionalmodules=
70
+# The jlink additional command line parameters
71
+jlink.additionalparam=
72
+jlink.launcher=true
73
+jlink.launcher.name=GenesisAPI
74
+main.class=com.vespot.Genesis
75
+manifest.file=manifest.mf
76
+meta.inf.dir=${src.dir}/META-INF
77
+mkdist.disabled=false
78
+platform.active=default_platform
79
+run.classpath=\
80
+    ${javac.classpath}:\
81
+    ${build.classes.dir}
82
+# Space-separated list of JVM arguments used when running the project.
83
+# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
84
+# To set system properties for unit tests define test-sys-prop.name=value:
85
+run.jvmargs=
86
+run.modulepath=\
87
+    ${javac.modulepath}
88
+run.test.classpath=\
89
+    ${javac.test.classpath}:\
90
+    ${build.test.classes.dir}
91
+run.test.modulepath=\
92
+    ${javac.test.modulepath}
93
+source.encoding=UTF-8
94
+src.dir=src
95
+test.src.dir=test

+ 15 - 0
nbproject/project.xml Parādīt failu

@@ -0,0 +1,15 @@
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>GenesisAPI</name>
7
+            <source-roots>
8
+                <root id="src.dir"/>
9
+            </source-roots>
10
+            <test-roots>
11
+                <root id="test.src.dir"/>
12
+            </test-roots>
13
+        </data>
14
+    </configuration>
15
+</project>

+ 21 - 0
src/com/vespot/Genesis.java Parādīt failu

@@ -0,0 +1,21 @@
1
+/*
2
+ * To change this license header, choose License Headers in Project Properties.
3
+ * To change this template file, choose Tools | Templates
4
+ * and open the template in the editor.
5
+ */
6
+package com.vespot;
7
+
8
+/**
9
+ *
10
+ * @author aleja
11
+ */
12
+public class Genesis {
13
+
14
+    /**
15
+     * @param args the command line arguments
16
+     */
17
+    public static void main(String[] args) {
18
+        // TODO code application logic here
19
+    }
20
+    
21
+}

+ 52 - 0
src/com/vespot/utils/Utils.java Parādīt failu

@@ -0,0 +1,52 @@
1
+/*
2
+ * To change this license header, choose License Headers in Project Properties.
3
+ * To change this template file, choose Tools | Templates
4
+ * and open the template in the editor.
5
+ */
6
+package com.vespot.utils;
7
+
8
+import java.io.ByteArrayInputStream;
9
+import java.io.InputStream;
10
+import java.io.StringWriter;
11
+import java.util.logging.Level;
12
+import java.util.logging.Logger;
13
+import javax.xml.bind.JAXBContext;
14
+import javax.xml.bind.JAXBException;
15
+import javax.xml.bind.Marshaller;
16
+import javax.xml.bind.Unmarshaller;
17
+
18
+/**
19
+ *
20
+ * @author aleja
21
+ */
22
+public class Utils {
23
+    
24
+    public String objectToXml(Object obj, Class c) {
25
+        try {
26
+            JAXBContext context = JAXBContext.newInstance(c);
27
+            Marshaller marshaller = context.createMarshaller();
28
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
29
+            StringWriter writer = new StringWriter();
30
+            marshaller.marshal(c.cast(obj), writer);
31
+            return writer.toString();
32
+        } catch (JAXBException ex) {
33
+            Logger.getLogger(Utils.class.getName()).log(Level.SEVERE, null, ex);
34
+        }
35
+        
36
+        return null;
37
+    }
38
+    
39
+    public Object xmlToObject(String content, Class c) {
40
+        try {
41
+            JAXBContext context = JAXBContext.newInstance(c);
42
+            Unmarshaller unmarsheller = context.createUnmarshaller();
43
+            InputStream stream = new ByteArrayInputStream(content.getBytes());
44
+            return c.cast(unmarsheller.unmarshal(stream));
45
+        } catch (JAXBException ex) {
46
+            Logger.getLogger(Utils.class.getName()).log(Level.SEVERE, null, ex);
47
+        }
48
+        
49
+        return null;
50
+    }
51
+    
52
+}