Index: trunk/sources/HeuristicLab.CEDMA.Core/DatabaseOperatorLibrary.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Core/DatabaseOperatorLibrary.cs	(revision 416)
+++ trunk/sources/HeuristicLab.CEDMA.Core/DatabaseOperatorLibrary.cs	(revision 416)
@@ -0,0 +1,41 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.CEDMA.Core {
+  public class DatabaseOperatorLibrary : ItemBase, IOperatorLibrary {
+
+    private OperatorGroup group;
+    public IOperatorGroup Group {
+      get { return group; }
+    }
+
+    private string dbUri;
+
+    public DatabaseOperatorLibrary(string dbUri)
+      : base() {
+      this.dbUri = dbUri;
+      group = new OperatorGroup();
+    }
+
+
+    public override System.Xml.XmlNode GetXmlNode(string name, System.Xml.XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      throw new NotSupportedException();
+    }
+
+    public override void Populate(System.Xml.XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      throw new NotSupportedException();
+    }
+
+    public override object Clone(IDictionary<Guid, object> clonedObjects) {
+      throw new NotSupportedException();
+    }
+
+    public override IView CreateView() {
+      // return new DatabaseOperatorLibraryView(this);
+      return null;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.CEDMA.Core/HeuristicLab.CEDMA.Core.csproj
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Core/HeuristicLab.CEDMA.Core.csproj	(revision 415)
+++ trunk/sources/HeuristicLab.CEDMA.Core/HeuristicLab.CEDMA.Core.csproj	(revision 416)
@@ -62,4 +62,5 @@
       <SubType>UserControl</SubType>
     </Compile>
+    <Compile Include="DatabaseOperatorLibrary.cs" />
     <Compile Include="Result.cs" />
     <Compile Include="IResult.cs" />
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj	(revision 415)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj	(revision 416)
@@ -55,4 +55,5 @@
   <ItemGroup>
     <Compile Include="AgentEntry.cs" />
+    <Compile Include="OperatorEntry.cs" />
     <Compile Include="ProcessStatus.cs" />
     <Compile Include="ResultEntry.cs" />
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/IDatabase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/IDatabase.cs	(revision 415)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/IDatabase.cs	(revision 416)
@@ -48,4 +48,7 @@
     long InsertSubResult(long resultId, string summary, string description, byte[] rawData);
 
+    [OperationContract]
+    long InsertOperator(string name, string rawData);
+
     // should be replaced by more powerful querying interface (LINQ provider?)
     [OperationContract]
@@ -61,4 +64,7 @@
     ICollection<ResultEntry> GetSubResults(long parentResultId);
 
+    [OperationContract]
+    ICollection<OperatorEntry> GetOperators();
+
   }
 }
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/OperatorEntry.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/OperatorEntry.cs	(revision 416)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/OperatorEntry.cs	(revision 416)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.CEDMA.DB.Interfaces {
+  [DataContract]
+  public class OperatorEntry {
+    [DataMember]
+    public long Id { get; set; }
+    [DataMember]
+    public string Name { get; set; }
+    [DataMember]
+    public string RawData { get; set; }
+  }
+}
Index: trunk/sources/HeuristicLab.CEDMA.DB/Database.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB/Database.cs	(revision 415)
+++ trunk/sources/HeuristicLab.CEDMA.DB/Database.cs	(revision 416)
@@ -61,4 +61,9 @@
             using(DbCommand cmd = cnn.CreateCommand()) {
               cmd.CommandText = "CREATE TABLE Result (ID integer primary key autoincrement, AgentId integer, ParentResultId integer, Summary text, Description text, CreationTime DateTime, RawData Blob)";
+              cmd.Transaction = t;
+              cmd.ExecuteNonQuery();
+            }
+            using(DbCommand cmd = cnn.CreateCommand()) {
+              cmd.CommandText = "CREATE TABLE Operator (ID integer primary key autoincrement, Name text, RawData text)";
               cmd.Transaction = t;
               cmd.ExecuteNonQuery();
@@ -194,4 +199,33 @@
       }
     }
+
+    public long InsertOperator(string name, string rawData) {
+      rwLock.EnterWriteLock();
+      try {
+        using(DbConnection cnn = new SQLiteConnection(connectionString)) {
+          cnn.Open();
+          long id;
+          using(DbTransaction t = cnn.BeginTransaction()) {
+            using(DbCommand c = cnn.CreateCommand()) {
+              c.Transaction = t;
+              c.CommandText = "Insert into Operator (Name, RawData) values (@Name, @RawData); select last_insert_rowid()";
+              DbParameter nameParam = c.CreateParameter();
+              nameParam.ParameterName = "@Name";
+              nameParam.Value = name;
+              c.Parameters.Add(nameParam);
+              DbParameter dataParam = c.CreateParameter();
+              dataParam.ParameterName = "@RawData";
+              dataParam.Value = rawData;
+              c.Parameters.Add(dataParam);
+              id = (long)c.ExecuteScalar();
+            }
+            t.Commit();
+            return id;
+          }
+        }
+      } finally {
+        rwLock.ExitWriteLock();
+      }
+    }
     #endregion
 
@@ -433,4 +467,29 @@
       return results;
     }
+
+    public ICollection<OperatorEntry> GetOperators() {
+      rwLock.EnterReadLock();
+      List<OperatorEntry> operators = new List<OperatorEntry>();
+      try {
+        using(DbConnection cnn = new SQLiteConnection(connectionString)) {
+          cnn.Open();
+          using(DbCommand c = cnn.CreateCommand()) {
+            c.CommandText = "Select id, name, rawdata from Operator";
+            using(DbDataReader r = c.ExecuteReader()) {
+              while(r.Read()) {
+                OperatorEntry op = new OperatorEntry();
+                op.Id = r.GetInt32(0);
+                op.Name = r.IsDBNull(1) ? "-" : r.GetString(1);
+                op.RawData = r.GetString(2);
+                operators.Add(op);
+              }
+            }
+          }
+        }
+      } finally {
+        rwLock.ExitReadLock();
+      }
+      return operators;
+    }
     #endregion
   }
