]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db/src/org/simantics/db/ChangeSet.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / ChangeSet.java
index 5f110c4c0bb07a99c63dc887c74639e419db6303..96ff98b61432579c2906bda103cd9ab74f850025 100644 (file)
@@ -1,80 +1,80 @@
-/*******************************************************************************\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
-package org.simantics.db;\r
-\r
-import java.util.Collection;\r
-\r
-import org.simantics.db.event.ChangeEvent;\r
-import org.simantics.db.event.ChangeListener;\r
-import org.simantics.db.request.Write;\r
-import org.simantics.db.request.WriteOnly;\r
-import org.simantics.db.service.GraphChangeListenerSupport;\r
-\r
-/**\r
- * A representation of a set of changes that have been performed into the graph\r
- * database using a write request ({@link Write}, {@link WriteOnly}).\r
- * \r
- * <p>\r
- * The change information is allowed to be inexact in the sense that these\r
- * changes may represent what is attempted to commit into the database but some\r
- * of the changes may turn out to be null operations in the end: a claimed\r
- * statement may have already existed or a denied statement may not exist in the\r
- * first place. Hence, a ChangeSet tells what statement changes have possibly\r
- * been performed and what resource-bound values have possibly changed.\r
- * \r
- * @author Tuukka Lehtonen\r
- * \r
- * @see GraphChangeListenerSupport\r
- * @see ChangeListener\r
- * @see ChangeEvent\r
- */\r
-public interface ChangeSet {\r
-\r
-    public interface StatementChange extends Statement {\r
-        /**\r
-         * @return <code>true</code> if the statement was claimed,\r
-         *         <code>false</code> if denied.\r
-         */\r
-        boolean isClaim();\r
-    }\r
-\r
-    /**\r
-     * TODO: specify whether the collection is considered a set or a list\r
-     * (duplicate statements allowed or not)\r
-     * \r
-     * The returned collection may be shared internal state of the\r
-     * implementation and must not be modified by the client.\r
-     * \r
-     * @return the set of changed statements, each either claimed or denied\r
-     */\r
-    Collection<StatementChange> changedStatements();\r
-\r
-    /**\r
-     * TODO: specify whether the collection is considered a set or a list\r
-     * (duplicate statements allowed or not)\r
-     * \r
-     * The returned collection may be shared internal state of the\r
-     * implementation and must not be modified by the client.\r
-     * \r
-     * @return the set of changed values, either claimed or denied\r
-     */\r
-    Collection<Resource> changedValues();\r
-    \r
-    Collection<Resource> changedResources();\r
-\r
-    /**\r
-     * @return <code>true</code> if this change set contains 0 operations,\r
-     *         <code>false</code> otherwise\r
-     */\r
-    boolean isEmpty();\r
-\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.db;
+
+import java.util.Collection;
+
+import org.simantics.db.event.ChangeEvent;
+import org.simantics.db.event.ChangeListener;
+import org.simantics.db.request.Write;
+import org.simantics.db.request.WriteOnly;
+import org.simantics.db.service.GraphChangeListenerSupport;
+
+/**
+ * A representation of a set of changes that have been performed into the graph
+ * database using a write request ({@link Write}, {@link WriteOnly}).
+ * 
+ * <p>
+ * The change information is allowed to be inexact in the sense that these
+ * changes may represent what is attempted to commit into the database but some
+ * of the changes may turn out to be null operations in the end: a claimed
+ * statement may have already existed or a denied statement may not exist in the
+ * first place. Hence, a ChangeSet tells what statement changes have possibly
+ * been performed and what resource-bound values have possibly changed.
+ * 
+ * @author Tuukka Lehtonen
+ * 
+ * @see GraphChangeListenerSupport
+ * @see ChangeListener
+ * @see ChangeEvent
+ */
+public interface ChangeSet {
+
+    public interface StatementChange extends Statement {
+        /**
+         * @return <code>true</code> if the statement was claimed,
+         *         <code>false</code> if denied.
+         */
+        boolean isClaim();
+    }
+
+    /**
+     * TODO: specify whether the collection is considered a set or a list
+     * (duplicate statements allowed or not)
+     * 
+     * The returned collection may be shared internal state of the
+     * implementation and must not be modified by the client.
+     * 
+     * @return the set of changed statements, each either claimed or denied
+     */
+    Collection<StatementChange> changedStatements();
+
+    /**
+     * TODO: specify whether the collection is considered a set or a list
+     * (duplicate statements allowed or not)
+     * 
+     * The returned collection may be shared internal state of the
+     * implementation and must not be modified by the client.
+     * 
+     * @return the set of changed values, either claimed or denied
+     */
+    Collection<Resource> changedValues();
+    
+    Collection<Resource> changedResources();
+
+    /**
+     * @return <code>true</code> if this change set contains 0 operations,
+     *         <code>false</code> otherwise
+     */
+    boolean isEmpty();
+
+}