Commit 18640476 authored by Claus Nagel's avatar Claus Nagel
Browse files

adapted to citygml4j 2.1

parent cc1a5c68
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/activation.jar"/>
<classpathentry kind="lib" path="lib/jaxb-api.jar"/>
<classpathentry kind="lib" path="lib/jaxb-impl.jar"/>
<classpathentry kind="lib" path="lib/jaxb-xjc.jar"/>
<classpathentry kind="lib" path="lib/jsr173_1.0_api.jar"/>
<classpathentry kind="lib" path="lib/args4j-2.0.9.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="lib" path="lib/args4j-2.0.11.jar"/>
<classpathentry kind="lib" path="lib/jaxb-core.jar"/>
<classpathentry kind="lib" path="lib/jaxb-impl.jar"/>
<classpathentry kind="lib" path="lib/jaxb-xjc.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -3,7 +3,7 @@
<!-- application specific variables -->
<property name="app.name" value="ade-xjc" />
<property name="app.version" value="2.0" />
<property name="app.version" value="2.1" />
<property name="app.jar" value="${app.name}.jar" />
<property name="app.title" value="JAXB xjc wrapper for citygml4j version ${app.version}" />
<property name="app.vendor" value="IGG, Technical University Berlin, Germany, http://www.igg.tu-berlin.de" />
......@@ -102,12 +102,10 @@
<attribute name="Class-Path" value="." />
<attribute name="Main-Class" value="${app.class}" />
</manifest>
<zipfileset excludes="META-INF/*.SF" src="${lib}/activation.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib}/jaxb-api.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib}/jsr173_1.0_api.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib}/jaxb-core.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib}/jaxb-impl.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib}/jaxb-xjc.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib}/args4j-2.0.9.jar" />
<zipfileset excludes="META-INF/*.SF" src="${lib}/args4j-2.0.11.jar" />
<fileset dir="${dist}" includes="README" />
<fileset dir="${dist.license}" includes="**/*" />
</jar>
......
......@@ -29,7 +29,7 @@ the files COPYING and COPYING.LESSER or visit http://www.gnu.org/licenses/.
2. Copyright
------------
(c) 2007 - 2012
(c) 2007 - 2013
Institute for Geodesy and Geoinformation Science (IGG)
Technische Universitaet Berlin, Germany
http://www.igg.tu-berlin.de/
......@@ -50,7 +50,7 @@ your application.
4. System requirements
----------------------
* Java JRE or JDK >= 1.5
* Java JRE or JDK >= 1.7
* citygml4j library version !app.version!
......@@ -74,23 +74,23 @@ subfolder "sample".
6. Developers
-------------
Claus Nagel <claus.nagel@tu-berlin.de>
Claus Nagel <cnagel@virtualcitysystems.de>
7. Contact
----------
claus.nagel@tu-berlin.de
cnagel@virtualcitysystems.de
8. Websites
-----------
Official !app.name! website:
http://www.igg.tu-berlin.de/software
http://www.citygml4j.org/
Related websites:
http://www.igg.tu-berlin.de/
https://github.com/citygml4j/
http://www.citygml.org/
http://www.citygmlwiki.org/
http://www.opengeospatial.org/standards/citygml
\ No newline at end of file
......@@ -18,7 +18,7 @@
<jaxb:bindings schemaLocation="1.0.0/cityGMLBase.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.core._1"/>
<jaxb:package name="net.opengis.citygml._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -26,7 +26,7 @@
<jaxb:bindings schemaLocation="1.0.0/appearance.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.app._1"/>
<jaxb:package name="net.opengis.citygml.appearance._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -34,7 +34,7 @@
<jaxb:bindings schemaLocation="1.0.0/building.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.bldg._1"/>
<jaxb:package name="net.opengis.citygml.building._1"/>
</jaxb:schemaBindings>
<!-- GML features do have a property called 'boundedBy'. The schema mapping mixes up
......@@ -60,7 +60,7 @@
<jaxb:bindings schemaLocation="1.0.0/cityFurniture.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.frn._1"/>
<jaxb:package name="net.opengis.citygml.cityfurniture._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -68,7 +68,7 @@
<jaxb:bindings schemaLocation="1.0.0/cityObjectGroup.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.grp._1"/>
<jaxb:package name="net.opengis.citygml.cityobjectgroup._1"/>
</jaxb:schemaBindings>
<!-- correct error for 'role' attribute of CityObjectGroupMemberType. The error occurs because
......@@ -84,7 +84,7 @@
<jaxb:bindings schemaLocation="1.0.0/generics.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.gen._1"/>
<jaxb:package name="net.opengis.citygml.generics._1"/>
</jaxb:schemaBindings>
<!-- changing data type of DoubleAttributeType -->
......@@ -99,7 +99,7 @@
<jaxb:bindings schemaLocation="1.0.0/landUse.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.luse._1"/>
<jaxb:package name="net.opengis.citygml.landuse._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -107,7 +107,7 @@
<jaxb:bindings schemaLocation="1.0.0/relief.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.dem._1"/>
<jaxb:package name="net.opengis.citygml.relief._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -115,7 +115,7 @@
<jaxb:bindings schemaLocation="1.0.0/texturedSurface.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.tex._1"/>
<jaxb:package name="net.opengis.citygml.texturedsurface._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -123,7 +123,7 @@
<jaxb:bindings schemaLocation="1.0.0/transportation.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.tran._1"/>
<jaxb:package name="net.opengis.citygml.transportation._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -131,7 +131,7 @@
<jaxb:bindings schemaLocation="1.0.0/vegetation.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.veg._1"/>
<jaxb:package name="net.opengis.citygml.vegetation._1"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -139,7 +139,7 @@
<jaxb:bindings schemaLocation="1.0.0/waterBody.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.wtr._1"/>
<jaxb:package name="net.opengis.citygml.waterbody._1"/>
</jaxb:schemaBindings>
<!-- GML features do have a property called 'boundedBy'. The schema mapping mixes up
......@@ -155,12 +155,12 @@
<!-- ============= -->
<!-- CityGML 2.0.0 -->
<!-- ============= -->
<!-- Specific settings for the CityGML Core module schema file -->
<jaxb:bindings schemaLocation="2.0.0/cityGMLBase.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.core._2"/>
<jaxb:package name="net.opengis.citygml._2"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -168,7 +168,7 @@
<jaxb:bindings schemaLocation="2.0.0/appearance.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.app._2"/>
<jaxb:package name="net.opengis.citygml.appearance._2"/>
</jaxb:schemaBindings>
<!-- The global elements 'Appearance' and 'appearance' cannot be automatically
......@@ -182,7 +182,7 @@
<jaxb:bindings schemaLocation="2.0.0/bridge.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.brid._2"/>
<jaxb:package name="net.opengis.citygml.bridge._2"/>
</jaxb:schemaBindings>
<!-- GML features do have a property called 'boundedBy'. The schema mapping mixes up
......@@ -235,7 +235,7 @@
<jaxb:bindings schemaLocation="2.0.0/building.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.bldg._2"/>
<jaxb:package name="net.opengis.citygml.building._2"/>
</jaxb:schemaBindings>
<!-- GML features do have a property called 'boundedBy'. The schema mapping mixes up
......@@ -279,7 +279,7 @@
<jaxb:bindings schemaLocation="2.0.0/cityFurniture.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.frn._2"/>
<jaxb:package name="net.opengis.citygml.cityfurniture._2"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -287,7 +287,7 @@
<jaxb:bindings schemaLocation="2.0.0/cityObjectGroup.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.grp._2"/>
<jaxb:package name="net.opengis.citygml.cityobjectgroup._2"/>
</jaxb:schemaBindings>
<!-- correct error for 'role' attribute of CityObjectGroupMemberType. The error occurs because
......@@ -303,7 +303,7 @@
<jaxb:bindings schemaLocation="2.0.0/generics.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.gen._2"/>
<jaxb:package name="net.opengis.citygml.generics._2"/>
</jaxb:schemaBindings>
<!-- changing data type of DoubleAttributeType -->
......@@ -318,7 +318,7 @@
<jaxb:bindings schemaLocation="2.0.0/landUse.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.luse._2"/>
<jaxb:package name="net.opengis.citygml.landuse._2"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -326,7 +326,7 @@
<jaxb:bindings schemaLocation="2.0.0/relief.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.dem._2"/>
<jaxb:package name="net.opengis.citygml.relief._2"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -334,7 +334,7 @@
<jaxb:bindings schemaLocation="2.0.0/texturedSurface.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.tex._2"/>
<jaxb:package name="net.opengis.citygml.texturedsurface._2"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -342,7 +342,7 @@
<jaxb:bindings schemaLocation="2.0.0/transportation.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.tran._2"/>
<jaxb:package name="net.opengis.citygml.transportation._2"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -350,7 +350,7 @@
<jaxb:bindings schemaLocation="2.0.0/tunnel.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.tun._2"/>
<jaxb:package name="net.opengis.citygml.tunnel._2"/>
</jaxb:schemaBindings>
<!-- GML features do have a property called 'boundedBy'. The schema mapping mixes up
......@@ -394,7 +394,7 @@
<jaxb:bindings schemaLocation="2.0.0/vegetation.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.veg._2"/>
<jaxb:package name="net.opengis.citygml.vegetation._2"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -402,7 +402,7 @@
<jaxb:bindings schemaLocation="2.0.0/waterBody.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.citygml.wtr._2"/>
<jaxb:package name="net.opengis.citygml.waterbody._2"/>
</jaxb:schemaBindings>
<!-- GML features do have a property called 'boundedBy'. The schema mapping mixes up
......@@ -423,7 +423,7 @@
<jaxb:bindings schemaLocation="../GML/3.1.1/base/gml.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.gml._3_1_1"/>
<jaxb:package name="net.opengis.gml"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -456,7 +456,7 @@
<jaxb:bindings schemaLocation="../GML/3.1.1/xlink/xlink.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.xlink"/>
<jaxb:package name="org.w3._1999.xlink"/>
</jaxb:schemaBindings>
<jaxb:bindings schemaLocation="../GML/3.1.1/xlink/xlink.xsd" node="/xs:schema">
<!-- 'title' property is referenced both as attribute and as element. -->
......@@ -481,7 +481,7 @@
<jaxb:bindings schemaLocation="../xAl/2.0/xAl.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.xal"/>
<jaxb:package name="oasis.names.tc.ciq.xsdschema.xal._2"/>
<!-- append "Element" to element declarations -->
<jaxb:nameXmlTransform>
<jaxb:elementName suffix="Element"/>
......@@ -497,7 +497,7 @@
<jaxb:bindings schemaLocation="../GML/3.1.1/smil/smil20.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.smil20"/>
<jaxb:package name="org.w3._2001.smil20"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......@@ -505,7 +505,7 @@
<jaxb:bindings schemaLocation="../GML/3.1.1/smil/smil20-language.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<!-- set package name of the generated classes -->
<jaxb:package name="org.citygml4j.jaxb.smil20.language"/>
<jaxb:package name="org.w3._2001.smil20.language"/>
</jaxb:schemaBindings>
</jaxb:bindings>
......
......@@ -115,7 +115,7 @@ public class ADE_XJC {
if (clean) {
log(LogLevel.INFO, "Cleaning output folder");
Util.rmdir(outputFolder);
Util.rmdir(outputFolder, true);
}
createBuildEnvironment();
......@@ -160,7 +160,7 @@ public class ADE_XJC {
status = 1;
if (clean)
Util.rmdir(outputFolder);
Util.rmdir(outputFolder, true);
} finally {
cleanBuildEnvironment();
}
......@@ -193,8 +193,8 @@ public class ADE_XJC {
BigInteger md5 = new BigInteger("0");
md5 = Util.dir2md5(schema_dir, md5);
if (!md5.toString(16).equals("2accaacf93c976282d31265d1d8e3c2b"))
if (!md5.toString(16).equals("2063ae80bf0191bf63593d5bb5d9cb5a"))
throw new Exception("Contents of subfolder 'schemas' have been altered. Please restore its original state.");
}
......@@ -206,10 +206,13 @@ public class ADE_XJC {
}
private void cleanBuildEnvironment() {
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/org/citygml4j"));
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/net/opengis/citygml"), true);
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/net/opengis/gml"), true);
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/net"), false);
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/oasis"), true);
if (!packageName.startsWith("org"))
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/org"));
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/org"), true);
}
private void printUsage(CmdLineParser parser, PrintStream out) {
......
......@@ -11,29 +11,29 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class Util {
public static BigInteger dir2md5(File file, BigInteger md5) throws NoSuchAlgorithmException, FileNotFoundException {
md5 = string2md5(file.getName(), md5);
if (file.isDirectory()) {
File[] children = file.listFiles(new FileFilter() {
public boolean accept(File pathname) {
if (pathname.isDirectory())
return true;
if (pathname.getName().endsWith("xsd") || pathname.getName().endsWith("xjb"))
return true;
return false;
}
});
for (File next : children)
md5 = dir2md5(next, md5);
} else
md5 = file2md5(file.getAbsolutePath(), md5);
return md5;
}
......@@ -48,7 +48,7 @@ public class Util {
digest.update(buffer, 0, read);
byte[] md5sum = digest.digest();
return md5.xor(new BigInteger(1, md5sum));
} catch(IOException e) {
throw new RuntimeException("Unable to process file for MD5", e);
......@@ -65,23 +65,24 @@ public class Util {
private static BigInteger string2md5(String input, BigInteger md5) throws NoSuchAlgorithmException {
MessageDigest digest = MessageDigest.getInstance("MD5");
byte[] md5sum = digest.digest(input.getBytes());
return md5.xor(new BigInteger(1, md5sum));
}
public static void rmdir(File folder) {
public static void rmdir(File folder, boolean force) {
if (!folder.exists())
return;
File[] children = folder.listFiles();
for (File file : children) {
if (file.isDirectory())
rmdir(file);
file.delete();
rmdir(file, force);
if (force)
file.delete();
}
folder.delete();
}
}
Supports Markdown
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