-package org.simantics.event.util;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Collection;\r
-import java.util.List;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.request.ObjectsWithType;\r
-import org.simantics.db.common.request.ResourceRead;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.event.ontology.EventResource;\r
-\r
-/**\r
- * Request for getting all event logs from a model.\r
- * \r
- * @author Tuukka Lehtonen\r
- */\r
-public class AllEventLogs extends ResourceRead<Collection<Resource>> {\r
-\r
- public AllEventLogs(Resource model) {\r
- super(model);\r
- }\r
-\r
- @Override\r
- public Collection<Resource> perform(ReadGraph graph) throws DatabaseException {\r
- EventResource EVENT = EventResource.getInstance(graph);\r
- List<Resource> result = new ArrayList<Resource>();\r
- for (Resource eventLog : graph.syncRequest(new ObjectsWithType(resource, EVENT.HasEventLog, EVENT.EventLog))) {\r
- result.add(eventLog);\r
- }\r
- return result;\r
- }\r
-\r
-}\r
+package org.simantics.event.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.ObjectsWithType;
+import org.simantics.db.common.request.ResourceRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.event.ontology.EventResource;
+
+/**
+ * Request for getting all event logs from a model.
+ *
+ * @author Tuukka Lehtonen
+ */
+public class AllEventLogs extends ResourceRead<Collection<Resource>> {
+
+ public AllEventLogs(Resource model) {
+ super(model);
+ }
+
+ @Override
+ public Collection<Resource> perform(ReadGraph graph) throws DatabaseException {
+ EventResource EVENT = EventResource.getInstance(graph);
+ List<Resource> result = new ArrayList<Resource>();
+ for (Resource eventLog : graph.syncRequest(new ObjectsWithType(resource, EVENT.HasEventLog, EVENT.EventLog))) {
+ result.add(eventLog);
+ }
+ return result;
+ }
+
+}