From: mquinson Date: Tue, 18 Dec 2007 10:32:32 +0000 (+0000) Subject: Dos2unix X-Git-Tag: v3.3~720 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9765bf96e11d3c8627ca46ef3a0824fd0758b163 Dos2unix git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5129 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/java/simgrid/msg/DTDResolver.java b/src/java/simgrid/msg/DTDResolver.java index e74df9f8f4..7af7bb18a0 100644 --- a/src/java/simgrid/msg/DTDResolver.java +++ b/src/java/simgrid/msg/DTDResolver.java @@ -1,40 +1,40 @@ -/* - * simgrid.msg.DTDResolver.java 1.00 07/05/01 - * - * Copyright 2006,2007 Martin Quinson, Malek Cherier - * All right reserved. - * - * This program is free software; you can redistribute - * it and/or modify it under the terms of the license - *(GNU LGPL) which comes with this package. - */ +/* + * simgrid.msg.DTDResolver.java 1.00 07/05/01 + * + * Copyright 2006,2007 Martin Quinson, Malek Cherier + * All right reserved. + * + * This program is free software; you can redistribute + * it and/or modify it under the terms of the license + *(GNU LGPL) which comes with this package. + */ package simgrid.msg; import java.io.InputStream; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; public class DTDResolver implements EntityResolver { - public InputSource resolveEntity(String publicID, String systemID) + public InputSource resolveEntity(String publicID, String systemID) throws SAXException { if (!systemID.endsWith("surfxml.dtd")) { System.out. println("\n MSG - Warning - the platform used seams invalid\n"); return null; } - - /* try to get the DTD from the classpath */ + + /* try to get the DTD from the classpath */ InputStream in = getClass().getResourceAsStream("/surfxml.dtd"); if (null == in) - - /* try to get the DTD from the surf dir in the jar */ + + /* try to get the DTD from the surf dir in the jar */ in = getClass().getResourceAsStream("/surf/surfxml.dtd"); if (null == in) - - /* try to get the DTD from the directory Simgrid */ + + /* try to get the DTD from the directory Simgrid */ in = getClass().getResourceAsStream("/Simgrid/surfxml.dtd"); if (null == in) - - /* try to get the DTD from the directory Simgrid/msg */ + + /* try to get the DTD from the directory Simgrid/msg */ in = getClass().getResourceAsStream("/Simgrid/msg/surfxml.dtd"); if (null == in) { System.err.println("\nMSG - XML DTD not found (" + @@ -45,15 +45,15 @@ " - the directory Simgrid/msg;\n" + " - the directory of you simulation.\n\n" + "Once the DTD puted in one of the previouse destinations, retry you simulation.\n"); - - /* - * If not founded, returning null makes process continue normally (try to get - * the DTD from the current directory - */ + + /* + * If not founded, returning null makes process continue normally (try to get + * the DTD from the current directory + */ return null; } return new InputSource(in); } } - +