Skip to content

Commit

Permalink
More OS parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
fvilla committed Sep 11, 2024
1 parent 0315d01 commit a54fc4c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ private KimObservationStrategy adaptStrategy(ObservationStrategySyntax strategy,
// and these are comma-separated filters in a 'for'
for (var match : filter.getMatch()) {

var f = new KimObservationStrategyImpl.FilterImpl(); // TODO
var f = new KimObservationStrategyImpl.FilterImpl();
f.setNegated(match.isNegated());
if (match.getObservable() != null /* which it should */) {
f.setMatch(adaptSemantics(match.getObservable(), namespace, projectName,
Expand Down Expand Up @@ -571,10 +571,11 @@ private KimObservationStrategy adaptStrategy(ObservationStrategySyntax strategy,
KlabAsset.KnowledgeClass.OBSERVATION_STRATEGY_DOCUMENT));
}
if (!operation.getFunctions().isEmpty()) {

o.getFunctions().addAll(operation.getFunctions().stream().map(f -> adaptServiceCall(f,
namespace, projectName, KlabAsset.KnowledgeClass.OBSERVATION_STRATEGY)).toList());
}
if (!operation.getDeferredStrategies().isEmpty()) {

o.getDeferredStrategies().addAll(operation.getDeferredStrategies().stream().map(s -> adaptStrategy(s, namespace, projectName)).toList());
}
ret.getOperations().add(o);
}
Expand Down

0 comments on commit a54fc4c

Please sign in to comment.