Permalink
Browse files

Merge branch 'fc-xmldiff' of ../fc-xmldiff

  • Loading branch information...
2 parents d5a2692 + 9b9f59b commit aaebd7050b72ed5a49b1dbdfa1eb5f37b1dfe937 Martin Kleppmann committed Feb 27, 2009
Showing with 10,491 additions and 0 deletions.
  1. +18 −0 java/xmldiff/MIT-LICENSE
  2. +75 −0 java/xmldiff/build.xml
  3. BIN java/xmldiff/buildres/fuego-common-buildfiles.zip
  4. +101 −0 java/xmldiff/contrib.xml
  5. +14 −0 java/xmldiff/contrib/external-build-jars
  6. +3 −0 java/xmldiff/contrib/external-se-jars
  7. +8 −0 java/xmldiff/depend.xml
  8. +10 −0 java/xmldiff/project-setup.xml
  9. +176 −0 java/xmldiff/src/fc/xml/diff/Diff.java
  10. +441 −0 java/xmldiff/src/fc/xml/diff/GlMatcher.java
  11. +21 −0 java/xmldiff/src/fc/xml/diff/HashAlgorithm.java
  12. +284 −0 java/xmldiff/src/fc/xml/diff/IoUtil.java
  13. +187 −0 java/xmldiff/src/fc/xml/diff/Patch.java
  14. +22 −0 java/xmldiff/src/fc/xml/diff/Preamble.java
  15. +96 −0 java/xmldiff/src/fc/xml/diff/Segment.java
  16. +229 −0 java/xmldiff/src/fc/xml/diff/benchmark/BenchMark.java
  17. +255 −0 java/xmldiff/src/fc/xml/diff/benchmark/SynteticDirTree.java
  18. +162 −0 java/xmldiff/src/fc/xml/diff/benchmark/UseCases.java
  19. +116 −0 java/xmldiff/src/fc/xml/diff/encode/AlignEncoder.java
  20. +21 −0 java/xmldiff/src/fc/xml/diff/encode/DefaultPosTranformer.java
  21. +29 −0 java/xmldiff/src/fc/xml/diff/encode/DiffEncoder.java
  22. +116 −0 java/xmldiff/src/fc/xml/diff/encode/ListOfMatchedEvents.java
  23. +31 −0 java/xmldiff/src/fc/xml/diff/encode/ListPosTransformer.java
  24. +18 −0 java/xmldiff/src/fc/xml/diff/encode/PosTransformer.java
  25. +76 −0 java/xmldiff/src/fc/xml/diff/encode/RefTreeByIdEncoder.java
  26. +366 −0 java/xmldiff/src/fc/xml/diff/encode/RefTreeEncoder.java
  27. +166 −0 java/xmldiff/src/fc/xml/diff/encode/XmlDiffEncoder.java
  28. +682 −0 java/xmldiff/src/fc/xml/diff/test/DirTreeGenerator.java
  29. +56 −0 java/xmldiff/src/fc/xml/diff/test/RootSuite.java
  30. +5 −0 java/xmldiff/test/5l.xml
  31. +4 −0 java/xmldiff/test/5r.xml
  32. +8 −0 java/xmldiff/test/charset/fi/1.xml
  33. +7 −0 java/xmldiff/test/charset/fi/2.xml
  34. +7 −0 java/xmldiff/test/charset/fi/b.xml
  35. +8 −0 java/xmldiff/test/charset/fi/m.xml
  36. +3 −0 java/xmldiff/test/faxma/greedy-fail/1.xml
  37. +3 −0 java/xmldiff/test/faxma/greedy-fail/2.xml
  38. +3 −0 java/xmldiff/test/faxma/greedy-fail/b.xml
  39. +3 −0 java/xmldiff/test/faxma/greedy-fail/m.xml
  40. +6 −0 java/xmldiff/test/ronnau-towards/README
  41. +33 −0 java/xmldiff/test/ronnau-towards/faxma.benchmark.UseCases
  42. BIN java/xmldiff/test/ronnau-towards/large-base.sxw
  43. BIN java/xmldiff/test/ronnau-towards/large-maxdelta.sxw
  44. BIN java/xmldiff/test/ronnau-towards/large-meddelta.sxw
  45. BIN java/xmldiff/test/ronnau-towards/large-mindelta.sxw
  46. BIN java/xmldiff/test/ronnau-towards/medium-base.sxw
  47. BIN java/xmldiff/test/ronnau-towards/medium-maxdelta.sxw
  48. BIN java/xmldiff/test/ronnau-towards/medium-meddelta.sxw
  49. BIN java/xmldiff/test/ronnau-towards/medium-mindelta.sxw
  50. BIN java/xmldiff/test/ronnau-towards/small-base.sxw
  51. BIN java/xmldiff/test/ronnau-towards/small-maxdelta.sxw
  52. BIN java/xmldiff/test/ronnau-towards/small-meddelta.sxw
  53. BIN java/xmldiff/test/ronnau-towards/small-mindelta.sxw
  54. +11 −0 java/xmldiff/test/simple/diff/text1/1.xml
  55. +1 −0 java/xmldiff/test/simple/diff/text1/README
  56. +9 −0 java/xmldiff/test/simple/diff/text1/b.xml
  57. +4 −0 java/xmldiff/test/simple/diff/text2/1.xml
  58. +2 −0 java/xmldiff/test/simple/diff/text2/README
  59. +4 −0 java/xmldiff/test/simple/diff/text2/b.xml
  60. +1 −0 java/xmldiff/test/state/a10.fail
  61. +1 −0 java/xmldiff/test/state/a14.fail
  62. +1 −0 java/xmldiff/test/state/a17.fail
  63. +1 −0 java/xmldiff/test/state/a5.fail
  64. +1 −0 java/xmldiff/test/state/a6.fail
  65. +1 −0 java/xmldiff/test/state/a8.fail
  66. +1 −0 java/xmldiff/test/state/d4.fail
  67. +1 −0 java/xmldiff/test/state/f2.fail
  68. +1 −0 java/xmldiff/test/state/infopage1.ok
  69. +1 −0 java/xmldiff/test/state/infopage2.ok
  70. +1 −0 java/xmldiff/test/state/pdaedit.fail
  71. +1 −0 java/xmldiff/test/state/shopping2.ok
  72. +1 −0 java/xmldiff/test/state/svgdoc.ok
  73. +11 −0 java/xmldiff/test/usecases/infopage1/1.xml
  74. +69 −0 java/xmldiff/test/usecases/infopage1/2.xml
  75. +11 −0 java/xmldiff/test/usecases/infopage1/b.xml
  76. +12 −0 java/xmldiff/test/usecases/infopage1/faxma.benchmark.UseCases
  77. +69 −0 java/xmldiff/test/usecases/infopage1/m.xml
  78. +72 −0 java/xmldiff/test/usecases/infopage1/m1.xml
  79. +74 −0 java/xmldiff/test/usecases/infopage2/1.xml
  80. +49 −0 java/xmldiff/test/usecases/infopage2/2.xml
  81. +70 −0 java/xmldiff/test/usecases/infopage2/b.xml
  82. +14 −0 java/xmldiff/test/usecases/infopage2/faxma.benchmark.UseCases
  83. +53 −0 java/xmldiff/test/usecases/infopage2/m.xml
  84. +56 −0 java/xmldiff/test/usecases/infopage2/m1.xml
  85. +53 −0 java/xmldiff/test/usecases/infopage2/m2.xml
  86. +203 −0 java/xmldiff/test/usecases/pdaedit/1.xml
  87. +353 −0 java/xmldiff/test/usecases/pdaedit/2.xml
  88. +207 −0 java/xmldiff/test/usecases/pdaedit/b.xml
  89. +13 −0 java/xmldiff/test/usecases/pdaedit/faxma.benchmark.UseCases
  90. +347 −0 java/xmldiff/test/usecases/pdaedit/m.xml
  91. +386 −0 java/xmldiff/test/usecases/review1/1.xml
  92. +390 −0 java/xmldiff/test/usecases/review1/2.xml
  93. +392 −0 java/xmldiff/test/usecases/review1/b.xml
  94. +26 −0 java/xmldiff/test/usecases/review1/faxma.benchmark.UseCases
  95. +409 −0 java/xmldiff/test/usecases/review1/m.xml
  96. +390 −0 java/xmldiff/test/usecases/review2/1.xml
  97. +409 −0 java/xmldiff/test/usecases/review2/2.xml
  98. +392 −0 java/xmldiff/test/usecases/review2/b.xml
  99. +24 −0 java/xmldiff/test/usecases/review2/faxma.benchmark.UseCases
  100. +382 −0 java/xmldiff/test/usecases/review2/m.xml
  101. +29 −0 java/xmldiff/test/usecases/shopping1/1.xml
  102. +29 −0 java/xmldiff/test/usecases/shopping1/2.xml
  103. +23 −0 java/xmldiff/test/usecases/shopping1/b.xml
  104. +23 −0 java/xmldiff/test/usecases/shopping1/faxma.benchmark.UseCases
  105. +37 −0 java/xmldiff/test/usecases/shopping1/m.xml
  106. +37 −0 java/xmldiff/test/usecases/shopping1/m1.xml
  107. +35 −0 java/xmldiff/test/usecases/shopping2/1.xml
  108. +37 −0 java/xmldiff/test/usecases/shopping2/2.xml
  109. +23 −0 java/xmldiff/test/usecases/shopping2/b.xml
  110. +24 −0 java/xmldiff/test/usecases/shopping2/faxma.benchmark.UseCases
  111. +48 −0 java/xmldiff/test/usecases/shopping2/m.xml
  112. +336 −0 java/xmldiff/test/usecases/svgdoc/1.xml
  113. +244 −0 java/xmldiff/test/usecases/svgdoc/2.xml
  114. +89 −0 java/xmldiff/test/usecases/svgdoc/b.xml
  115. +24 −0 java/xmldiff/test/usecases/svgdoc/faxma.benchmark.UseCases
  116. +499 −0 java/xmldiff/test/usecases/svgdoc/m.xml
  117. +5 −0 java/xmldiff/test/usecases/xml-shorttag-trickery/1.xml
  118. +4 −0 java/xmldiff/test/usecases/xml-shorttag-trickery/2.xml
  119. +10 −0 java/xmldiff/test/usecases/xml-shorttag-trickery/b.xml
  120. +5 −0 java/xmldiff/test/usecases/xml-shorttag-trickery/m.xml
  121. +81 −0 site-html/index.html
View
@@ -0,0 +1,18 @@
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--- This is a template build file for subprojects.
+ Customize as needed at locations marked @@.
+-->
+<!--
+Copyright %YEAR% Helsinki Institute for Information Technology
+
+This file is a part of Fuego middleware. Fuego middleware is free
+software; you can redistribute it and/or modify it under the terms
+of the MIT license, included as the file MIT-LICENSE in the Fuego
+middleware source distribution. If you did not receive the MIT
+license with the distribution, write to the Fuego Core project at
+%ADDRESS%.
+-->
+
+
+<project name="xmldiff" default="compile" basedir=".">
+
+ <property name="test.class" value="fc.xml.diff.test.RootSuite"/>
+ <property name="fc.main.class" value="fc.xml.diff.Diff"/>
+
+ <!-- Imports many common definitions and provides
+ default implementations for tasks -->
+ <import file="../subproject.xml" optional="true"/>
+ <fail unless="subproject.xml.included"
+ message="Project not set up; run ant -f project-setup.xml" />
+
+ <propertyset id="faxma-properties">
+ <propertyref name="encoder" />
+ <propertyref name="filter" />
+ <propertyref name="fc.log.level" />
+ </propertyset>
+
+ <target name="diff" depends="compile" >
+ <property name="usage"
+ value="Usage: ant diff -Dbase=1.xml -Dnew=2.xml [-Ddiff=d.xml]" />
+ <fail unless="base" message="${usage}" />
+ <fail unless="new" message="${usage}" />
+ <property name="diff" value="-"/>
+ <java classname="fc.xml.diff.Diff" fork="true">
+ <jvmarg line="-Dfc.log.level=WARN" />
+ <arg line="${base}" />
+ <arg line="${new}" />
+ <arg line="${diff}" />
+ <classpath>
+ <fileset dir="${build.lib}" includes="*.jar" />
+ <path refid="classpath.contrib.se" />
+ </classpath>
+ <syspropertyset refid="faxma-properties" />
+ </java>
+ </target>
+
+ <target name="patch" depends="compile" >
+ <property name="usage"
+ value="Usage: ant patch -Dbase=1.xml -Ddiff=diff.xml [-Dnew=2.xml]" />
+ <fail unless="base" message="${usage}" />
+ <fail unless="diff" message="${usage}" />
+ <property name="new" value="-"/>
+ <property name="fc.log.level" value="WARN"/>
+ <java classname="fc.xml.diff.Patch" fork="true">
+ <arg line="${base}" />
+ <arg line="${diff}" />
+ <arg line="${new}" />
+ <classpath>
+ <fileset dir="${build.lib}" includes="*.jar" />
+ <path refid="classpath.contrib.se" />
+ </classpath>
+ <syspropertyset refid="faxma-properties" />
+ </java>
+ </target>
+
+</project>
+<!-- arch-tag: 1e5eb183-4a5c-415f-b295-525f64775cd4
+-->
+
Binary file not shown.
View
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<!-- $Id: contrib.xml,v 1.3 2006/02/02 16:08:21 ctl Exp $ -->
+<!--
+
+Contrib builder
+===============
+
+The purpose of this build file is to fetch all required contrib stuff from
+a reliable source. The main mechanism is the <wget> macro which has the
+following attributes.
+
+id: Unqiue id of the task. You must assign a unique id to the task
+ that Ant can use for property names.
+
+target: name of target file that is fetched
+
+href1,href2: Links to the package holding the target file. href1 is first tried,
+then href2 if href1 fails. Note use of ${proto} prefix which allows us to
+swap all URIs to e.g. point to the local file system (fast testing).
+
+sha: sha1 hash that the target file must have after download. Used to
+verify that we got the right file. We also check the hash before downloading
+to see if perhaps the target is already up-to-date. Thus, if a hash is given,
+we only download a file if necessary.
+
+target.get: Name to store downloaded package in. Set to target is not
+explicitly given. Use with unpack
+
+unpack1,unpack2: Ant tasks to call to unpack the downloaded packages.
+unpack1 is for href1, unpack2 for href2.
+
+unpackdir: Passed as a propoert to unpacker; set to . if not given.
+Used here for unpacking to a named subdir of ${src}
+
+Source packages are handled by downloading the package to ${sarch},
+checking its hash, and then unpacking to ${src}
+
+-->
+
+<project name="3dm-contrib" default="get-contrib" basedir=".">
+
+ <property name="lib" value="../contrib/jar" />
+ <property name="llib" value="contrib" />
+
+ <!-- Default soureforge mirror -->
+ <property name="sf-mirror" value="switch" />
+ <property name="sourceforge"
+ value="${sf-mirror}.dl.sourceforge.net/sourceforge" />
+
+ <import file="../contrib-helper.xml" />
+
+ <target name="get-contrib" >
+ <mkdir dir="${lib}" />
+
+ <!-- Apache commons-logging.jar -->
+ <wget id="commons-logging"
+ href1="http://archive.apache.org/dist/commons/logging/binaries/commons-logging-1.1.1-bin.tar.gz"
+ target="${lib}/commons-logging-1.1.1.jar"
+ target.get="${temp.file}"
+ unpack1="unpack-tgz"
+ unpackloc1="commons-logging-1.1.1/commons-logging-1.1.1.jar"
+ sha="2d859791fbf7d880591864bd4004d8442a8a3b81" />
+
+ <!--- XMLPull API -->
+ <wget id="xmlpull-api"
+ href1="http://www.xmlpull.org/v1/download/xmlpull_1_1_3_4c.jar"
+ target="${lib}/xmlpull_1_1_3_4c.jar"
+ sha = "25df3046aed28cb0e774e5cf7d8437bc1bee00f3" />
+
+ <!-- junit -->
+ <wget id="junit"
+ href1="http://${sourceforge}/sourceforge/junit/junit3.8.1.zip"
+ target="${lib}/junit-3.8.1.jar"
+ target.get="${temp.file}"
+ unpack1="unpack-zip"
+ unpackloc1="junit3.8.1/junit.jar"
+ sha="99129f16442844f6a4a11ae22fbbee40b14d774f" />
+
+ <!-- FC Util -->
+ <wget id="fc-util"
+ href1="http://hoslab.cs.helsinki.fi/downloads/fc-util/fc-util-0.1.0.jar"
+ target="${llib}/fc-util-0.1.0.jar"
+ sha = "6c8b6e8c3801c0cc672c421a994f5ddb04be46f5" />
+
+ <!-- FC XAS -->
+ <wget id="fc-xas"
+ href1="http://hoslab.cs.helsinki.fi/downloads/fc-xas/fc-xas-0.1.0.jar"
+ target="${llib}/fc-xas-0.1.0.jar"
+ sha = "4288fc78591e0fe8e240701607b4fd6fb7cbdef6" />
+
+
+ <!-- FC RAXS -->
+ <wget id="fc-raxs"
+ href1="http://hoslab.cs.helsinki.fi/downloads/fc-raxs/fc-raxs-0.1.0.jar"
+ target="${llib}/fc-raxs-0.1.0.jar"
+ sha = "e8bcf2b134d97ce86ce82b27cae6e65ab9cb7f96" />
+
+ </target>
+</project>
+<!-- arch-tag: 9fb1944c-c56c-4bda-a961-bc5ce2c44295
+-->
@@ -0,0 +1,14 @@
+# List of path elements in fuego core common pool
+# needed by the build system
+# Build system stuff
+../${fc.contrib}/antenna.jar
+../${fc.contrib}/antlr.jar
+../${fc.contrib}/findbugs-0.9.4-ant.jar
+../${fc.contrib}/findbugsGUI.jar
+../${fc.contrib}/findbugs-0.9.4.jar
+../${fc.contrib}/findbugs-0.9.4-bcel.jar
+../${fc.contrib}/plugin/coreplugin.jar
+../${fc.contrib}/jse.jar
+../${fc.contrib}/junit-3.8.1.jar
+# arch-tag: 243ae8f2-b4ae-43e2-b28b-956a6de8c9ee
+
@@ -0,0 +1,3 @@
+../${fc.contrib}/commons-logging-1.1.1.jar
+../${fc.contrib}/xmlpull_1_1_3_4c.jar
+# arch-tag: 6a662f5c-828a-4a6f-8800-3f1e5130af06
View
@@ -0,0 +1,8 @@
+<subproject name="xmldiff">
+ <depend>util</depend>
+ <depend>xas</depend>
+ <depend>raxs</depend>
+</subproject>
+
+<!-- arch-tag: 7dc661af-0029-4e60-acc1-d5719c0603c0
+-->
@@ -0,0 +1,10 @@
+<project name="project-setup" default="project-setup">
+ <target name="project-setup">
+ <unzip src="buildres/fuego-common-buildfiles.zip" dest=".." />
+ <subant antfile="contrib.xml" buildpath="." />
+ </target>
+</project>
+<!-- arch-tag: 94655aca-70c3-4b77-8525-72e23cfe0821
+-->
+
+
Oops, something went wrong.

0 comments on commit aaebd70

Please sign in to comment.