-
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 #68 from kbss-cvut/feature/65-support-fault-event-…
…model-with-fha-and-sns-properties Feature/65 support fault event model with fha and sns properties
- Loading branch information
Showing
24 changed files
with
337 additions
and
62 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
22 changes: 22 additions & 0 deletions
22
src/main/java/cz/cvut/kbss/analysis/model/DomainEntity.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,22 @@ | ||
package cz.cvut.kbss.analysis.model; | ||
|
||
import cz.cvut.kbss.analysis.model.util.TypeCategory; | ||
import cz.cvut.kbss.analysis.util.Vocabulary; | ||
import cz.cvut.kbss.jopa.model.annotations.*; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.Set; | ||
|
||
@MappedSuperclass | ||
@Getter | ||
@Setter | ||
public abstract class DomainEntity<T extends DomainEntity> extends NamedEntity{ | ||
|
||
@OWLDataProperty(iri = Vocabulary.s_p_has_type_category) | ||
private TypeCategory typeCategory; | ||
|
||
public abstract Set<T> getSupertypes(); | ||
public abstract void setSupertypes(Set<T> supertypes); | ||
|
||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package cz.cvut.kbss.analysis.model; | ||
|
||
import cz.cvut.kbss.analysis.util.Vocabulary; | ||
import cz.cvut.kbss.jopa.model.annotations.*; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
@OWLClass(iri = Vocabulary.s_c_item) | ||
@Getter | ||
@Setter | ||
public class Item extends DomainEntity<Item> { | ||
|
||
@OWLObjectProperty(iri = Vocabulary.s_p_isDerivedFrom, fetch = FetchType.EAGER) | ||
protected Set<Item> supertypes; | ||
|
||
@OWLObjectProperty(iri = Vocabulary.s_p_documented_in) | ||
private Set<Document> documents; | ||
|
||
@OWLObjectProperty(iri = Vocabulary.s_p_hasPartComponent, cascade = CascadeType.ALL, fetch = FetchType.EAGER) | ||
private Set<Component> components = new HashSet<>(); | ||
|
||
public void addComponent(Component component) { | ||
getComponents().add(component); | ||
component.setParentComponent(this); | ||
} | ||
|
||
@OWLObjectProperty(iri = Vocabulary.s_p_hasFunction, cascade = CascadeType.ALL, fetch = FetchType.EAGER) | ||
private Set<Function> functions = new HashSet<>(); | ||
@OWLObjectProperty(iri = Vocabulary.s_p_hasFailureMode, cascade = CascadeType.ALL, fetch = FetchType.EAGER) | ||
private Set<FailureMode> failureModes = new HashSet<>(); | ||
|
||
|
||
public void addFunction(Function function) { | ||
function.setItem(this); | ||
getFunctions().add(function); | ||
} | ||
|
||
public void addFailureMode(FailureMode failureMode) { | ||
failureMode.setItem(this); | ||
getFailureModes().add(failureMode); | ||
} | ||
} |
Oops, something went wrong.