Skip to content

Commit

Permalink
Dirty hack to disable cloning (in order to have local data in the
Browse files Browse the repository at this point in the history
knowledge). Michal is going to provide the right systematic solution
tomorrow.
  • Loading branch information
bures committed Jun 16, 2014
1 parent 5bda1e7 commit f073ff2
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public CloningKnowledgeManager(String id) {
@Override
public ValueSet get(Collection<KnowledgePath> knowledgePaths)
throws KnowledgeNotFoundException {

// XXX: This is temporary hack before Michal implements the local knowledge correctly
return super.get(knowledgePaths);

/*
ValueSet values = super.get(knowledgePaths);
ValueSet copy = new ValueSet();
// only values need to be cloned (cloning KnowledgePaths in a full model
Expand All @@ -41,6 +46,7 @@ public ValueSet get(Collection<KnowledgePath> knowledgePaths)
copy.setValue(p, cloner.deepClone(values.getValue(p)));
}
return copy;
*/
}

/*
Expand All @@ -52,6 +58,11 @@ public ValueSet get(Collection<KnowledgePath> knowledgePaths)
*/
@Override
public void update(ChangeSet changeSet) throws KnowledgeUpdateException {

// XXX: This is temporary hack before Michal implements the local knowledge correctly
super.update(changeSet);

/*
ChangeSet copy = new ChangeSet();
// only values need to be cloned (cloning KnowledgePaths in a full model
// causes a loopback in the cloner)
Expand All @@ -62,5 +73,6 @@ public void update(ChangeSet changeSet) throws KnowledgeUpdateException {
copy.setDeleted(p);
}
super.update(copy);
*/
}
}

0 comments on commit f073ff2

Please sign in to comment.