Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/14/09 17:29:48 (15 years ago)
Author:
gkronber
Message:

worked on RDF backend. Implemented query support to load datasets. Queries for dispatcher and results still missing. (#419)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSet.cs

    r1116 r1129  
    4141    public string Name {
    4242      get { return name; }
     43      set { name = value; }
    4344    }
    4445
     
    4849        // lazy loading of problem from DB
    4950        if (problem == null) {
    50           var persistedData = Store.Select(new Statement(new Entity(Ontology.CedmaNameSpace + Guid), Ontology.PredicateSerializedData, Ontology.AnyEntity));
     51          var serializedDataVar = new HeuristicLab.CEDMA.DB.Interfaces.Variable("SerializedData");
     52          var persistedData = Store.Query(
     53            new Statement[] { new Statement(new Entity(Ontology.CedmaNameSpace + Guid), Ontology.PredicateSerializedData, serializedDataVar)});
    5154          if (persistedData.Count() == 1) {
    52             Literal persistedLiteral = (Literal)persistedData.First().Property;
     55            Literal persistedLiteral = (Literal)persistedData.First().Get("SerializedData");
    5356            this.problem = (Problem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String((string)persistedLiteral.Value));
    5457          } else
     
    6972      Store = store;
    7073      guid = new Guid(dataSetEntity.Uri.Remove(0, Ontology.CedmaNameSpace.Length));
    71       var names = store.Select(new Statement(dataSetEntity, Ontology.PredicateName, Ontology.AnyEntity));
    72       if (names.Count() > 0) name = (string)((Literal)names.First().Property).Value;
    73       else name = guid.ToString();
     74      name = guid.ToString();
    7475    }
    7576
Note: See TracChangeset for help on using the changeset viewer.