Skip to content

Package: IntegrityConstraintFactoryImpl

IntegrityConstraintFactoryImpl

nameinstructionbranchcomplexitylinemethod
DataParticipationConstraint(OWLClass, OWLDataProperty, OWLDatatype, int, int)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
DataPropertyDomainConstraint(OWLDataProperty, OWLClass)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
DataPropertyRangeConstraint(OWLClass, OWLDataProperty, OWLDatatype)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
IntegrityConstraintFactoryImpl()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
MaxDataParticipationConstraint(OWLClass, OWLDataProperty, OWLDatatype, int)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
MaxObjectParticipationConstraint(OWLClass, OWLObjectProperty, OWLClass, int)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
MinDataParticipationConstraint(OWLClass, OWLDataProperty, OWLDatatype, int)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
MinObjectParticipationConstraint(OWLClass, OWLObjectProperty, OWLClass, int)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
ObjectParticipationConstraint(OWLClass, OWLObjectProperty, OWLClass, int, int)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
ObjectPropertyDomainConstraint(OWLObjectProperty, OWLClass)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
ObjectPropertyRangeConstraint(OWLClass, OWLObjectProperty, OWLClass)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
SubClassConstraint(OWLClass, OWLClass)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (C) 2016 Czech Technical University in Prague
3: * <p>
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: * <p>
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.jopa.ic.impl;
16:
17: import cz.cvut.kbss.jopa.ic.api.*;
18: import org.semanticweb.owlapi.model.OWLClass;
19: import org.semanticweb.owlapi.model.OWLDataProperty;
20: import org.semanticweb.owlapi.model.OWLDatatype;
21: import org.semanticweb.owlapi.model.OWLObjectProperty;
22:
23: public class IntegrityConstraintFactoryImpl implements IntegrityConstraintFactory {
24:
25: public AtomicSubClassConstraint SubClassConstraint(final OWLClass sub, final OWLClass sup) {
26: return new AtomicSubClassConstraintImpl(sub, sup);
27: }
28:
29: @Override
30: public DataParticipationConstraint MinDataParticipationConstraint(final OWLClass s, final OWLDataProperty p,
31: final OWLDatatype o, final int card) {
32: return new DataParticipationConstraintImpl(s, p, o, card, -1);
33: }
34:
35: @Override
36: public DataParticipationConstraint MaxDataParticipationConstraint(
37: final OWLClass s, final OWLDataProperty p, final OWLDatatype o,
38: final int card) {
39: return new DataParticipationConstraintImpl(s, p, o, 0, card);
40: }
41:
42: @Override
43: public DataParticipationConstraint DataParticipationConstraint(
44: final OWLClass s, final OWLDataProperty p, final OWLDatatype o,
45: final int min, int max) {
46: return new DataParticipationConstraintImpl(s, p, o, min, max);
47: }
48:
49: @Override
50: public ObjectParticipationConstraint MinObjectParticipationConstraint(
51: final OWLClass s, final OWLObjectProperty p, final OWLClass o,
52: final int card) {
53: return new ObjectParticipationConstraintImpl(s, p, o, card, -1);
54: }
55:
56: @Override
57: public ObjectParticipationConstraint MaxObjectParticipationConstraint(
58: final OWLClass s, final OWLObjectProperty p, final OWLClass o,
59: final int card) {
60: return new ObjectParticipationConstraintImpl(s, p, o, 0, card);
61: }
62:
63: @Override
64: public ObjectParticipationConstraint ObjectParticipationConstraint(
65: final OWLClass s, final OWLObjectProperty p, final OWLClass o,
66: final int min, int max) {
67: return new ObjectParticipationConstraintImpl(s, p, o, min, max);
68: }
69:
70: @Override
71: public ObjectDomainConstraint ObjectPropertyDomainConstraint(
72: final OWLObjectProperty p, final OWLClass s) {
73: return new ObjectDomainConstraintImpl(p, s);
74: }
75:
76: @Override
77: public ObjectRangeConstraint ObjectPropertyRangeConstraint(
78: final OWLClass subj, final OWLObjectProperty p, final OWLClass s) {
79: return new ObjectRangeConstraintImpl(subj, p, s);
80: }
81:
82: @Override
83: public DataDomainConstraint DataPropertyDomainConstraint(
84: final OWLDataProperty p, final OWLClass s) {
85: return new DataDomainConstraintImpl(p, s);
86: }
87:
88: @Override
89: public DataRangeConstraint DataPropertyRangeConstraint(
90: final OWLClass subj, final OWLDataProperty p, final OWLDatatype s) {
91: return new DataRangeConstraintImpl(subj, p, s);
92: }
93: }