Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove the DTD and its resolver from the java bindings since we use the flexml parser
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Feb 2010 23:05:37 +0000 (23:05 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Feb 2010 23:05:37 +0000 (23:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7129 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/Makefile.am
src/java/simgrid/msg/DTDResolver.java [deleted file]

index 3e82357..0a51345 100644 (file)
@@ -259,7 +259,6 @@ JMSG_JAVA_SRC = \
   java/simgrid/msg/Task.java                         \
   \
   java/simgrid/msg/MsgNative.java                    \
-  java/simgrid/msg/DTDResolver.java                  \
   java/simgrid/msg/ApplicationHandler.java           \
   \
   java/simgrid/msg/Sem.java
@@ -370,11 +369,10 @@ clean-local:
 jardir = $(prefix)/jar
 jar_DATA =  simgrid.jar
 
-simgrid.jar: $(JMSG_JAVA_SRC) $(srcdir)/surf/simgrid.dtd
+simgrid.jar: $(JMSG_JAVA_SRC)
        [ -e .classes ] || mkdir .classes
        $(JAVAC) -d .classes -source 6 $(foreach file,$(JMSG_JAVA_SRC),$(srcdir)/$(file))
        [ -e .classes/surf ] || mkdir .classes/surf
-       cp $(srcdir)/surf/simgrid.dtd .classes/surf
        $(JAR) cvf simgrid.jar -C .classes .
 else
 EXTRA_DIST+=$(JMSG_C_SRC) $(JMSG_JAVA_SRC) $(MSG_SRC)
diff --git a/src/java/simgrid/msg/DTDResolver.java b/src/java/simgrid/msg/DTDResolver.java
deleted file mode 100644 (file)
index 850d79b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*\r
- * simgrid.msg.DTDResolver.java    1.00 07/05/01\r
- *\r
- * Copyright 2006,2007 Martin Quinson, Malek Cherier           \r
- * All right reserved. \r
- *\r
- * This program is free software; you can redistribute \r
- * it and/or modify it under the terms of the license \r
- *(GNU LGPL) which comes with this package. \r
- */  \r
-  package simgrid.msg;\r
-import java.io.InputStream;\r
-import org.xml.sax.EntityResolver;\r
-import org.xml.sax.InputSource;\r
-import org.xml.sax.SAXException;\r
-public class DTDResolver implements EntityResolver {\r
-  public InputSource resolveEntity(String publicID, String systemID) \r
-    throws SAXException {\r
-    if (!systemID.endsWith("simgrid.dtd")) {\r
-      System.out.\r
-        println("\n MSG - Warning - the platform used seams invalid\n");\r
-      return null;\r
-    }\r
-    \r
-      /* try to get the DTD from the classpath */ \r
-      InputStream in = getClass().getResourceAsStream("/simgrid.dtd");\r
-    if (null == in)\r
-      \r
-        /* try to get the DTD from the surf dir in the jar */ \r
-        in = getClass().getResourceAsStream("/surf/simgrid.dtd");\r
-    if (null == in)\r
-      \r
-        /* try to get the DTD from the directory Simgrid */ \r
-        in = getClass().getResourceAsStream("/Simgrid/simgrid.dtd");\r
-    if (null == in)\r
-      \r
-        /* try to get the DTD from the directory Simgrid/msg */ \r
-        in = getClass().getResourceAsStream("/Simgrid/msg/simgrid.dtd");\r
-    if (null == in) {\r
-      System.err.println("\nMSG - XML DTD not found (" +\r
-                          systemID.toString() +\r
-                          ").\n\nPlease put this file in one of the following destinations :\n\n"\r
-                          + "   - classpath;\n" +\r
-                          "   - the directory Simgrid;\n" +\r
-                          "   - the directory Simgrid/msg;\n" +\r
-                          "   - the directory of you simulation.\n\n" +\r
-                          "Once the DTD puted in one of the previouse destinations, retry you simulation.\n");\r
-      \r
-        /* \r
-         * If not founded, returning null makes process continue normally (try to get \r
-         * the DTD from the current directory \r
-         */ \r
-        return null;\r
-    }\r
-    return new InputSource(in);\r
-  }\r
-}\r
-\r
-\r