- Timestamp:
- 12/15/08 10:48:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSet.cs
r988 r992 30 30 31 31 namespace HeuristicLab.CEDMA.Core { 32 public class DataSet {32 public class DataSet : IViewable { 33 33 public IStore Store { get; set; } 34 34 … … 51 51 : base() { 52 52 guid = Guid.NewGuid(); 53 name = "Data set"; 53 54 problem = new Problem(); 54 55 } … … 59 60 guid = new Guid(dataSetEntity.Uri.Remove(0, Ontology.CedmaNameSpace.Length)); 60 61 IList<Statement> names = store.Select(new Statement(dataSetEntity, Ontology.PredicateName, Ontology.AnyEntity)); 61 if 62 if(names.Count > 0) name = (string)((Literal)names[0].Property).Value; 62 63 else name = guid.ToString(); 63 64 } 64 65 65 66 public void Activate() { 66 Entity myEntity = new Entity 67 Entity myEntity = new Entity(Ontology.CedmaNameSpace + Guid); 67 68 Store.Add(new Statement(myEntity, Ontology.PredicateInstanceOf, Ontology.TypeDataSet)); 68 69 Store.Add(new Statement(myEntity, Ontology.PredicateSerializedData, new Literal(PersistenceManager.SaveToGZip(problem))));
Note: See TracChangeset
for help on using the changeset viewer.