-
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.
Merge pull request #125 from kbss-cvut/feature/116-update-fault-tree-…
…operational-failure-rate Feature/116 update fault tree operational failure rate
- Loading branch information
Showing
12 changed files
with
319 additions
and
26 deletions.
There are no files selected for viewing
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
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
32 changes: 32 additions & 0 deletions
32
src/main/java/cz/cvut/kbss/analysis/model/opdata/ItemFailureRate.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,32 @@ | ||
package cz.cvut.kbss.analysis.model.opdata; | ||
|
||
import cz.cvut.kbss.jopa.model.annotations.*; | ||
|
||
import java.net.URI; | ||
|
||
|
||
@OWLClass(iri = "http://item-failure-rate") | ||
public class ItemFailureRate { | ||
|
||
@Id | ||
protected URI uri; | ||
|
||
@OWLDataProperty(iri = "http://failureRate") | ||
protected Double failureRate; | ||
|
||
public URI getUri() { | ||
return uri; | ||
} | ||
|
||
public void setUri(URI uri) { | ||
this.uri = uri; | ||
} | ||
|
||
public Double getFailureRate() { | ||
return failureRate; | ||
} | ||
|
||
public void setFailureRate(Double failureRate) { | ||
this.failureRate = failureRate; | ||
} | ||
} |
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
Oops, something went wrong.