]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.project/src/org/simantics/project/features/registry/PluginParser.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.project / src / org / simantics / project / features / registry / PluginParser.java
index 1575aa1b0821dc8a92df97befa8c2602db186446..5c87d044857b889dd57f323ee7ba12cb6fe44991 100644 (file)
@@ -1,75 +1,75 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
 package org.simantics.project.features.registry;
 
-import java.io.File;\r
-import java.io.FileNotFoundException;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.ArrayList;\r
-import java.util.Collection;\r
-import java.util.Enumeration;\r
-import java.util.List;\r
-import java.util.Set;\r
-import java.util.TreeSet;\r
-import java.util.jar.Attributes;\r
-import java.util.jar.JarEntry;\r
-import java.util.jar.JarFile;\r
-import java.util.jar.Manifest;\r
-import java.util.logging.Logger;\r
-\r
-import javax.xml.parsers.DocumentBuilder;\r
-import javax.xml.parsers.DocumentBuilderFactory;\r
-import javax.xml.parsers.ParserConfigurationException;\r
-\r
-import org.eclipse.equinox.p2.metadata.Version;\r
-import org.eclipse.equinox.p2.metadata.VersionedId;\r
-import org.simantics.databoard.Bindings;\r
-import org.simantics.databoard.Files;\r
-import org.simantics.databoard.binding.Binding;\r
-import org.simantics.databoard.serialization.SerializationException;\r
-import org.simantics.graph.representation.TransferableGraph1;\r
-import org.simantics.project.management.GraphBundleEx;\r
-import org.simantics.utils.strings.StringUtils;\r
-import org.w3c.dom.Document;\r
-import org.w3c.dom.Element;\r
-import org.w3c.dom.Node;\r
-import org.w3c.dom.NodeList;\r
-import org.xml.sax.SAXException;\r
-\r
-/**\r
- * A class for parsing plug-in bundle repositories for finding:\r
- * <ol>\r
- * <li>bundles that contain transferable graphs (graph.tg) or project feature,\r
- * represented as {@link GraphBundleEx} objects</li>\r
- * <li>project feature extensions that contain installGroup definitions,\r
- * represented as {@link GroupReference} objects</li>\r
- * </ol>\r
- * \r
- * <p>\r
- * Use {@link #parse(String)} or {@link #parse(File)} to parse a bundle or\r
- * bundles from a directory. After parsing, {@link #getGraphBundles()} and\r
- * {@link #getGroupReferences()} can be used to get what was found during\r
- * parsing.\r
- * \r
- * @author J-P Laine\r
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+import java.util.logging.Logger;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionedId;
+import org.simantics.databoard.Bindings;
+import org.simantics.databoard.Files;
+import org.simantics.databoard.binding.Binding;
+import org.simantics.databoard.serialization.SerializationException;
+import org.simantics.graph.representation.TransferableGraph1;
+import org.simantics.project.management.GraphBundleEx;
+import org.simantics.utils.strings.StringUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * A class for parsing plug-in bundle repositories for finding:
+ * <ol>
+ * <li>bundles that contain transferable graphs (graph.tg) or project feature,
+ * represented as {@link GraphBundleEx} objects</li>
+ * <li>project feature extensions that contain installGroup definitions,
+ * represented as {@link GroupReference} objects</li>
+ * </ol>
+ * 
+ * <p>
+ * Use {@link #parse(String)} or {@link #parse(File)} to parse a bundle or
+ * bundles from a directory. After parsing, {@link #getGraphBundles()} and
+ * {@link #getGroupReferences()} can be used to get what was found during
+ * parsing.
+ * 
+ * @author J-P Laine
  */
 public class PluginParser {
 
     protected Logger log = Logger.getLogger(PluginParser.class.toString());
-\r
-    protected List<GraphBundleEx> graphBundles    = new ArrayList<GraphBundleEx>();\r
-\r
-    protected Set<GroupReference> groupReferences = new TreeSet<GroupReference>();\r
+
+    protected List<GraphBundleEx> graphBundles    = new ArrayList<GraphBundleEx>();
+
+    protected Set<GroupReference> groupReferences = new TreeSet<GroupReference>();
 
     /**
      * @param args
@@ -78,27 +78,27 @@ public class PluginParser {
         PluginParser tester = new PluginParser();
 
         tester.parse("/home/jplaine/tmp/");
-    }\r
-\r
-    /**\r
-     * @return the list of versioned graph bundles found in the parsed bundle\r
-     *         repositories so far\r
-     */\r
-    public List<GraphBundleEx> getGraphBundles() {\r
-        return graphBundles;\r
-    }\r
-\r
-    public Set<GroupReference> getGroupReferences() {\r
-        return groupReferences;\r
-    }\r
-\r
-    /**\r
-     * @param filename Jar file, or folder that contain jar files\r
-     */\r
-    public void parse(String filename) {\r
-        parse(new File(filename));\r
-    }\r
-\r
+    }
+
+    /**
+     * @return the list of versioned graph bundles found in the parsed bundle
+     *         repositories so far
+     */
+    public List<GraphBundleEx> getGraphBundles() {
+        return graphBundles;
+    }
+
+    public Set<GroupReference> getGroupReferences() {
+        return groupReferences;
+    }
+
+    /**
+     * @param filename Jar file, or folder that contain jar files
+     */
+    public void parse(String filename) {
+        parse(new File(filename));
+    }
+
     /**
      * @param root Jar file, or folder that contains jar files
      */