]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.workbench.search/src/org/simantics/workbench/search/NamedResource.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.workbench.search / src / org / simantics / workbench / search / NamedResource.java
index 8a3b71626ebe465a15ac1012b9920900929d284e..91030bb960b8e3d55637372659855427dbccb0c4 100644 (file)
@@ -1,54 +1,54 @@
-package org.simantics.workbench.search;\r
-\r
-import org.simantics.NameLabelUtil;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.ServiceLocator;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.service.SerialisationSupport;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class NamedResource {\r
-\r
-    private final String resource;\r
-    private final String name;\r
-    private final String uri;\r
-\r
-    public static NamedResource of(ReadGraph graph, Resource resource) throws DatabaseException {\r
-        return of(graph, resource, NameLabelUtil.modalName(graph, resource));\r
-    }\r
-\r
-    public static NamedResource of(ReadGraph graph, Resource resource, String name) throws DatabaseException {\r
-        return of(graph, resource, name, graph.getPossibleURI(resource));\r
-    }\r
-\r
-    public static NamedResource of(ServiceLocator locator, Resource resource, String name, String uri) throws DatabaseException {\r
-        SerialisationSupport ss = locator.getService(SerialisationSupport.class);\r
-        return new NamedResource("" + ss.getRandomAccessId(resource), name, uri);\r
-    }\r
-\r
-    public NamedResource(String resource, String name) {\r
-        this(resource, name, null);\r
-    }\r
-\r
-    public NamedResource(String resource, String name, String uri) {\r
-        this.resource = resource;\r
-        this.name = name;\r
-        this.uri = uri;\r
-    }\r
-\r
-    public String getResource() {\r
-        return resource;\r
-    }\r
-\r
-    public String getName() {\r
-        return name;\r
-    }\r
-\r
-    public String getUri() {\r
-        return uri;\r
-    }\r
-\r
-}\r
+package org.simantics.workbench.search;
+
+import org.simantics.NameLabelUtil;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.ServiceLocator;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.service.SerialisationSupport;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class NamedResource {
+
+    private final String resource;
+    private final String name;
+    private final String uri;
+
+    public static NamedResource of(ReadGraph graph, Resource resource) throws DatabaseException {
+        return of(graph, resource, NameLabelUtil.modalName(graph, resource));
+    }
+
+    public static NamedResource of(ReadGraph graph, Resource resource, String name) throws DatabaseException {
+        return of(graph, resource, name, graph.getPossibleURI(resource));
+    }
+
+    public static NamedResource of(ServiceLocator locator, Resource resource, String name, String uri) throws DatabaseException {
+        SerialisationSupport ss = locator.getService(SerialisationSupport.class);
+        return new NamedResource("" + ss.getRandomAccessId(resource), name, uri);
+    }
+
+    public NamedResource(String resource, String name) {
+        this(resource, name, null);
+    }
+
+    public NamedResource(String resource, String name, String uri) {
+        this.resource = resource;
+        this.name = name;
+        this.uri = uri;
+    }
+
+    public String getResource() {
+        return resource;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getUri() {
+        return uri;
+    }
+
+}