-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #116] Implement fault tree evaluation using operational data and…
… operational data filter - Add BaseRepositoryService.getToolContext to get aa FTA tool specific context for a given URI. This is used to generate an FTA tool specific context for a given system uri where the tool can store all system related entities created by the tool, e.g. global operational failure rate estimates, system specific operational data filters.
- Loading branch information
Showing
5 changed files
with
101 additions
and
37 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/cz/cvut/kbss/analysis/dao/FailureRateEstimateDao.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cz.cvut.kbss.analysis.dao; | ||
|
||
import cz.cvut.kbss.analysis.config.conf.PersistenceConf; | ||
import cz.cvut.kbss.analysis.model.FailureRateEstimate; | ||
import cz.cvut.kbss.analysis.service.IdentifierService; | ||
import cz.cvut.kbss.analysis.util.Vocabulary; | ||
import cz.cvut.kbss.jopa.model.EntityManager; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.net.URI; | ||
|
||
@Repository | ||
public class FailureRateEstimateDao extends BaseDao<FailureRateEstimate>{ | ||
protected final static URI HAS_ESTIMATE_PROP = URI.create(Vocabulary.s_p_has_estimate); | ||
protected final static URI VALUE_PROP = URI.create(Vocabulary.s_p_value); | ||
|
||
public FailureRateEstimateDao(EntityManager em, PersistenceConf config, IdentifierService identifierService) { | ||
super(FailureRateEstimate.class, em, config, identifierService); | ||
} | ||
|
||
public void setHasEstimate(URI failureRateUri, FailureRateEstimate estimate, URI context) { | ||
addOrReplaceValue(failureRateUri, HAS_ESTIMATE_PROP, estimate.getUri(), context); | ||
} | ||
|
||
public void setValue(URI failureRateEstimateUri, Double value, URI context) { | ||
addOrReplaceValue(failureRateEstimateUri, VALUE_PROP, value, context); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters