Debian Codegraph @

Source/Reasoner/Ontology/CDatatype.cpp

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #include "CDatatype.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Ontology {
29
30 CDatatype::CDatatype() {
31 initDatatype(QString(),false);
32 }
33
34 CDatatype* CDatatype::initDatatype(const QString& datatypeIRI, bool basic) {
35 setDatatypeTag(0);
36 mDatatypeIRI = datatypeIRI;
37 mBasicDatatype = basic;
38 mDatatpyeBasic = nullptr;
39 mDatatypeConcept = nullptr;
40 mDefinitionConcept = nullptr;
41 mValueSpaceType = nullptr;
42 mNormalized = false;
43 mBasicDatatpyeType = DBT_NON;
44 mDatatpyeType = DT_NON;
45 return this;
46 }
47
48 CDatatype* CDatatype::initDatatype(const QString& datatypeIRI, cint64 datatypeTag, bool basic) {
49 initDatatype(datatypeIRI,basic);
50 setDatatypeTag(datatypeTag);
51 mDatatypeConcept = nullptr;
52 mDefinitionConcept = nullptr;
53 mValueSpaceType = nullptr;
54 mNormalized = false;
55 mBasicDatatpyeType = DBT_NON;
56 mDatatpyeType = DT_NON;
57 return this;
58 }
59
60
61 CDatatype::DATATYPE_BASIC_TYPE CDatatype::getBasicDatatypeType() {
62 return mBasicDatatpyeType;
63 }
64
65 CDatatype* CDatatype::setBasicDatatypeType(CDatatype::DATATYPE_BASIC_TYPE basicDatatpyeType) {
66 mBasicDatatpyeType = basicDatatpyeType;
67 return this;
68 }
69
70 CDatatype::DATATYPE_TYPE CDatatype::getDatatypeType() {
71 return mDatatpyeType;
72 }
73
74 CDatatype* CDatatype::setDatatypeType(CDatatype::DATATYPE_TYPE datatpyeType) {
75 mDatatpyeType = datatpyeType;
76 return this;
77 }
78
79 CDatatype* CDatatype::setDatatypeTag(qint64 datatypeTag) {
80 CTagItem::setTag(datatypeTag);
81 return this;
82 }
83
84 cint64 CDatatype::getDatatypeTag() const {
85 return CTagItem::getTag();
86 }
87
88 bool CDatatype::isBasicDatatype() {
89 return mBasicDatatype;
90 }
91
92 CDatatype* CDatatype::setBasicDatatype(bool basic) {
93 mBasicDatatype = basic;
94 return this;
95 }
96
97
98 CDatatype* CDatatype::getBasicDatatype() {
99 return mDatatpyeBasic;
100 }
101
102 CDatatype* CDatatype::setBasicDatatype(CDatatype* basicDatatpye) {
103 mDatatpyeBasic = basicDatatpye;
104 return this;
105 }
106
107
108 const QString& CDatatype::getDatatypeIRI() {
109 return mDatatypeIRI;
110 }
111
112 CConcept* CDatatype::getDatatypeConcept() {
113 return mDatatypeConcept;
114 }
115
116 bool CDatatype::hasDatatypeConcept() {
117 return mDatatypeConcept != nullptr;
118 }
119
120 CDatatype* CDatatype::setDatatypeConcept(CConcept* concept) {
121 mDatatypeConcept = concept;
122 return this;
123 }
124
125
126 CDatatypeValueSpaceType* CDatatype::getValueSpaceType() {
127 return mValueSpaceType;
128 }
129
130 CDatatype* CDatatype::setValueSpaceType(CDatatypeValueSpaceType* valueSpaceType) {
131 mValueSpaceType = valueSpaceType;
132 return this;
133 }
134
135 CConcept* CDatatype::getDefinitionConcept() {
136 return mDefinitionConcept;
137 }
138
139 CDatatype* CDatatype::setDefinitionConcept(CConcept* concept) {
140 mDefinitionConcept = concept;
141 return this;
142 }
143
144
145 bool CDatatype::isNormalized() {
146 return mNormalized;
147 }
148
149 CDatatype* CDatatype::setNormalized(bool normalized) {
150 mNormalized = normalized;
151 return this;
152 }
153
154
155
156 }; // end namespace Ontology
157
158 }; // end namespace Reasoner
159
160 }; // end namespace Konclude