Skip to content

Method: ClassAssertion(boolean)

1: /**
2: * Copyright (C) 2016 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.ontodriver.model;
16:
17: import cz.cvut.kbss.ontodriver.util.Vocabulary;
18:
19: import java.net.URI;
20:
21: class ClassAssertion extends Assertion {
22:
23: private static final long serialVersionUID = 7238514047567604200L;
24:
25: static final URI RDF_TYPE = URI.create(Vocabulary.RDF_TYPE);
26:
27: ClassAssertion(boolean isInferred) {
28: super(RDF_TYPE, isInferred);
29: }
30:
31: @Override
32: public AssertionType getType() {
33: return AssertionType.CLASS;
34: }
35:
36: @Override
37: public int hashCode() {
38: int prime = 31;
39: return prime * super.hashCode();
40: }
41:
42: @Override
43: public boolean equals(Object obj) {
44: if (this == obj)
45: return true;
46: if (!super.equals(obj))
47: return false;
48: if (getClass() != obj.getClass())
49: return false;
50: return true;
51: }
52: }