| Total Complexity | 15 |
| Total Lines | 90 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package it.cnr.istc.pst.cognition.koala.reasoner.observation; |
||
| 8 | public class ObservationReasonerUpdate |
||
| 9 | { |
||
| 10 | private String eventId; |
||
| 11 | private String eventType; |
||
| 12 | private ObservationUpdateCategory category; |
||
| 13 | private String concernedFeatureId; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * |
||
| 17 | * @param eventId |
||
| 18 | * @param eventType |
||
| 19 | * @param concernedFeatureId |
||
| 20 | * @param category |
||
| 21 | */ |
||
| 22 | protected ObservationReasonerUpdate(String eventId, String eventType, String concernedFeatureId, ObservationUpdateCategory category) { |
||
| 23 | this.eventId = eventId; |
||
| 24 | this.eventType = eventType; |
||
| 25 | this.category = category; |
||
| 26 | this.concernedFeatureId = concernedFeatureId; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * |
||
| 31 | * @return |
||
| 32 | */ |
||
| 33 | public String getEventId() { |
||
| 34 | return eventId; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * |
||
| 39 | * @return |
||
| 40 | */ |
||
| 41 | public ObservationUpdateCategory getCategory() { |
||
| 42 | return category; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * |
||
| 47 | * @return |
||
| 48 | */ |
||
| 49 | public String getEventType() { |
||
| 50 | return eventType; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * |
||
| 55 | * @return |
||
| 56 | */ |
||
| 57 | public String getConcernedFeatureId() { |
||
| 58 | return concernedFeatureId; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * |
||
| 63 | */ |
||
| 64 | @Override |
||
| 65 | public int hashCode() { |
||
| 66 | final int prime = 31; |
||
| 67 | int result = 1; |
||
| 68 | result = prime * result + ((eventId == null) ? 0 : eventId.hashCode()); |
||
| 69 | return result; |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * |
||
| 74 | */ |
||
| 75 | @Override |
||
| 76 | public boolean equals(Object obj) { |
||
| 77 | if (this == obj) |
||
| 78 | return true; |
||
| 79 | if (obj == null) |
||
| 80 | return false; |
||
| 81 | if (getClass() != obj.getClass()) |
||
| 82 | return false; |
||
| 83 | ObservationReasonerUpdate other = (ObservationReasonerUpdate) obj; |
||
| 84 | if (eventId == null) { |
||
| 85 | if (other.eventId != null) |
||
| 86 | return false; |
||
| 87 | } else if (!eventId.equals(other.eventId)) |
||
| 88 | return false; |
||
| 89 | return true; |
||
| 90 | } |
||
| 91 | |||
| 92 | /** |
||
| 93 | * |
||
| 94 | */ |
||
| 95 | @Override |
||
| 96 | public String toString() { |
||
| 97 | return "[Update eventId= \"" + this.eventId + "\", type=\"" + this.eventType + "\", category= \"" + this.category + "\"]"; |
||
| 98 | } |
||
| 100 |