| 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 |
#ifdef KONCLUDE_COMPILE_JNI_INTERFACE |
| 22 |
|
| 23 |
|
| 24 |
#include <jni.h> |
| 25 |
|
| 26 |
|
| 27 |
#include "Control/Interface/JNI/JNISettings.h" |
| 28 |
#include "Control/Interface/JNI/com_konclude_jnibridge_AxiomExpressionBuildingBridge.h" |
| 29 |
#include "Control/Interface/JNI/CJNIInstanceManager.h" |
| 30 |
#include "Control/Interface/JNI/CJNIEntityMappingHash.h" |
| 31 |
#include "Control/Interface/JNI/CJNIAxiomExpressionVisitingLoader.h" |
| 32 |
#include "Control/Interface/JNI/CJNIHandler.h" |
| 33 |
#include "Control/Interface/JNI/CJNIQueryProcessor.h" |
| 34 |
|
| 35 |
|
| 36 |
#include "Parser/ParserSettings.h" |
| 37 |
|
| 38 |
#include "Utilities/UtilitiesSettings.h" |
| 39 |
#include "Utilities/Container/CQtList.h" |
| 40 |
#include "Utilities/Container/ContainerSettings.h" |
| 41 |
|
| 42 |
|
| 43 |
#include "Parser/Expressions/CBuildExpression.h" |
| 44 |
|
| 45 |
using namespace Konclude::Utilities; |
| 46 |
using namespace Konclude::Utilities::Container; |
| 47 |
using namespace Konclude::Parser; |
| 48 |
using namespace Konclude::Parser::Expression; |
| 49 |
using namespace Konclude::Control::Interface::JNI; |
| 50 |
|
| 51 |
|
| 52 |
#define JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, CODE) \ |
| 53 |
CJNIInstanceManager* jniInstanceManager = CJNIHandler::getJNIInstanceManager(jenv,bridgeObj); \ |
| 54 |
if (jniInstanceManager) { \ |
| 55 |
CJNIAxiomExpressionVisitingLoader* builder = jniInstanceManager->getJNIHandler()->getAxiomExpressionBuildingBridgeNativeData(jenv,builderObj); \ |
| 56 |
if (builder) { \ |
| 57 |
CJNIHandler* jniHandler = jniInstanceManager->getJNIHandler(); \ |
| 58 |
CODE \ |
| 59 |
} \ |
| 60 |
} |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLClass(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jstring string, jobject classObj) { |
| 65 |
CBuildExpression* expression = nullptr; |
| 66 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 67 |
expression = builder->getClass(jniHandler->getString(jenv,string)); |
| 68 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 69 |
if (!mappingHash->getMappedObject(expression)) { |
| 70 |
//LOG(INFO,"::Konclude::Main",logTr("Building class '%1' at address '%2'.").arg(jniHandler->getString(jenv,string)).arg((long)expression),0); |
| 71 |
classObj = jenv->NewGlobalRef(classObj); |
| 72 |
mappingHash->inserObjectMapping(expression,classObj); |
| 73 |
} |
| 74 |
) |
| 75 |
return (jlong)expression; |
| 76 |
} |
| 77 |
|
| 78 |
|
| 79 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectProperty(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jstring string, jobject propertyObj) { |
| 80 |
CBuildExpression* expression = nullptr; |
| 81 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 82 |
expression = builder->getObjectProberty(jniHandler->getString(jenv,string)); |
| 83 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 84 |
if (!mappingHash->getMappedObject(expression)) { |
| 85 |
propertyObj = jenv->NewGlobalRef(propertyObj); |
| 86 |
mappingHash->inserObjectMapping(expression,propertyObj); |
| 87 |
} |
| 88 |
) |
| 89 |
return (jlong)expression; |
| 90 |
} |
| 91 |
|
| 92 |
|
| 93 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLNamedIndividual(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jstring string, jobject namedIndi) { |
| 94 |
CBuildExpression* expression = nullptr; |
| 95 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 96 |
expression = builder->getNamedIndividual(jniHandler->getString(jenv,string)); |
| 97 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 98 |
if (!mappingHash->getMappedObject(expression)) { |
| 99 |
namedIndi = jenv->NewGlobalRef(namedIndi); |
| 100 |
mappingHash->inserObjectMapping(expression,namedIndi); |
| 101 |
} |
| 102 |
) |
| 103 |
return (jlong)expression; |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLAnonymousIndividual(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jstring string, jobject namedIndi) { |
| 108 |
CBuildExpression* expression = nullptr; |
| 109 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 110 |
expression = builder->getAnonymousIndividual("",jniHandler->getString(jenv,string)); |
| 111 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 112 |
if (!mappingHash->getMappedObject(expression)) { |
| 113 |
namedIndi = jenv->NewGlobalRef(namedIndi); |
| 114 |
mappingHash->inserObjectMapping(expression,namedIndi); |
| 115 |
} |
| 116 |
) |
| 117 |
return (jlong)expression; |
| 118 |
} |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
JNIEXPORT void JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_initArumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 130 |
CBuildExpression* expression = nullptr; |
| 131 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 132 |
builder->initArgumentExpressionList(); |
| 133 |
) |
| 134 |
} |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
JNIEXPORT void JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_closeArumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 139 |
CBuildExpression* expression = nullptr; |
| 140 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 141 |
builder->closeArgumentExpressionList(); |
| 142 |
) |
| 143 |
} |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
JNIEXPORT void JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_addArgument(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong argument) { |
| 148 |
CBuildExpression* expression = nullptr; |
| 149 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 150 |
builder->addArgumentExpression((CBuildExpression*)argument); |
| 151 |
) |
| 152 |
} |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectIntersectionFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 179 |
CBuildExpression* expression = nullptr; |
| 180 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 181 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 182 |
expression = builder->getObjectIntersectionOf(*expList); |
| 183 |
delete expList; |
| 184 |
) |
| 185 |
return (jlong)expression; |
| 186 |
} |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectUnionFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 191 |
CBuildExpression* expression = nullptr; |
| 192 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 193 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 194 |
expression = builder->getObjectUnionOf(*expList); |
| 195 |
delete expList; |
| 196 |
) |
| 197 |
return (jlong)expression; |
| 198 |
} |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectComplement(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong compExp) { |
| 205 |
CBuildExpression* expression = nullptr; |
| 206 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 207 |
expression = builder->getObjectComplementOf((CBuildExpression*)compExp); |
| 208 |
) |
| 209 |
return (jlong)expression; |
| 210 |
} |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectSomeValuesFrom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong fillerExp) { |
| 215 |
CBuildExpression* expression = nullptr; |
| 216 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 217 |
expression = builder->getObjectSomeValuesFrom((CBuildExpression*)propExp,(CBuildExpression*)fillerExp); |
| 218 |
) |
| 219 |
return (jlong)expression; |
| 220 |
} |
| 221 |
|
| 222 |
|
| 223 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectAllValuesFrom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong fillerExp) { |
| 224 |
CBuildExpression* expression = nullptr; |
| 225 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 226 |
expression = builder->getObjectAllValuesFrom((CBuildExpression*)propExp,(CBuildExpression*)fillerExp); |
| 227 |
) |
| 228 |
return (jlong)expression; |
| 229 |
} |
| 230 |
|
| 231 |
|
| 232 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectInverseOf(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong invObjProp) { |
| 233 |
CBuildExpression* expression = nullptr; |
| 234 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 235 |
expression = builder->getInverseObjectPropertyOf((CBuildExpression*)invObjProp); |
| 236 |
) |
| 237 |
return (jlong)expression; |
| 238 |
} |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectOneOfFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 245 |
CBuildExpression* expression = nullptr; |
| 246 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 247 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 248 |
expression = builder->getObjectOneOf(*expList); |
| 249 |
delete expList; |
| 250 |
) |
| 251 |
return (jlong)expression; |
| 252 |
} |
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectHasSelf(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 257 |
CBuildExpression* expression = nullptr; |
| 258 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 259 |
expression = builder->getObjectHasSelf((CBuildExpression*)propertyExp); |
| 260 |
) |
| 261 |
return (jlong)expression; |
| 262 |
} |
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLExactCardinality(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp, jlong classExp, jlong cardinality) { |
| 267 |
CBuildExpression* expression = nullptr; |
| 268 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 269 |
expression = builder->getObjectExactlyCardinality((CBuildExpression*)propertyExp,(CBuildExpression*)classExp,(int)cardinality); |
| 270 |
) |
| 271 |
return (jlong)expression; |
| 272 |
} |
| 273 |
|
| 274 |
|
| 275 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLMaxCardinality(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp, jlong classExp, jlong cardinality) { |
| 276 |
CBuildExpression* expression = nullptr; |
| 277 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 278 |
expression = builder->getObjectMaxCardinality((CBuildExpression*)propertyExp,(CBuildExpression*)classExp,(int)cardinality); |
| 279 |
) |
| 280 |
return (jlong)expression; |
| 281 |
} |
| 282 |
|
| 283 |
|
| 284 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLMinCardinality(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp, jlong classExp, jlong cardinality) { |
| 285 |
CBuildExpression* expression = nullptr; |
| 286 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 287 |
expression = builder->getObjectMinCardinality((CBuildExpression*)propertyExp,(CBuildExpression*)classExp,(int)cardinality); |
| 288 |
) |
| 289 |
return (jlong)expression; |
| 290 |
} |
| 291 |
|
| 292 |
|
| 293 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectHasValue(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong fillerExp) { |
| 294 |
CBuildExpression* expression = nullptr; |
| 295 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 296 |
expression = builder->getObjectHasValue((CBuildExpression*)propExp,(CBuildExpression*)fillerExp); |
| 297 |
) |
| 298 |
return (jlong)expression; |
| 299 |
} |
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLSubClassOfAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong subClassExp, jlong superClassExp) { |
| 315 |
CBuildExpression* expression = nullptr; |
| 316 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 317 |
expression = builder->getSubClassOf((CBuildExpression*)subClassExp,(CBuildExpression*)superClassExp); |
| 318 |
//LOG(INFO,"::Konclude::Main",logTr("Building and adding OWLSubClassAxiom with '%1' and '%2'.").arg((long)subClassExp).arg((long)superClassExp),0); |
| 319 |
if (expression) { |
| 320 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 321 |
} |
| 322 |
) |
| 323 |
return (jlong)expression; |
| 324 |
} |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLEquivalentClassesFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 330 |
CBuildExpression* expression = nullptr; |
| 331 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 332 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 333 |
expression = builder->getEquivalentClasses(*expList); |
| 334 |
delete expList; |
| 335 |
if (expression) { |
| 336 |
//LOG(INFO,"::Konclude::Main",logTr("Building and adding OWLEquivalentClassesAxiom."),0); |
| 337 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 338 |
} |
| 339 |
) |
| 340 |
return (jlong)expression; |
| 341 |
} |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLSubObjectPropertyOfAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong subPropertyExp, jlong superPropertyExp) { |
| 348 |
CBuildExpression* expression = nullptr; |
| 349 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 350 |
expression = builder->getSubObjectPropertyOf((CBuildExpression*)subPropertyExp,(CBuildExpression*)superPropertyExp); |
| 351 |
if (expression) { |
| 352 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 353 |
} |
| 354 |
) |
| 355 |
return (jlong)expression; |
| 356 |
} |
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLEquivalentObjectPropertiesFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 362 |
CBuildExpression* expression = nullptr; |
| 363 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 364 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 365 |
expression = builder->getEquivalentObjectProperties(*expList); |
| 366 |
delete expList; |
| 367 |
if (expression) { |
| 368 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 369 |
} |
| 370 |
) |
| 371 |
return (jlong)expression; |
| 372 |
} |
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLSubPropertyChainOfAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong superProperty) { |
| 377 |
CBuildExpression* expression = nullptr; |
| 378 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 379 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 380 |
CEXPRESSIONLIST<CObjectPropertyTermExpression*>* propExpList = (CEXPRESSIONLIST<CObjectPropertyTermExpression*>*)expList; |
| 381 |
expression = builder->getSubObjectPropertyOf(*propExpList,(CObjectPropertyTermExpression*)superProperty); |
| 382 |
delete expList; |
| 383 |
if (expression) { |
| 384 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 385 |
} |
| 386 |
) |
| 387 |
return (jlong)expression; |
| 388 |
} |
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLInverseFunctionalObjectPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 398 |
CBuildExpression* expression = nullptr; |
| 399 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 400 |
expression = builder->getInverseFunctionalObjectProperty((CBuildExpression*)propertyExp); |
| 401 |
if (expression) { |
| 402 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 403 |
} |
| 404 |
) |
| 405 |
return (jlong)expression; |
| 406 |
} |
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLInverseObjectPropertiesAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp, jlong invPropertyExp) { |
| 412 |
CBuildExpression* expression = nullptr; |
| 413 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 414 |
expression = builder->getInverseObjectProperties((CBuildExpression*)propertyExp,(CBuildExpression*)invPropertyExp); |
| 415 |
if (expression) { |
| 416 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 417 |
} |
| 418 |
) |
| 419 |
return (jlong)expression; |
| 420 |
} |
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLSameIndividualAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 428 |
CBuildExpression* expression = nullptr; |
| 429 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 430 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 431 |
expression = builder->getSameIndividual(*expList); |
| 432 |
delete expList; |
| 433 |
if (expression) { |
| 434 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 435 |
} |
| 436 |
) |
| 437 |
return (jlong)expression; |
| 438 |
} |
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLIrreflexiveObjectPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 444 |
CBuildExpression* expression = nullptr; |
| 445 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 446 |
expression = builder->getIrreflexiveObjectProperty((CBuildExpression*)propertyExp); |
| 447 |
if (expression) { |
| 448 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 449 |
} |
| 450 |
) |
| 451 |
return (jlong)expression; |
| 452 |
} |
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
|
| 457 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLTransitiveObjectPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 458 |
CBuildExpression* expression = nullptr; |
| 459 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 460 |
expression = builder->getTransetiveObjectProperty((CBuildExpression*)propertyExp); |
| 461 |
if (expression) { |
| 462 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 463 |
} |
| 464 |
) |
| 465 |
return (jlong)expression; |
| 466 |
} |
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLClassAssertionAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong classExp, jlong indiExp) { |
| 471 |
CBuildExpression* expression = nullptr; |
| 472 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 473 |
expression = builder->getClassAssertion((CBuildExpression*)classExp,(CBuildExpression*)indiExp); |
| 474 |
if (expression) { |
| 475 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 476 |
} |
| 477 |
) |
| 478 |
return (jlong)expression; |
| 479 |
} |
| 480 |
|
| 481 |
|
| 482 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLSymmetricObjectPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 483 |
CBuildExpression* expression = nullptr; |
| 484 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 485 |
expression = builder->getSymmetricObjectProperty((CBuildExpression*)propertyExp); |
| 486 |
if (expression) { |
| 487 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 488 |
} |
| 489 |
) |
| 490 |
return (jlong)expression; |
| 491 |
} |
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDeclarationAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong entityExp) { |
| 497 |
CBuildExpression* expression = nullptr; |
| 498 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 499 |
expression = builder->getDeclaration((CBuildExpression*)entityExp); |
| 500 |
if (expression) { |
| 501 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 502 |
} |
| 503 |
) |
| 504 |
return (jlong)expression; |
| 505 |
} |
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDisjointUnionAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong classExp) { |
| 512 |
CBuildExpression* expression = nullptr; |
| 513 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 514 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 515 |
CEXPRESSIONLIST<CClassTermExpression*>* classExpList = (CEXPRESSIONLIST<CClassTermExpression*>*)expList; |
| 516 |
expression = builder->getDisjointUnion((CClassExpression*)classExp,*classExpList); |
| 517 |
delete expList; |
| 518 |
if (expression) { |
| 519 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 520 |
} |
| 521 |
) |
| 522 |
return (jlong)expression; |
| 523 |
} |
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLFunctionalObjectPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 529 |
CBuildExpression* expression = nullptr; |
| 530 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 531 |
expression = builder->getFunctionalObjectProperty((CBuildExpression*)propertyExp); |
| 532 |
if (expression) { |
| 533 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 534 |
} |
| 535 |
) |
| 536 |
return (jlong)expression; |
| 537 |
} |
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLNegativeObjectPropertyAssertionAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong indi1Exp, jlong indi2Exp) { |
| 544 |
CBuildExpression* expression = nullptr; |
| 545 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 546 |
expression = builder->getNegativeObjectPropertyAssertion((CBuildExpression*)propExp,(CBuildExpression*)indi1Exp,(CBuildExpression*)indi2Exp); |
| 547 |
if (expression) { |
| 548 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 549 |
} |
| 550 |
) |
| 551 |
return (jlong)expression; |
| 552 |
} |
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectPropertyAssertionAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong indi1Exp, jlong indi2Exp) { |
| 559 |
CBuildExpression* expression = nullptr; |
| 560 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 561 |
expression = builder->getObjectPropertyAssertion((CBuildExpression*)propExp,(CBuildExpression*)indi1Exp,(CBuildExpression*)indi2Exp); |
| 562 |
if (expression) { |
| 563 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 564 |
} |
| 565 |
) |
| 566 |
return (jlong)expression; |
| 567 |
} |
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectPropertyRangeAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong classExp) { |
| 572 |
CBuildExpression* expression = nullptr; |
| 573 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 574 |
expression = builder->getObjectPropertyRangeExpression((CBuildExpression*)propExp,(CBuildExpression*)classExp); |
| 575 |
if (expression) { |
| 576 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 577 |
} |
| 578 |
) |
| 579 |
return (jlong)expression; |
| 580 |
} |
| 581 |
|
| 582 |
|
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDisjointObjectPropertiesAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 587 |
CBuildExpression* expression = nullptr; |
| 588 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 589 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 590 |
expression = builder->getDisjointObjectProperties(*expList); |
| 591 |
delete expList; |
| 592 |
if (expression) { |
| 593 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 594 |
} |
| 595 |
) |
| 596 |
return (jlong)expression; |
| 597 |
} |
| 598 |
|
| 599 |
|
| 600 |
|
| 601 |
|
| 602 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDifferentIndividualsAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 603 |
CBuildExpression* expression = nullptr; |
| 604 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 605 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 606 |
expression = builder->getDifferentIndividuals(*expList); |
| 607 |
delete expList; |
| 608 |
if (expression) { |
| 609 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 610 |
} |
| 611 |
) |
| 612 |
return (jlong)expression; |
| 613 |
} |
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLObjectPropertyDomainAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong classExp) { |
| 618 |
CBuildExpression* expression = nullptr; |
| 619 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 620 |
expression = builder->getObjectPropertyDomainExpression((CBuildExpression*)propExp,(CBuildExpression*)classExp); |
| 621 |
if (expression) { |
| 622 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 623 |
} |
| 624 |
) |
| 625 |
return (jlong)expression; |
| 626 |
} |
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDisjointClassesAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 631 |
CBuildExpression* expression = nullptr; |
| 632 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 633 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 634 |
expression = builder->getDisjointClasses(*expList); |
| 635 |
delete expList; |
| 636 |
if (expression) { |
| 637 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 638 |
} |
| 639 |
) |
| 640 |
return (jlong)expression; |
| 641 |
} |
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLReflexiveObjectPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 646 |
CBuildExpression* expression = nullptr; |
| 647 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 648 |
expression = builder->getReflexiveObjectProperty((CBuildExpression*)propertyExp); |
| 649 |
if (expression) { |
| 650 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 651 |
} |
| 652 |
) |
| 653 |
return (jlong)expression; |
| 654 |
} |
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLAsymmetricObjectPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 659 |
CBuildExpression* expression = nullptr; |
| 660 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv,builderObj,bridgeObj, |
| 661 |
expression = builder->getAsymmetricObjectProperty((CBuildExpression*)propertyExp); |
| 662 |
if (expression) { |
| 663 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 664 |
} |
| 665 |
) |
| 666 |
return (jlong)expression; |
| 667 |
} |
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
|
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLLiteral(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong datatypeExp, jstring string, jobject literalObj) { |
| 679 |
CBuildExpression* expression = nullptr; |
| 680 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 681 |
CDataLexicalValueExpression* lexExpression = builder->getDataLexicalValue(jniHandler->getString(jenv, string)); |
| 682 |
expression = builder->getDataLiteral(lexExpression, (CDatatypeExpression*)datatypeExp); |
| 683 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 684 |
if (!mappingHash->getMappedObject(lexExpression)) { |
| 685 |
literalObj = jenv->NewGlobalRef(literalObj); |
| 686 |
mappingHash->inserObjectMapping(lexExpression, literalObj); |
| 687 |
} |
| 688 |
) |
| 689 |
return (jlong)expression; |
| 690 |
} |
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
|
| 695 |
|
| 696 |
|
| 697 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLFacetRestriction(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jstring facetString, jobject facetObject, jlong literal) { |
| 698 |
CBuildExpression* expression = nullptr; |
| 699 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 700 |
CDataFacetExpression* facetExpression = builder->getDataFacet(jniHandler->getString(jenv, facetString)); |
| 701 |
expression = builder->getDataFacetRestriction((CBuildExpression*)literal,facetExpression); |
| 702 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 703 |
if (!mappingHash->getMappedObject(facetExpression)) { |
| 704 |
facetObject = jenv->NewGlobalRef(facetObject); |
| 705 |
mappingHash->inserObjectMapping(facetExpression, facetObject); |
| 706 |
} |
| 707 |
) |
| 708 |
return (jlong)expression; |
| 709 |
} |
| 710 |
|
| 711 |
|
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataSomeValuesFrom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong fillerExp) { |
| 717 |
CBuildExpression* expression = nullptr; |
| 718 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 719 |
expression = builder->getDataSomeValuesFrom((CBuildExpression*)propExp, (CBuildExpression*)fillerExp); |
| 720 |
) |
| 721 |
return (jlong)expression; |
| 722 |
} |
| 723 |
|
| 724 |
|
| 725 |
|
| 726 |
|
| 727 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataAllValuesFrom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong fillerExp) { |
| 728 |
CBuildExpression* expression = nullptr; |
| 729 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 730 |
expression = builder->getDataAllValuesFrom((CBuildExpression*)propExp, (CBuildExpression*)fillerExp); |
| 731 |
) |
| 732 |
return (jlong)expression; |
| 733 |
} |
| 734 |
|
| 735 |
|
| 736 |
|
| 737 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataHasValue(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong fillerExp) { |
| 738 |
CBuildExpression* expression = nullptr; |
| 739 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 740 |
expression = builder->getDataHasValue((CBuildExpression*)propExp, (CBuildExpression*)fillerExp); |
| 741 |
) |
| 742 |
return (jlong)expression; |
| 743 |
} |
| 744 |
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataMinCardinality(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp, jlong classExp, jlong cardinality) { |
| 749 |
CBuildExpression* expression = nullptr; |
| 750 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 751 |
expression = builder->getDataMinCardinality((CBuildExpression*)propertyExp, (CBuildExpression*)classExp, (int)cardinality); |
| 752 |
) |
| 753 |
return (jlong)expression; |
| 754 |
} |
| 755 |
|
| 756 |
|
| 757 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataMaxCardinality(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp, jlong classExp, jlong cardinality) { |
| 758 |
CBuildExpression* expression = nullptr; |
| 759 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 760 |
expression = builder->getDataMaxCardinality((CBuildExpression*)propertyExp, (CBuildExpression*)classExp, (int)cardinality); |
| 761 |
) |
| 762 |
return (jlong)expression; |
| 763 |
} |
| 764 |
|
| 765 |
|
| 766 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataExactCardinality(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp, jlong classExp, jlong cardinality) { |
| 767 |
CBuildExpression* expression = nullptr; |
| 768 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 769 |
expression = builder->getDataExactCardinality((CBuildExpression*)propertyExp, (CBuildExpression*)classExp, (int)cardinality); |
| 770 |
) |
| 771 |
return (jlong)expression; |
| 772 |
} |
| 773 |
|
| 774 |
|
| 775 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataProperty(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jstring string, jobject propertyObj) { |
| 776 |
CBuildExpression* expression = nullptr; |
| 777 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 778 |
expression = builder->getDataProberty(jniHandler->getString(jenv, string)); |
| 779 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 780 |
if (!mappingHash->getMappedObject(expression)) { |
| 781 |
propertyObj = jenv->NewGlobalRef(propertyObj); |
| 782 |
mappingHash->inserObjectMapping(expression, propertyObj); |
| 783 |
} |
| 784 |
) |
| 785 |
return (jlong)expression; |
| 786 |
} |
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataPropertyDomainAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong classExp) { |
| 791 |
CBuildExpression* expression = nullptr; |
| 792 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 793 |
expression = builder->getDataPropertyDomainExpression((CBuildExpression*)propExp, (CBuildExpression*)classExp); |
| 794 |
if (expression) { |
| 795 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 796 |
} |
| 797 |
) |
| 798 |
return (jlong)expression; |
| 799 |
} |
| 800 |
|
| 801 |
|
| 802 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataPropertyRangeAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong dataExp) { |
| 803 |
CBuildExpression* expression = nullptr; |
| 804 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 805 |
expression = builder->getDataPropertyRangeExpression((CBuildExpression*)propExp, (CBuildExpression*)dataExp); |
| 806 |
if (expression) { |
| 807 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 808 |
} |
| 809 |
) |
| 810 |
return (jlong)expression; |
| 811 |
} |
| 812 |
|
| 813 |
|
| 814 |
|
| 815 |
|
| 816 |
|
| 817 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLNegativeDataPropertyAssertionAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong indiExp, jlong dataExp) { |
| 818 |
CBuildExpression* expression = nullptr; |
| 819 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 820 |
expression = builder->getNegativeDataPropertyAssertion((CBuildExpression*)propExp, (CBuildExpression*)indiExp, (CBuildExpression*)dataExp); |
| 821 |
if (expression) { |
| 822 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 823 |
} |
| 824 |
) |
| 825 |
return (jlong)expression; |
| 826 |
} |
| 827 |
|
| 828 |
|
| 829 |
|
| 830 |
|
| 831 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataPropertyAssertionAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propExp, jlong indiExp, jlong dataExp) { |
| 832 |
CBuildExpression* expression = nullptr; |
| 833 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 834 |
expression = builder->getDataPropertyAssertion((CBuildExpression*)propExp, (CBuildExpression*)indiExp, (CBuildExpression*)dataExp); |
| 835 |
if (expression) { |
| 836 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 837 |
} |
| 838 |
) |
| 839 |
return (jlong)expression; |
| 840 |
} |
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
|
| 846 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDisjointDataPropertiesAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 847 |
CBuildExpression* expression = nullptr; |
| 848 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 849 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 850 |
expression = builder->getDisjointDataProperties(*expList); |
| 851 |
delete expList; |
| 852 |
if (expression) { |
| 853 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 854 |
} |
| 855 |
) |
| 856 |
return (jlong)expression; |
| 857 |
} |
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLFunctionalDataPropertyAxiom(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong propertyExp) { |
| 863 |
CBuildExpression* expression = nullptr; |
| 864 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 865 |
expression = builder->getFunctionalDataProperty((CBuildExpression*)propertyExp); |
| 866 |
if (expression) { |
| 867 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 868 |
} |
| 869 |
) |
| 870 |
return (jlong)expression; |
| 871 |
} |
| 872 |
|
| 873 |
|
| 874 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLEquivalentDataPropertiesAxiomFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 875 |
CBuildExpression* expression = nullptr; |
| 876 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 877 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 878 |
expression = builder->getEquivalentDataProperties(*expList); |
| 879 |
delete expList; |
| 880 |
if (expression) { |
| 881 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 882 |
} |
| 883 |
) |
| 884 |
return (jlong)expression; |
| 885 |
} |
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDatatype(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jstring string, jobject datatypeObj) { |
| 890 |
CBuildExpression* expression = nullptr; |
| 891 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 892 |
expression = builder->getDatatype(jniHandler->getString(jenv, string)); |
| 893 |
CJNIEntityMappingHash* mappingHash = builder->getOntologyRevisionData()->getEntityMappingHash(); |
| 894 |
if (!mappingHash->getMappedObject(expression)) { |
| 895 |
datatypeObj = jenv->NewGlobalRef(datatypeObj); |
| 896 |
mappingHash->inserObjectMapping(expression, datatypeObj); |
| 897 |
} |
| 898 |
) |
| 899 |
return (jlong)expression; |
| 900 |
} |
| 901 |
|
| 902 |
|
| 903 |
|
| 904 |
|
| 905 |
|
| 906 |
|
| 907 |
|
| 908 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataOneOfFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 909 |
CBuildExpression* expression = nullptr; |
| 910 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 911 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 912 |
expression = builder->getDataOneOf(*expList); |
| 913 |
delete expList; |
| 914 |
) |
| 915 |
return (jlong)expression; |
| 916 |
} |
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
|
| 921 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataComplementOf(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong compExp) { |
| 922 |
CBuildExpression* expression = nullptr; |
| 923 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 924 |
expression = builder->getDataComplementOf((CBuildExpression*)compExp); |
| 925 |
) |
| 926 |
return (jlong)expression; |
| 927 |
} |
| 928 |
|
| 929 |
|
| 930 |
|
| 931 |
|
| 932 |
|
| 933 |
|
| 934 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataIntersectionOfFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 935 |
CBuildExpression* expression = nullptr; |
| 936 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 937 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 938 |
expression = builder->getDataIntersectionOf(*expList); |
| 939 |
delete expList; |
| 940 |
) |
| 941 |
return (jlong)expression; |
| 942 |
} |
| 943 |
|
| 944 |
|
| 945 |
|
| 946 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataUnionOfFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj) { |
| 947 |
CBuildExpression* expression = nullptr; |
| 948 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 949 |
CEXPRESSIONLIST<CBuildExpression*>* expList = builder->popArgumentExpressionList(); |
| 950 |
expression = builder->getDataUnionOf(*expList); |
| 951 |
delete expList; |
| 952 |
) |
| 953 |
return (jlong)expression; |
| 954 |
} |
| 955 |
|
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDataUnionOfFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong datatype) { |
| 960 |
CBuildExpression* expression = nullptr; |
| 961 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 962 |
CEXPRESSIONLIST<CDataFacetRestrictionExpression*>* expList = (CEXPRESSIONLIST<CDataFacetRestrictionExpression*>*)builder->popArgumentExpressionList(); |
| 963 |
expression = builder->getDatatypeRestriction((CDatatypeExpression*)datatype,*expList); |
| 964 |
delete expList; |
| 965 |
) |
| 966 |
return (jlong)expression; |
| 967 |
} |
| 968 |
|
| 969 |
|
| 970 |
|
| 971 |
|
| 972 |
|
| 973 |
JNIEXPORT jlong JNICALL Java_com_konclude_jnibridge_AxiomExpressionBuildingBridge_buildOWLDatatypeRestrictionFromArgumentList(JNIEnv * jenv, jobject builderObj, jobject bridgeObj, jlong subPropertyExp, jlong superPropertyExp) { |
| 974 |
CBuildExpression* expression = nullptr; |
| 975 |
JNIAXIOMEXPRESSIONBUILDINGBRDIGELOADER(jenv, builderObj, bridgeObj, |
| 976 |
expression = builder->getSubDataPropertyOf((CBuildExpression*)subPropertyExp, (CBuildExpression*)superPropertyExp); |
| 977 |
if (expression) { |
| 978 |
builder->tellOntologyAxiom((CAxiomExpression*)expression); |
| 979 |
} |
| 980 |
) |
| 981 |
return (jlong)expression; |
| 982 |
} |
| 983 |
|
| 984 |
|
| 985 |
|
| 986 |
#endif |