-/*******************************************************************************\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.layer0.adapter;\r
-\r
-import org.simantics.db.WriteGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-public interface Modifier<T> {\r
- \r
- /**\r
- * @return an initial text to be modified\r
- */\r
- String getValue();\r
- \r
- /**\r
- * Validates the given string. Returns an error message to display if the\r
- * new text is invalid. Returns <code>null</code> if there is no error. Note\r
- * that the empty string is not treated the same as <code>null</code>; it\r
- * indicates an error state but with no message to display.\r
- * \r
- * @param newText the text to check for validity\r
- * @return an error message or <code>null</code> if no error\r
- */\r
- String isValid(T newValue);\r
-\r
- /**\r
- * @param graph access to the graph database\r
- * @param value the new value to set\r
- */\r
- void modify(WriteGraph graph, T value) throws DatabaseException;\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.layer0.adapter;
+
+import org.simantics.db.WriteGraph;
+import org.simantics.db.exception.DatabaseException;
+
+public interface Modifier<T> {
+
+ /**
+ * @return an initial text to be modified
+ */
+ String getValue();
+
+ /**
+ * Validates the given string. Returns an error message to display if the
+ * new text is invalid. Returns <code>null</code> if there is no error. Note
+ * that the empty string is not treated the same as <code>null</code>; it
+ * indicates an error state but with no message to display.
+ *
+ * @param newText the text to check for validity
+ * @return an error message or <code>null</code> if no error
+ */
+ String isValid(T newValue);
+
+ /**
+ * @param graph access to the graph database
+ * @param value the new value to set
+ */
+ void modify(WriteGraph graph, T value) throws DatabaseException;
+}