| 1 | package uk.ac.manchester.cs.factplusplus; |
| 2 | |
| 3 | import java.util.concurrent.atomic.AtomicBoolean; |
| 4 | |
| 5 | /** |
| 6 | * An interface to the native FaCT++ reasoner. Use of this class requires the |
| 7 | * FaCT++ JNI library for the appropriate platform. |
| 8 | * |
| 9 | * @author Matthew Horridge, The University Of Manchester, Medical Informatics |
| 10 | * Group, Date: 10-Jul-2006 */ |
| 11 | public class FaCTPlusPlus { |
| 12 | |
| 13 | /** The Constant initDone. */ |
| 14 | private static final AtomicBoolean initDone = new AtomicBoolean(false); |
| 15 | static { |
| 16 | if (!initDone.getAndSet(true)) { |
| 17 | // Load the FaCT++ JNI library |
| 18 | String jniPath = System.getProperty("factpp.jni.path", "nope"); |
| 19 | if (jniPath.equals("nope")) { |
| 20 | System.loadLibrary("FaCTPlusPlusJNI"); |
| 21 | } else { |
| 22 | System.load(jniPath); |
| 23 | } |
| 24 | // init all the IDs used |
| 25 | initMethodsFieldsIDs(); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Test. |
| 31 | * |
| 32 | * @return only ensure the native libraries are loaded |
| 33 | */ |
| 34 | public static final boolean test() { |
| 35 | // this is only useful to force the native library loading |
| 36 | return initDone.get(); |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Used to initialise methods and fields that will be used by the native |
| 41 | * implementation. |
| 42 | */ |
| 43 | private static native void initMethodsFieldsIDs(); |
| 44 | |
| 45 | /** Set internally on the native side - DO NOT ALTER!. */ |
| 46 | private long KernelId; |
| 47 | |
| 48 | /** |
| 49 | * Instantiates a new fa ct plus plus. |
| 50 | * |
| 51 | * @throws FaCTPlusPlusException |
| 52 | * fact exception |
| 53 | */ |
| 54 | public FaCTPlusPlus() throws FaCTPlusPlusException { |
| 55 | try { |
| 56 | initKernel(); |
| 57 | } catch (Exception e) { |
| 58 | throw new FaCTPlusPlusException(e); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Use this method to dispose of native resources. This method MUST be |
| 64 | * called when the reasoner is no longer required. Failure to call dispose, |
| 65 | * may result in memory leaks! |
| 66 | * |
| 67 | * @throws FaCTPlusPlusException |
| 68 | * fact exception |
| 69 | */ |
| 70 | public void dispose() throws FaCTPlusPlusException { |
| 71 | deleteKernel(); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Inits the kernel. |
| 76 | * |
| 77 | * @throws Exception |
| 78 | * the exception |
| 79 | */ |
| 80 | private native void initKernel() throws Exception; |
| 81 | |
| 82 | /** |
| 83 | * Delete kernel. |
| 84 | * |
| 85 | * @throws FaCTPlusPlusException |
| 86 | * the fa ct plus plus exception |
| 87 | */ |
| 88 | private native void deleteKernel() throws FaCTPlusPlusException; |
| 89 | |
| 90 | /** |
| 91 | * Clears told and any cached information from the kernel. |
| 92 | * |
| 93 | * @throws FaCTPlusPlusException |
| 94 | * fact exception |
| 95 | */ |
| 96 | public native void clearKernel() throws FaCTPlusPlusException; |
| 97 | |
| 98 | /** |
| 99 | * Set the names of Top/Bottom data and object properties. The call of this |
| 100 | * method automatically means that the OWL API v3 (and higher) is used. |
| 101 | * Without this call, Top/Bottom properties would not appear in the query |
| 102 | * results. |
| 103 | * |
| 104 | * @param topObjectName |
| 105 | * top object |
| 106 | * @param botObjectName |
| 107 | * bottom object |
| 108 | * @param topDataName |
| 109 | * top data |
| 110 | * @param botDataName |
| 111 | * bottom data |
| 112 | */ |
| 113 | public native void setTopBottomPropertyNames(String topObjectName, |
| 114 | String botObjectName, String topDataName, String botDataName); |
| 115 | |
| 116 | /** |
| 117 | * Causes the whole taxonomy to be computed. |
| 118 | * |
| 119 | * @throws FaCTPlusPlusException |
| 120 | * fact exception |
| 121 | */ |
| 122 | public native void classify() throws FaCTPlusPlusException; |
| 123 | |
| 124 | /** |
| 125 | * Causes all individual types to be computed. |
| 126 | * |
| 127 | * @throws FaCTPlusPlusException |
| 128 | * fact exception |
| 129 | */ |
| 130 | public native void realise() throws FaCTPlusPlusException; |
| 131 | |
| 132 | /** |
| 133 | * Checks if is realised. |
| 134 | * |
| 135 | * @return true iff the KB is realised |
| 136 | */ |
| 137 | public native boolean isRealised(); |
| 138 | |
| 139 | /** |
| 140 | * Gets the thing. |
| 141 | * |
| 142 | * @return Gets the class corresponding to TOP |
| 143 | * @throws FaCTPlusPlusException |
| 144 | * fact exception |
| 145 | */ |
| 146 | public native ClassPointer getThing() throws FaCTPlusPlusException; |
| 147 | |
| 148 | /** |
| 149 | * Gets the nothing. |
| 150 | * |
| 151 | * @return Gets the class corresponding to BOTTOM |
| 152 | * @throws FaCTPlusPlusException |
| 153 | * fact exception |
| 154 | */ |
| 155 | public native ClassPointer getNothing() throws FaCTPlusPlusException; |
| 156 | |
| 157 | /** |
| 158 | * Gets a pointer to a named class. |
| 159 | * |
| 160 | * @param name |
| 161 | * The name of the class. |
| 162 | * @return A <code>ClassPointer</code> |
| 163 | * @throws FaCTPlusPlusException |
| 164 | * fact exception |
| 165 | */ |
| 166 | public native ClassPointer getNamedClass(String name) |
| 167 | throws FaCTPlusPlusException; |
| 168 | |
| 169 | /** |
| 170 | * Gets the top object property. |
| 171 | * |
| 172 | * @return object property pointer |
| 173 | * @throws FaCTPlusPlusException |
| 174 | * fact exception |
| 175 | */ |
| 176 | public native ObjectPropertyPointer getTopObjectProperty() |
| 177 | throws FaCTPlusPlusException; |
| 178 | |
| 179 | /** |
| 180 | * Gets the bottom object property. |
| 181 | * |
| 182 | * @return object property pointer |
| 183 | * @throws FaCTPlusPlusException |
| 184 | * fact exception |
| 185 | */ |
| 186 | public native ObjectPropertyPointer getBottomObjectProperty() |
| 187 | throws FaCTPlusPlusException; |
| 188 | |
| 189 | /** |
| 190 | * Gets a pointer to an object property. |
| 191 | * |
| 192 | * @param name |
| 193 | * The name of the property. |
| 194 | * @return A pointer to the object property that has the specified name. |
| 195 | * @throws FaCTPlusPlusException |
| 196 | * fact exception |
| 197 | */ |
| 198 | public native ObjectPropertyPointer getObjectProperty(String name) |
| 199 | throws FaCTPlusPlusException; |
| 200 | |
| 201 | /** |
| 202 | * Gets the top data property. |
| 203 | * |
| 204 | * @return data property pointer |
| 205 | * @throws FaCTPlusPlusException |
| 206 | * fact exception |
| 207 | */ |
| 208 | public native DataPropertyPointer getTopDataProperty() |
| 209 | throws FaCTPlusPlusException; |
| 210 | |
| 211 | /** |
| 212 | * Gets the bottom data property. |
| 213 | * |
| 214 | * @return data property pointer |
| 215 | * @throws FaCTPlusPlusException |
| 216 | * fact exception |
| 217 | */ |
| 218 | public native DataPropertyPointer getBottomDataProperty() |
| 219 | throws FaCTPlusPlusException; |
| 220 | |
| 221 | /** |
| 222 | * Gets the data property. |
| 223 | * |
| 224 | * @param name |
| 225 | * the name |
| 226 | * @return data property pointer |
| 227 | * @throws FaCTPlusPlusException |
| 228 | * fact exception |
| 229 | */ |
| 230 | public native DataPropertyPointer getDataProperty(String name) |
| 231 | throws FaCTPlusPlusException; |
| 232 | |
| 233 | /** |
| 234 | * Gets the individual. |
| 235 | * |
| 236 | * @param name |
| 237 | * the name |
| 238 | * @return the individual |
| 239 | * @throws FaCTPlusPlusException |
| 240 | * fact exception |
| 241 | */ |
| 242 | public native IndividualPointer getIndividual(String name) |
| 243 | throws FaCTPlusPlusException; |
| 244 | |
| 245 | // ------------------------------------------------------------------------ |
| 246 | // Datatype stuff |
| 247 | // ------------------------------------------------------------------------ |
| 248 | /** |
| 249 | * Gets the data top. |
| 250 | * |
| 251 | * @return Gets the top data type. |
| 252 | * @throws FaCTPlusPlusException |
| 253 | * fact exception |
| 254 | */ |
| 255 | public native DataTypePointer getDataTop() throws FaCTPlusPlusException; |
| 256 | |
| 257 | /** |
| 258 | * Gets the built in data type. |
| 259 | * |
| 260 | * @param name |
| 261 | * The name of the datatype. e.g. string, int, float etc. |
| 262 | * @return Gets a pointer to a built in data type |
| 263 | * @throws FaCTPlusPlusException |
| 264 | * fact exception |
| 265 | */ |
| 266 | public native DataTypePointer getBuiltInDataType(String name) |
| 267 | throws FaCTPlusPlusException; |
| 268 | |
| 269 | /** |
| 270 | * Gets the data sub type. |
| 271 | * |
| 272 | * @param name |
| 273 | * The name to assign to the datatype |
| 274 | * @param datatypeExpression |
| 275 | * the datatype expression |
| 276 | * @return Assigns a name to a datatype expression |
| 277 | * @throws FaCTPlusPlusException |
| 278 | * fact exception |
| 279 | */ |
| 280 | public native DataTypeExpressionPointer getDataSubType(String name, |
| 281 | DataTypeExpressionPointer datatypeExpression) |
| 282 | throws FaCTPlusPlusException; |
| 283 | |
| 284 | /** |
| 285 | * Gets the data enumeration. |
| 286 | * |
| 287 | * @return Gets a data enumeration using previously added arguments |
| 288 | * (initArgList, addArg, closeArgList) |
| 289 | * @throws FaCTPlusPlusException |
| 290 | * fact exception |
| 291 | */ |
| 292 | public native DataTypeExpressionPointer getDataEnumeration() |
| 293 | throws FaCTPlusPlusException; |
| 294 | |
| 295 | /** |
| 296 | * Gets the restricted data type. |
| 297 | * |
| 298 | * @param d |
| 299 | * the d |
| 300 | * @param facet |
| 301 | * the facet |
| 302 | * @return the restricted data type |
| 303 | * @throws FaCTPlusPlusException |
| 304 | * fact exception |
| 305 | */ |
| 306 | public native DataTypeExpressionPointer getRestrictedDataType( |
| 307 | DataTypeExpressionPointer d, DataTypeFacet facet) |
| 308 | throws FaCTPlusPlusException; |
| 309 | |
| 310 | // ------------------------------------------------------------------------ |
| 311 | // Datatype facets |
| 312 | // ------------------------------------------------------------------------ |
| 313 | /** |
| 314 | * Gets the length. |
| 315 | * |
| 316 | * @param dv |
| 317 | * pointer |
| 318 | * @return facet |
| 319 | * @throws FaCTPlusPlusException |
| 320 | * fact exception |
| 321 | */ |
| 322 | public native DataTypeFacet getLength(DataValuePointer dv) |
| 323 | throws FaCTPlusPlusException; |
| 324 | |
| 325 | /** |
| 326 | * Gets the min length. |
| 327 | * |
| 328 | * @param dv |
| 329 | * pointer |
| 330 | * @return facet |
| 331 | * @throws FaCTPlusPlusException |
| 332 | * fact exception |
| 333 | */ |
| 334 | public native DataTypeFacet getMinLength(DataValuePointer dv) |
| 335 | throws FaCTPlusPlusException; |
| 336 | |
| 337 | /** |
| 338 | * Gets the max length. |
| 339 | * |
| 340 | * @param dv |
| 341 | * pointer |
| 342 | * @return facet |
| 343 | * @throws FaCTPlusPlusException |
| 344 | * fact exception |
| 345 | */ |
| 346 | public native DataTypeFacet getMaxLength(DataValuePointer dv) |
| 347 | throws FaCTPlusPlusException; |
| 348 | |
| 349 | /** |
| 350 | * Gets the pattern. |
| 351 | * |
| 352 | * @param dv |
| 353 | * pointer |
| 354 | * @return facet |
| 355 | * @throws FaCTPlusPlusException |
| 356 | * fact exception |
| 357 | */ |
| 358 | public native DataTypeFacet getPattern(DataValuePointer dv) |
| 359 | throws FaCTPlusPlusException; |
| 360 | |
| 361 | /** |
| 362 | * Gets the min exclusive facet. |
| 363 | * |
| 364 | * @param dv |
| 365 | * pointer |
| 366 | * @return facet |
| 367 | * @throws FaCTPlusPlusException |
| 368 | * fact exception |
| 369 | */ |
| 370 | public native DataTypeFacet getMinExclusiveFacet(DataValuePointer dv) |
| 371 | throws FaCTPlusPlusException; |
| 372 | |
| 373 | /** |
| 374 | * Gets the max exclusive facet. |
| 375 | * |
| 376 | * @param dv |
| 377 | * pointer |
| 378 | * @return facet |
| 379 | * @throws FaCTPlusPlusException |
| 380 | * fact exception |
| 381 | */ |
| 382 | public native DataTypeFacet getMaxExclusiveFacet(DataValuePointer dv) |
| 383 | throws FaCTPlusPlusException; |
| 384 | |
| 385 | /** |
| 386 | * Gets the min inclusive facet. |
| 387 | * |
| 388 | * @param dv |
| 389 | * pointer |
| 390 | * @return facet |
| 391 | * @throws FaCTPlusPlusException |
| 392 | * fact exception |
| 393 | */ |
| 394 | public native DataTypeFacet getMinInclusiveFacet(DataValuePointer dv) |
| 395 | throws FaCTPlusPlusException; |
| 396 | |
| 397 | /** |
| 398 | * Gets the max inclusive facet. |
| 399 | * |
| 400 | * @param dv |
| 401 | * pointer |
| 402 | * @return facet |
| 403 | * @throws FaCTPlusPlusException |
| 404 | * fact exception |
| 405 | */ |
| 406 | public native DataTypeFacet getMaxInclusiveFacet(DataValuePointer dv) |
| 407 | throws FaCTPlusPlusException; |
| 408 | |
| 409 | /** |
| 410 | * Gets the total digits facet. |
| 411 | * |
| 412 | * @param dv |
| 413 | * pointer |
| 414 | * @return facet |
| 415 | * @throws FaCTPlusPlusException |
| 416 | * fact exception |
| 417 | */ |
| 418 | public native DataTypeFacet getTotalDigitsFacet(DataValuePointer dv) |
| 419 | throws FaCTPlusPlusException; |
| 420 | |
| 421 | /** |
| 422 | * Gets the fraction digits facet. |
| 423 | * |
| 424 | * @param dv |
| 425 | * pointer |
| 426 | * @return facet |
| 427 | * @throws FaCTPlusPlusException |
| 428 | * fact exception |
| 429 | */ |
| 430 | public native DataTypeFacet getFractionDigitsFacet(DataValuePointer dv) |
| 431 | throws FaCTPlusPlusException; |
| 432 | |
| 433 | /** |
| 434 | * Gets the data not. |
| 435 | * |
| 436 | * @param d |
| 437 | * expression pointer |
| 438 | * @return facet |
| 439 | * @throws FaCTPlusPlusException |
| 440 | * fact exception |
| 441 | */ |
| 442 | public native DataTypeExpressionPointer getDataNot( |
| 443 | DataTypeExpressionPointer d) throws FaCTPlusPlusException; |
| 444 | |
| 445 | /** |
| 446 | * Gets the data intersection of. |
| 447 | * |
| 448 | * @return Gets a data intersection using previously added arguments |
| 449 | * (initArgList, addArg, closeArgList) |
| 450 | * @throws FaCTPlusPlusException |
| 451 | * fact exception |
| 452 | */ |
| 453 | public native DataTypeExpressionPointer getDataIntersectionOf() |
| 454 | throws FaCTPlusPlusException; |
| 455 | |
| 456 | /** |
| 457 | * Gets the data union of. |
| 458 | * |
| 459 | * @return Gets a data union using previously added arguments (initArgList, |
| 460 | * addArg, closeArgList) |
| 461 | * @throws FaCTPlusPlusException |
| 462 | * fact exception |
| 463 | */ |
| 464 | public native DataTypeExpressionPointer getDataUnionOf() |
| 465 | throws FaCTPlusPlusException; |
| 466 | |
| 467 | /** |
| 468 | * Gets the data value. |
| 469 | * |
| 470 | * @param literal |
| 471 | * the literal |
| 472 | * @param type |
| 473 | * the type |
| 474 | * @return the data value |
| 475 | * @throws FaCTPlusPlusException |
| 476 | * fact exception |
| 477 | */ |
| 478 | public native DataValuePointer getDataValue(String literal, |
| 479 | DataTypePointer type) throws FaCTPlusPlusException; |
| 480 | |
| 481 | // ------------------------------------------------------------------------ |
| 482 | // concept expressions |
| 483 | // ------------------------------------------------------------------------ |
| 484 | /** |
| 485 | * Gets the concept and. |
| 486 | * |
| 487 | * @return Gets an intersection whose operands are in the last closed arg |
| 488 | * list. |
| 489 | * @throws FaCTPlusPlusException |
| 490 | * fact exception |
| 491 | */ |
| 492 | public native ClassPointer getConceptAnd() throws FaCTPlusPlusException; |
| 493 | |
| 494 | /** |
| 495 | * Gets the concept or. |
| 496 | * |
| 497 | * @return Gets a union whose operands are in the last closed arg list. |
| 498 | * @throws FaCTPlusPlusException |
| 499 | * fact exception |
| 500 | */ |
| 501 | public native ClassPointer getConceptOr() throws FaCTPlusPlusException; |
| 502 | |
| 503 | /** |
| 504 | * Gets the concept not. |
| 505 | * |
| 506 | * @param c |
| 507 | * pointer |
| 508 | * @return translated class pointer |
| 509 | * @throws FaCTPlusPlusException |
| 510 | * fact exception |
| 511 | */ |
| 512 | public native ClassPointer getConceptNot(ClassPointer c) |
| 513 | throws FaCTPlusPlusException; |
| 514 | |
| 515 | /** |
| 516 | * Gets the object some. |
| 517 | * |
| 518 | * @param r |
| 519 | * pointer |
| 520 | * @param c |
| 521 | * pointer |
| 522 | * @return translated class pointer |
| 523 | * @throws FaCTPlusPlusException |
| 524 | * fact exception |
| 525 | */ |
| 526 | public native ClassPointer getObjectSome(ObjectPropertyPointer r, |
| 527 | ClassPointer c) throws FaCTPlusPlusException; |
| 528 | |
| 529 | /** |
| 530 | * Gets the object all. |
| 531 | * |
| 532 | * @param r |
| 533 | * pointer |
| 534 | * @param c |
| 535 | * pointer |
| 536 | * @return translated class pointer |
| 537 | * @throws FaCTPlusPlusException |
| 538 | * fact exception |
| 539 | */ |
| 540 | public native ClassPointer getObjectAll(ObjectPropertyPointer r, |
| 541 | ClassPointer c) throws FaCTPlusPlusException; |
| 542 | |
| 543 | /** |
| 544 | * Gets the object value. |
| 545 | * |
| 546 | * @param r |
| 547 | * pointer |
| 548 | * @param i |
| 549 | * individualpointer |
| 550 | * @return translated class pointer |
| 551 | * @throws FaCTPlusPlusException |
| 552 | * fact exception |
| 553 | */ |
| 554 | public native ClassPointer getObjectValue(ObjectPropertyPointer r, |
| 555 | IndividualPointer i) throws FaCTPlusPlusException; |
| 556 | |
| 557 | /** |
| 558 | * Gets the object at least. |
| 559 | * |
| 560 | * @param num |
| 561 | * the num |
| 562 | * @param r |
| 563 | * pointer |
| 564 | * @param c |
| 565 | * pointer |
| 566 | * @return translated class pointer |
| 567 | * @throws FaCTPlusPlusException |
| 568 | * fact exception |
| 569 | */ |
| 570 | public native ClassPointer getObjectAtLeast(int num, |
| 571 | ObjectPropertyPointer r, ClassPointer c) |
| 572 | throws FaCTPlusPlusException; |
| 573 | |
| 574 | /** |
| 575 | * Gets the object exact. |
| 576 | * |
| 577 | * @param num |
| 578 | * the num |
| 579 | * @param r |
| 580 | * pointer |
| 581 | * @param c |
| 582 | * pointer |
| 583 | * @return translated class pointer |
| 584 | * @throws FaCTPlusPlusException |
| 585 | * fact exception |
| 586 | */ |
| 587 | public native ClassPointer getObjectExact(int num, ObjectPropertyPointer r, |
| 588 | ClassPointer c) throws FaCTPlusPlusException; |
| 589 | |
| 590 | /** |
| 591 | * Gets the object at most. |
| 592 | * |
| 593 | * @param num |
| 594 | * the num |
| 595 | * @param r |
| 596 | * pointer |
| 597 | * @param c |
| 598 | * pointer |
| 599 | * @return translated class pointer |
| 600 | * @throws FaCTPlusPlusException |
| 601 | * fact exception |
| 602 | */ |
| 603 | public native ClassPointer getObjectAtMost(int num, |
| 604 | ObjectPropertyPointer r, ClassPointer c) |
| 605 | throws FaCTPlusPlusException; |
| 606 | |
| 607 | /** |
| 608 | * Gets the data some. |
| 609 | * |
| 610 | * @param r |
| 611 | * pointer |
| 612 | * @param d |
| 613 | * pointer |
| 614 | * @return translated class pointer |
| 615 | * @throws FaCTPlusPlusException |
| 616 | * fact exception |
| 617 | */ |
| 618 | public native ClassPointer getDataSome(DataPropertyPointer r, |
| 619 | DataTypeExpressionPointer d) throws FaCTPlusPlusException; |
| 620 | |
| 621 | /** |
| 622 | * Gets the data all. |
| 623 | * |
| 624 | * @param r |
| 625 | * pointer |
| 626 | * @param d |
| 627 | * pointer |
| 628 | * @return translated class pointer |
| 629 | * @throws FaCTPlusPlusException |
| 630 | * fact exception |
| 631 | */ |
| 632 | public native ClassPointer getDataAll(DataPropertyPointer r, |
| 633 | DataTypeExpressionPointer d) throws FaCTPlusPlusException; |
| 634 | |
| 635 | /** |
| 636 | * Gets the data value. |
| 637 | * |
| 638 | * @param r |
| 639 | * pointer |
| 640 | * @param d |
| 641 | * pointer |
| 642 | * @return translated class pointer |
| 643 | * @throws FaCTPlusPlusException |
| 644 | * fact exception |
| 645 | */ |
| 646 | public native ClassPointer getDataValue(DataPropertyPointer r, |
| 647 | DataValuePointer d) throws FaCTPlusPlusException; |
| 648 | |
| 649 | /** |
| 650 | * Gets the data at least. |
| 651 | * |
| 652 | * @param num |
| 653 | * the num |
| 654 | * @param r |
| 655 | * pointer |
| 656 | * @param d |
| 657 | * pointer |
| 658 | * @return translated class pointer |
| 659 | * @throws FaCTPlusPlusException |
| 660 | * fact exception |
| 661 | */ |
| 662 | public native ClassPointer getDataAtLeast(int num, DataPropertyPointer r, |
| 663 | DataTypeExpressionPointer d) throws FaCTPlusPlusException; |
| 664 | |
| 665 | /** |
| 666 | * Gets the data exact. |
| 667 | * |
| 668 | * @param num |
| 669 | * the num |
| 670 | * @param r |
| 671 | * pointer |
| 672 | * @param d |
| 673 | * pointer |
| 674 | * @return translated class pointer |
| 675 | * @throws FaCTPlusPlusException |
| 676 | * fact exception |
| 677 | */ |
| 678 | public native ClassPointer getDataExact(int num, DataPropertyPointer r, |
| 679 | DataTypeExpressionPointer d) throws FaCTPlusPlusException; |
| 680 | |
| 681 | /** |
| 682 | * Gets the data at most. |
| 683 | * |
| 684 | * @param num |
| 685 | * the num |
| 686 | * @param r |
| 687 | * pointer |
| 688 | * @param d |
| 689 | * pointer |
| 690 | * @return translated class pointer |
| 691 | * @throws FaCTPlusPlusException |
| 692 | * fact exception |
| 693 | */ |
| 694 | public native ClassPointer getDataAtMost(int num, DataPropertyPointer r, |
| 695 | DataTypeExpressionPointer d) throws FaCTPlusPlusException; |
| 696 | |
| 697 | /** |
| 698 | * Gets the inverse property. |
| 699 | * |
| 700 | * @param r |
| 701 | * pointer |
| 702 | * @return translated object property pointer |
| 703 | * @throws FaCTPlusPlusException |
| 704 | * fact exception |
| 705 | */ |
| 706 | public native ObjectPropertyPointer getInverseProperty( |
| 707 | ObjectPropertyPointer r) throws FaCTPlusPlusException; |
| 708 | |
| 709 | /** |
| 710 | * Gets the property composition. |
| 711 | * |
| 712 | * @return Gets a property chain whose properties are in the last closed arg |
| 713 | * list. |
| 714 | * @throws FaCTPlusPlusException |
| 715 | * fact exception |
| 716 | */ |
| 717 | public native ObjectPropertyPointer getPropertyComposition() |
| 718 | throws FaCTPlusPlusException; |
| 719 | |
| 720 | /** |
| 721 | * Gets the data property key. |
| 722 | * |
| 723 | * @return Gets a data key whose properties are in the last closed arg list. |
| 724 | * @throws FaCTPlusPlusException |
| 725 | * fact exception |
| 726 | */ |
| 727 | public native DataPropertyPointer getDataPropertyKey() |
| 728 | throws FaCTPlusPlusException; |
| 729 | |
| 730 | /** |
| 731 | * Gets the object property key. |
| 732 | * |
| 733 | * @return Gets an object key whose properties are in the last closed arg |
| 734 | * list. |
| 735 | * @throws FaCTPlusPlusException |
| 736 | * fact exception |
| 737 | */ |
| 738 | public native ObjectPropertyPointer getObjectPropertyKey() |
| 739 | throws FaCTPlusPlusException; |
| 740 | |
| 741 | /** |
| 742 | * Gets the one of. |
| 743 | * |
| 744 | * @return Gets an enumeration whose individuals are in the last closed arg |
| 745 | * list. |
| 746 | * @throws FaCTPlusPlusException |
| 747 | * fact exception |
| 748 | */ |
| 749 | public native ClassPointer getOneOf() throws FaCTPlusPlusException; |
| 750 | |
| 751 | /** |
| 752 | * Gets the self. |
| 753 | * |
| 754 | * @param r |
| 755 | * pointer |
| 756 | * @return translated object property pointer |
| 757 | * @throws FaCTPlusPlusException |
| 758 | * fact exception |
| 759 | */ |
| 760 | public native ClassPointer getSelf(ObjectPropertyPointer r) |
| 761 | throws FaCTPlusPlusException; |
| 762 | |
| 763 | // ------------------------------------------------------------------------ |
| 764 | // Axioms |
| 765 | // ------------------------------------------------------------------------ |
| 766 | /** |
| 767 | * Tell class declaration. |
| 768 | * |
| 769 | * @param c |
| 770 | * pointer |
| 771 | * @return translated axiom pointer |
| 772 | * @throws FaCTPlusPlusException |
| 773 | * fact exception |
| 774 | */ |
| 775 | public native AxiomPointer tellClassDeclaration(ClassPointer c) |
| 776 | throws FaCTPlusPlusException; |
| 777 | |
| 778 | /** |
| 779 | * Tell object property declaration. |
| 780 | * |
| 781 | * @param op |
| 782 | * pointer |
| 783 | * @return translated axiom pointer |
| 784 | * @throws FaCTPlusPlusException |
| 785 | * fact exception |
| 786 | */ |
| 787 | public native AxiomPointer tellObjectPropertyDeclaration( |
| 788 | ObjectPropertyPointer op) throws FaCTPlusPlusException; |
| 789 | |
| 790 | /** |
| 791 | * Tell data property declaration. |
| 792 | * |
| 793 | * @param dp |
| 794 | * pointer |
| 795 | * @return translated axiom pointer |
| 796 | * @throws FaCTPlusPlusException |
| 797 | * fact exception |
| 798 | */ |
| 799 | public native AxiomPointer tellDataPropertyDeclaration( |
| 800 | DataPropertyPointer dp) throws FaCTPlusPlusException; |
| 801 | |
| 802 | /** |
| 803 | * Tell individual declaration. |
| 804 | * |
| 805 | * @param ip |
| 806 | * pointer |
| 807 | * @return translated axiom pointer |
| 808 | * @throws FaCTPlusPlusException |
| 809 | * fact exception |
| 810 | */ |
| 811 | public native AxiomPointer tellIndividualDeclaration(IndividualPointer ip) |
| 812 | throws FaCTPlusPlusException; |
| 813 | |
| 814 | /** |
| 815 | * Tell datatype declaration. |
| 816 | * |
| 817 | * @param dp |
| 818 | * pointer |
| 819 | * @return translated axiom pointer |
| 820 | * @throws FaCTPlusPlusException |
| 821 | * fact exception |
| 822 | */ |
| 823 | public native AxiomPointer tellDatatypeDeclaration(DataTypePointer dp) |
| 824 | throws FaCTPlusPlusException; |
| 825 | |
| 826 | /** |
| 827 | * Tell sub class of. |
| 828 | * |
| 829 | * @param c |
| 830 | * pointer |
| 831 | * @param d |
| 832 | * pointer |
| 833 | * @return translated axiom pointer |
| 834 | * @throws FaCTPlusPlusException |
| 835 | * fact exception |
| 836 | */ |
| 837 | public native AxiomPointer tellSubClassOf(ClassPointer c, ClassPointer d) |
| 838 | throws FaCTPlusPlusException; |
| 839 | |
| 840 | /** |
| 841 | * Tell equivalent class. |
| 842 | * |
| 843 | * @return Tells an equivalent classes axiom, whose classes are in the last |
| 844 | * closed arg list. |
| 845 | * @throws FaCTPlusPlusException |
| 846 | * fact exception |
| 847 | */ |
| 848 | public native AxiomPointer tellEquivalentClass() |
| 849 | throws FaCTPlusPlusException; |
| 850 | |
| 851 | /** |
| 852 | * Tell disjoint classes. |
| 853 | * |
| 854 | * @return Tells a disjoint classes axiom, whose classes are in the last |
| 855 | * closed arg list. |
| 856 | * @throws FaCTPlusPlusException |
| 857 | * fact exception |
| 858 | */ |
| 859 | public native AxiomPointer tellDisjointClasses() |
| 860 | throws FaCTPlusPlusException; |
| 861 | |
| 862 | /** |
| 863 | * Tell disjoint union. |
| 864 | * |
| 865 | * @param cls |
| 866 | * pointer |
| 867 | * @return Tells a disjoint union axiom, where defined class in CLS and |
| 868 | * whose disjoint classes are in the last closed arg list. |
| 869 | * @throws FaCTPlusPlusException |
| 870 | * fact exception |
| 871 | */ |
| 872 | public native AxiomPointer tellDisjointUnion(ClassPointer cls) |
| 873 | throws FaCTPlusPlusException; |
| 874 | |
| 875 | /** |
| 876 | * Tell has key. |
| 877 | * |
| 878 | * @param cls |
| 879 | * pointer |
| 880 | * @param dataKey |
| 881 | * the data key |
| 882 | * @param objectKey |
| 883 | * the object key |
| 884 | * @return translated axiom pointer |
| 885 | * @throws FaCTPlusPlusException |
| 886 | * fact exception |
| 887 | */ |
| 888 | public native AxiomPointer tellHasKey(ClassPointer cls, |
| 889 | DataPropertyPointer dataKey, ObjectPropertyPointer objectKey) |
| 890 | throws FaCTPlusPlusException; |
| 891 | |
| 892 | /** |
| 893 | * Tell sub object properties. |
| 894 | * |
| 895 | * @param s |
| 896 | * pointer |
| 897 | * @param r |
| 898 | * pointer |
| 899 | * @return translated axiom pointer |
| 900 | * @throws FaCTPlusPlusException |
| 901 | * fact exception |
| 902 | */ |
| 903 | public native AxiomPointer tellSubObjectProperties(ObjectPropertyPointer s, |
| 904 | ObjectPropertyPointer r) throws FaCTPlusPlusException; |
| 905 | |
| 906 | /** |
| 907 | * Tell equivalent object properties. |
| 908 | * |
| 909 | * @return Tells an equivalent object properties axiom, whose properties are |
| 910 | * in the last closed arg list. |
| 911 | * @throws FaCTPlusPlusException |
| 912 | * fact exception |
| 913 | */ |
| 914 | public native AxiomPointer tellEquivalentObjectProperties() |
| 915 | throws FaCTPlusPlusException; |
| 916 | |
| 917 | /** |
| 918 | * Tell inverse properties. |
| 919 | * |
| 920 | * @param s |
| 921 | * pointer |
| 922 | * @param r |
| 923 | * pointer |
| 924 | * @return translated axiom pointer |
| 925 | * @throws FaCTPlusPlusException |
| 926 | * fact exception |
| 927 | */ |
| 928 | public native AxiomPointer tellInverseProperties(ObjectPropertyPointer s, |
| 929 | ObjectPropertyPointer r) throws FaCTPlusPlusException; |
| 930 | |
| 931 | /** |
| 932 | * Tell object property range. |
| 933 | * |
| 934 | * @param s |
| 935 | * pointer |
| 936 | * @param c |
| 937 | * pointer |
| 938 | * @return translated axiom pointer |
| 939 | * @throws FaCTPlusPlusException |
| 940 | * fact exception |
| 941 | */ |
| 942 | public native AxiomPointer tellObjectPropertyRange(ObjectPropertyPointer s, |
| 943 | ClassPointer c) throws FaCTPlusPlusException; |
| 944 | |
| 945 | /** |
| 946 | * Tell data property range. |
| 947 | * |
| 948 | * @param s |
| 949 | * pointer |
| 950 | * @param d |
| 951 | * pointer |
| 952 | * @return translated axiom pointer |
| 953 | * @throws FaCTPlusPlusException |
| 954 | * fact exception |
| 955 | */ |
| 956 | public native AxiomPointer tellDataPropertyRange(DataPropertyPointer s, |
| 957 | DataTypeExpressionPointer d) throws FaCTPlusPlusException; |
| 958 | |
| 959 | /** |
| 960 | * Tell object property domain. |
| 961 | * |
| 962 | * @param s |
| 963 | * pointer |
| 964 | * @param c |
| 965 | * pointer |
| 966 | * @return translated axiom pointer |
| 967 | * @throws FaCTPlusPlusException |
| 968 | * fact exception |
| 969 | */ |
| 970 | public native AxiomPointer tellObjectPropertyDomain( |
| 971 | ObjectPropertyPointer s, ClassPointer c) |
| 972 | throws FaCTPlusPlusException; |
| 973 | |
| 974 | /** |
| 975 | * Tell data property domain. |
| 976 | * |
| 977 | * @param s |
| 978 | * pointer |
| 979 | * @param c |
| 980 | * pointer |
| 981 | * @return translated axiom pointer |
| 982 | * @throws FaCTPlusPlusException |
| 983 | * fact exception |
| 984 | */ |
| 985 | public native AxiomPointer tellDataPropertyDomain(DataPropertyPointer s, |
| 986 | ClassPointer c) throws FaCTPlusPlusException; |
| 987 | |
| 988 | /** |
| 989 | * Tell disjoint object properties. |
| 990 | * |
| 991 | * @return Tells a disjoint object properties axiom, whose properties are in |
| 992 | * the last closed arg list. |
| 993 | * @throws FaCTPlusPlusException |
| 994 | * fact exception |
| 995 | */ |
| 996 | public native AxiomPointer tellDisjointObjectProperties() |
| 997 | throws FaCTPlusPlusException; |
| 998 | |
| 999 | /** |
| 1000 | * Tell functional object property. |
| 1001 | * |
| 1002 | * @param s |
| 1003 | * pointer |
| 1004 | * @return translated axiom pointer |
| 1005 | * @throws FaCTPlusPlusException |
| 1006 | * fact exception |
| 1007 | */ |
| 1008 | public native AxiomPointer tellFunctionalObjectProperty( |
| 1009 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1010 | |
| 1011 | /** |
| 1012 | * Tell inverse functional object property. |
| 1013 | * |
| 1014 | * @param s |
| 1015 | * pointer |
| 1016 | * @return translated axiom pointer |
| 1017 | * @throws FaCTPlusPlusException |
| 1018 | * fact exception |
| 1019 | */ |
| 1020 | public native AxiomPointer tellInverseFunctionalObjectProperty( |
| 1021 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1022 | |
| 1023 | /** |
| 1024 | * Tell symmetric object property. |
| 1025 | * |
| 1026 | * @param s |
| 1027 | * pointer |
| 1028 | * @return translated axiom pointer |
| 1029 | * @throws FaCTPlusPlusException |
| 1030 | * fact exception |
| 1031 | */ |
| 1032 | public native AxiomPointer tellSymmetricObjectProperty( |
| 1033 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1034 | |
| 1035 | /** |
| 1036 | * Tell asymmetric object property. |
| 1037 | * |
| 1038 | * @param s |
| 1039 | * pointer |
| 1040 | * @return translated axiom pointer |
| 1041 | * @throws FaCTPlusPlusException |
| 1042 | * fact exception |
| 1043 | */ |
| 1044 | public native AxiomPointer tellAsymmetricObjectProperty( |
| 1045 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1046 | |
| 1047 | /** |
| 1048 | * Tell reflexive object property. |
| 1049 | * |
| 1050 | * @param s |
| 1051 | * pointer |
| 1052 | * @return translated axiom pointer |
| 1053 | * @throws FaCTPlusPlusException |
| 1054 | * fact exception |
| 1055 | */ |
| 1056 | public native AxiomPointer tellReflexiveObjectProperty( |
| 1057 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1058 | |
| 1059 | /** |
| 1060 | * Tell irreflexive object property. |
| 1061 | * |
| 1062 | * @param s |
| 1063 | * pointer |
| 1064 | * @return translated axiom pointer |
| 1065 | * @throws FaCTPlusPlusException |
| 1066 | * fact exception |
| 1067 | */ |
| 1068 | public native AxiomPointer tellIrreflexiveObjectProperty( |
| 1069 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1070 | |
| 1071 | /** |
| 1072 | * Tell transitive object property. |
| 1073 | * |
| 1074 | * @param s |
| 1075 | * pointer |
| 1076 | * @return translated axiom pointer |
| 1077 | * @throws FaCTPlusPlusException |
| 1078 | * fact exception |
| 1079 | */ |
| 1080 | public native AxiomPointer tellTransitiveObjectProperty( |
| 1081 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1082 | |
| 1083 | /** |
| 1084 | * Tell sub data properties. |
| 1085 | * |
| 1086 | * @param s |
| 1087 | * pointer |
| 1088 | * @param r |
| 1089 | * pointer |
| 1090 | * @return translated axiom pointer |
| 1091 | * @throws FaCTPlusPlusException |
| 1092 | * fact exception |
| 1093 | */ |
| 1094 | public native AxiomPointer tellSubDataProperties(DataPropertyPointer s, |
| 1095 | DataPropertyPointer r) throws FaCTPlusPlusException; |
| 1096 | |
| 1097 | /** |
| 1098 | * Tell equivalent data properties. |
| 1099 | * |
| 1100 | * @return Tells an equivalent data properties axiom, whose properties are |
| 1101 | * in the last closed arg list. |
| 1102 | * @throws FaCTPlusPlusException |
| 1103 | * fact exception |
| 1104 | */ |
| 1105 | public native AxiomPointer tellEquivalentDataProperties() |
| 1106 | throws FaCTPlusPlusException; |
| 1107 | |
| 1108 | /** |
| 1109 | * Tell disjoint data properties. |
| 1110 | * |
| 1111 | * @return Tells a disjoint data properties axiom, whose properties are in |
| 1112 | * the last closed arg list. |
| 1113 | * @throws FaCTPlusPlusException |
| 1114 | * fact exception |
| 1115 | */ |
| 1116 | public native AxiomPointer tellDisjointDataProperties() |
| 1117 | throws FaCTPlusPlusException; |
| 1118 | |
| 1119 | /** |
| 1120 | * Tell functional data property. |
| 1121 | * |
| 1122 | * @param s |
| 1123 | * pointer |
| 1124 | * @return translated axiom pointer |
| 1125 | * @throws FaCTPlusPlusException |
| 1126 | * fact exception |
| 1127 | */ |
| 1128 | public native AxiomPointer |
| 1129 | tellFunctionalDataProperty(DataPropertyPointer s) |
| 1130 | throws FaCTPlusPlusException; |
| 1131 | |
| 1132 | /** |
| 1133 | * Tell individual type. |
| 1134 | * |
| 1135 | * @param i |
| 1136 | * pointer |
| 1137 | * @param c |
| 1138 | * pointer |
| 1139 | * @return translated axiom pointer |
| 1140 | * @throws FaCTPlusPlusException |
| 1141 | * fact exception |
| 1142 | */ |
| 1143 | public native AxiomPointer tellIndividualType(IndividualPointer i, |
| 1144 | ClassPointer c) throws FaCTPlusPlusException; |
| 1145 | |
| 1146 | /** |
| 1147 | * Tell related individuals. |
| 1148 | * |
| 1149 | * @param i |
| 1150 | * pointer |
| 1151 | * @param r |
| 1152 | * pointer |
| 1153 | * @param j |
| 1154 | * pointer @param r pointer |
| 1155 | * @return translated axiom pointer |
| 1156 | * @throws FaCTPlusPlusException |
| 1157 | * fact exception |
| 1158 | */ |
| 1159 | public native AxiomPointer tellRelatedIndividuals(IndividualPointer i, |
| 1160 | ObjectPropertyPointer r, IndividualPointer j) |
| 1161 | throws FaCTPlusPlusException; |
| 1162 | |
| 1163 | /** |
| 1164 | * Tell not related individuals. |
| 1165 | * |
| 1166 | * @param i |
| 1167 | * pointer |
| 1168 | * @param r |
| 1169 | * pointer |
| 1170 | * @param j |
| 1171 | * pointer |
| 1172 | * @return translated axiom pointer |
| 1173 | * @throws FaCTPlusPlusException |
| 1174 | * fact exception |
| 1175 | */ |
| 1176 | public native AxiomPointer tellNotRelatedIndividuals(IndividualPointer i, |
| 1177 | ObjectPropertyPointer r, IndividualPointer j) |
| 1178 | throws FaCTPlusPlusException; |
| 1179 | |
| 1180 | /** |
| 1181 | * Tell related individual value. |
| 1182 | * |
| 1183 | * @param i |
| 1184 | * pointer |
| 1185 | * @param r |
| 1186 | * pointer |
| 1187 | * @param dv |
| 1188 | * pointer |
| 1189 | * @return translated axiom pointer |
| 1190 | * @throws FaCTPlusPlusException |
| 1191 | * fact exception |
| 1192 | */ |
| 1193 | public native AxiomPointer tellRelatedIndividualValue(IndividualPointer i, |
| 1194 | DataPropertyPointer r, DataValuePointer dv) |
| 1195 | throws FaCTPlusPlusException; |
| 1196 | |
| 1197 | /** |
| 1198 | * Tell not related individual value. |
| 1199 | * |
| 1200 | * @param i |
| 1201 | * pointer |
| 1202 | * @param r |
| 1203 | * pointer |
| 1204 | * @param dv |
| 1205 | * pointer |
| 1206 | * @return translated axiom pointer |
| 1207 | * @throws FaCTPlusPlusException |
| 1208 | * fact exception |
| 1209 | */ |
| 1210 | public native AxiomPointer tellNotRelatedIndividualValue( |
| 1211 | IndividualPointer i, DataPropertyPointer r, DataValuePointer dv) |
| 1212 | throws FaCTPlusPlusException; |
| 1213 | |
| 1214 | /** |
| 1215 | * Tell same individuals. |
| 1216 | * |
| 1217 | * @return Tells a same individuals axiom, whose individuals are in the last |
| 1218 | * closed arg list. |
| 1219 | * @throws FaCTPlusPlusException |
| 1220 | * fact exception |
| 1221 | */ |
| 1222 | public native AxiomPointer tellSameIndividuals() |
| 1223 | throws FaCTPlusPlusException; |
| 1224 | |
| 1225 | /** |
| 1226 | * Tell different individuals. |
| 1227 | * |
| 1228 | * @return Tells a different individuals axiom, whose individuals are in the |
| 1229 | * last closed arg list. |
| 1230 | * @throws FaCTPlusPlusException |
| 1231 | * fact exception |
| 1232 | */ |
| 1233 | public native AxiomPointer tellDifferentIndividuals() |
| 1234 | throws FaCTPlusPlusException; |
| 1235 | |
| 1236 | // ------------------------------------------------------------------------ |
| 1237 | // Retraction |
| 1238 | // ------------------------------------------------------------------------ |
| 1239 | /** |
| 1240 | * Retract. |
| 1241 | * |
| 1242 | * @param a |
| 1243 | * axiom pointer |
| 1244 | * @throws FaCTPlusPlusException |
| 1245 | * fact exception |
| 1246 | */ |
| 1247 | public native void retract(AxiomPointer a) throws FaCTPlusPlusException; |
| 1248 | |
| 1249 | // ------------------------------------------------------------------------ |
| 1250 | // ASK queries |
| 1251 | // ------------------------------------------------------------------------ |
| 1252 | /** |
| 1253 | * Checks if is KB consistent. |
| 1254 | * |
| 1255 | * @return true if consistent |
| 1256 | * @throws FaCTPlusPlusException |
| 1257 | * fact exception |
| 1258 | */ |
| 1259 | public native boolean isKBConsistent() throws FaCTPlusPlusException; |
| 1260 | |
| 1261 | /** |
| 1262 | * Checks if is class satisfiable. |
| 1263 | * |
| 1264 | * @param c |
| 1265 | * pointer |
| 1266 | * @return true if satisfiable |
| 1267 | * @throws FaCTPlusPlusException |
| 1268 | * fact exception |
| 1269 | */ |
| 1270 | public native boolean isClassSatisfiable(ClassPointer c) |
| 1271 | throws FaCTPlusPlusException; |
| 1272 | |
| 1273 | /** |
| 1274 | * Checks if is class subsumed by. |
| 1275 | * |
| 1276 | * @param c |
| 1277 | * pointer |
| 1278 | * @param d |
| 1279 | * pointer |
| 1280 | * @return true if subsumed |
| 1281 | * @throws FaCTPlusPlusException |
| 1282 | * fact exception |
| 1283 | */ |
| 1284 | public native boolean isClassSubsumedBy(ClassPointer c, ClassPointer d) |
| 1285 | throws FaCTPlusPlusException; |
| 1286 | |
| 1287 | /** |
| 1288 | * Checks if is class equivalent to. |
| 1289 | * |
| 1290 | * @param c |
| 1291 | * pointer |
| 1292 | * @param d |
| 1293 | * pointer |
| 1294 | * @return true if equivalent |
| 1295 | * @throws FaCTPlusPlusException |
| 1296 | * fact exception |
| 1297 | */ |
| 1298 | public native boolean isClassEquivalentTo(ClassPointer c, ClassPointer d) |
| 1299 | throws FaCTPlusPlusException; |
| 1300 | |
| 1301 | /** |
| 1302 | * Checks if is class disjoint with. |
| 1303 | * |
| 1304 | * @param c |
| 1305 | * pointer |
| 1306 | * @param d |
| 1307 | * pointer |
| 1308 | * @return true if disjoint |
| 1309 | * @throws FaCTPlusPlusException |
| 1310 | * fact exception |
| 1311 | */ |
| 1312 | public native boolean isClassDisjointWith(ClassPointer c, ClassPointer d) |
| 1313 | throws FaCTPlusPlusException; |
| 1314 | |
| 1315 | /** |
| 1316 | * Ask sub classes. |
| 1317 | * |
| 1318 | * @param c |
| 1319 | * pointer |
| 1320 | * @param direct |
| 1321 | * true if direct only |
| 1322 | * @return sub classes |
| 1323 | * @throws FaCTPlusPlusException |
| 1324 | * fact exception |
| 1325 | */ |
| 1326 | public native ClassPointer[][] |
| 1327 | askSubClasses(ClassPointer c, boolean direct) |
| 1328 | throws FaCTPlusPlusException; |
| 1329 | |
| 1330 | /** |
| 1331 | * Ask super classes. |
| 1332 | * |
| 1333 | * @param c |
| 1334 | * pointer |
| 1335 | * @param direct |
| 1336 | * true if direct only |
| 1337 | * @return super classes |
| 1338 | * @throws FaCTPlusPlusException |
| 1339 | * fact exception |
| 1340 | */ |
| 1341 | public native ClassPointer[][] askSuperClasses(ClassPointer c, |
| 1342 | boolean direct) throws FaCTPlusPlusException; |
| 1343 | |
| 1344 | /** |
| 1345 | * Ask equivalent classes. |
| 1346 | * |
| 1347 | * @param c |
| 1348 | * pointer |
| 1349 | * @return equivalent classes |
| 1350 | * @throws FaCTPlusPlusException |
| 1351 | * fact exception |
| 1352 | */ |
| 1353 | public native ClassPointer[] askEquivalentClasses(ClassPointer c) |
| 1354 | throws FaCTPlusPlusException; |
| 1355 | |
| 1356 | /** |
| 1357 | * Ask disjoint classes. |
| 1358 | * |
| 1359 | * @param c |
| 1360 | * pointer |
| 1361 | * @return disjoint classes |
| 1362 | * @throws FaCTPlusPlusException |
| 1363 | * fact exception |
| 1364 | */ |
| 1365 | public native ClassPointer[][] askDisjointClasses(ClassPointer c) |
| 1366 | throws FaCTPlusPlusException; |
| 1367 | |
| 1368 | /** |
| 1369 | * Ask super object properties. |
| 1370 | * |
| 1371 | * @param r |
| 1372 | * pointer |
| 1373 | * @param direct |
| 1374 | * true if direct only |
| 1375 | * @return super properties |
| 1376 | * @throws FaCTPlusPlusException |
| 1377 | * fact exception |
| 1378 | */ |
| 1379 | public native ObjectPropertyPointer[][] askSuperObjectProperties( |
| 1380 | ObjectPropertyPointer r, boolean direct) |
| 1381 | throws FaCTPlusPlusException; |
| 1382 | |
| 1383 | /** |
| 1384 | * Ask sub object properties. |
| 1385 | * |
| 1386 | * @param r |
| 1387 | * pointer |
| 1388 | * @param direct |
| 1389 | * true if direct only |
| 1390 | * @return sub properties |
| 1391 | * @throws FaCTPlusPlusException |
| 1392 | * fact exception |
| 1393 | */ |
| 1394 | public native ObjectPropertyPointer[][] askSubObjectProperties( |
| 1395 | ObjectPropertyPointer r, boolean direct) |
| 1396 | throws FaCTPlusPlusException; |
| 1397 | |
| 1398 | /** |
| 1399 | * Ask equivalent object properties. |
| 1400 | * |
| 1401 | * @param r |
| 1402 | * pointer |
| 1403 | * @return equivalent properties |
| 1404 | * @throws FaCTPlusPlusException |
| 1405 | * fact exception |
| 1406 | */ |
| 1407 | public native ObjectPropertyPointer[] askEquivalentObjectProperties( |
| 1408 | ObjectPropertyPointer r) throws FaCTPlusPlusException; |
| 1409 | |
| 1410 | /** |
| 1411 | * Ask object property domain. |
| 1412 | * |
| 1413 | * @param r |
| 1414 | * pointer |
| 1415 | * @param direct |
| 1416 | * true if direct only |
| 1417 | * @return the class pointer[][] |
| 1418 | * @throws FaCTPlusPlusException |
| 1419 | * fact exception |
| 1420 | */ |
| 1421 | public native ClassPointer[][] askObjectPropertyDomain( |
| 1422 | ObjectPropertyPointer r, boolean direct) |
| 1423 | throws FaCTPlusPlusException; |
| 1424 | |
| 1425 | /** |
| 1426 | * Ask object property range. |
| 1427 | * |
| 1428 | * @param r |
| 1429 | * pointer |
| 1430 | * @param direct |
| 1431 | * true if direct only |
| 1432 | * @return the class pointer[][] |
| 1433 | * @throws FaCTPlusPlusException |
| 1434 | * fact exception |
| 1435 | */ |
| 1436 | public native ClassPointer[][] askObjectPropertyRange( |
| 1437 | ObjectPropertyPointer r, boolean direct) |
| 1438 | throws FaCTPlusPlusException; |
| 1439 | |
| 1440 | /** |
| 1441 | * Checks if is object property functional. |
| 1442 | * |
| 1443 | * @param r |
| 1444 | * pointer |
| 1445 | * @return true, if is object property functional |
| 1446 | * @throws FaCTPlusPlusException |
| 1447 | * fact exception |
| 1448 | */ |
| 1449 | public native boolean isObjectPropertyFunctional(ObjectPropertyPointer r) |
| 1450 | throws FaCTPlusPlusException; |
| 1451 | |
| 1452 | /** |
| 1453 | * Checks if is object property inverse functional. |
| 1454 | * |
| 1455 | * @param r |
| 1456 | * pointer |
| 1457 | * @return true, if is object property inverse functional |
| 1458 | * @throws FaCTPlusPlusException |
| 1459 | * fact exception |
| 1460 | */ |
| 1461 | public native boolean isObjectPropertyInverseFunctional( |
| 1462 | ObjectPropertyPointer r) throws FaCTPlusPlusException; |
| 1463 | |
| 1464 | /** |
| 1465 | * Checks if is object property symmetric. |
| 1466 | * |
| 1467 | * @param r |
| 1468 | * pointer |
| 1469 | * @return true, if is object property symmetric |
| 1470 | * @throws FaCTPlusPlusException |
| 1471 | * fact exception |
| 1472 | */ |
| 1473 | public native boolean isObjectPropertySymmetric(ObjectPropertyPointer r) |
| 1474 | throws FaCTPlusPlusException; |
| 1475 | |
| 1476 | /** |
| 1477 | * Checks if is object property asymmetric. |
| 1478 | * |
| 1479 | * @param r |
| 1480 | * pointer |
| 1481 | * @return true, if is object property asymmetric |
| 1482 | * @throws FaCTPlusPlusException |
| 1483 | * fact exception |
| 1484 | */ |
| 1485 | public native boolean isObjectPropertyAsymmetric(ObjectPropertyPointer r) |
| 1486 | throws FaCTPlusPlusException; |
| 1487 | |
| 1488 | /** |
| 1489 | * Checks if is object property transitive. |
| 1490 | * |
| 1491 | * @param r |
| 1492 | * pointer |
| 1493 | * @return true, if is object property transitive |
| 1494 | * @throws FaCTPlusPlusException |
| 1495 | * fact exception |
| 1496 | */ |
| 1497 | public native boolean isObjectPropertyTransitive(ObjectPropertyPointer r) |
| 1498 | throws FaCTPlusPlusException; |
| 1499 | |
| 1500 | /** |
| 1501 | * Checks if is object property reflexive. |
| 1502 | * |
| 1503 | * @param r |
| 1504 | * pointer |
| 1505 | * @return true, if is object property reflexive |
| 1506 | * @throws FaCTPlusPlusException |
| 1507 | * fact exception |
| 1508 | */ |
| 1509 | public native boolean isObjectPropertyReflexive(ObjectPropertyPointer r) |
| 1510 | throws FaCTPlusPlusException; |
| 1511 | |
| 1512 | /** |
| 1513 | * Checks if is object property irreflexive. |
| 1514 | * |
| 1515 | * @param r |
| 1516 | * pointer |
| 1517 | * @return true, if is object property irreflexive |
| 1518 | * @throws FaCTPlusPlusException |
| 1519 | * fact exception |
| 1520 | */ |
| 1521 | public native boolean isObjectPropertyIrreflexive(ObjectPropertyPointer r) |
| 1522 | throws FaCTPlusPlusException; |
| 1523 | |
| 1524 | /** |
| 1525 | * Checks if is object sub property of. |
| 1526 | * |
| 1527 | * @param r |
| 1528 | * pointer |
| 1529 | * @param s |
| 1530 | * pointer |
| 1531 | * @return true iff R is a sub-property of S |
| 1532 | * @throws FaCTPlusPlusException |
| 1533 | * fact exception |
| 1534 | */ |
| 1535 | public native boolean isObjectSubPropertyOf(ObjectPropertyPointer r, |
| 1536 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1537 | |
| 1538 | /** |
| 1539 | * Checks if is object property disjoint with. |
| 1540 | * |
| 1541 | * @param r |
| 1542 | * pointer |
| 1543 | * @param s |
| 1544 | * pointer |
| 1545 | * @return true iff R is disjoint with S |
| 1546 | * @throws FaCTPlusPlusException |
| 1547 | * fact exception |
| 1548 | */ |
| 1549 | public native boolean isObjectPropertyDisjointWith(ObjectPropertyPointer r, |
| 1550 | ObjectPropertyPointer s) throws FaCTPlusPlusException; |
| 1551 | |
| 1552 | /** |
| 1553 | * Checks if is sub property chain of. |
| 1554 | * |
| 1555 | * @param r |
| 1556 | * pointer |
| 1557 | * @return true iff R is a super-property of a chain given in the argument |
| 1558 | * list |
| 1559 | * @throws FaCTPlusPlusException |
| 1560 | * fact exception |
| 1561 | */ |
| 1562 | public native boolean isSubPropertyChainOf(ObjectPropertyPointer r) |
| 1563 | throws FaCTPlusPlusException; |
| 1564 | |
| 1565 | /** |
| 1566 | * Are properties disjoint. |
| 1567 | * |
| 1568 | * @return true iff all the properties in the arg-list are disjoint |
| 1569 | * @throws FaCTPlusPlusException |
| 1570 | * fact exception |
| 1571 | */ |
| 1572 | public native boolean arePropertiesDisjoint() throws FaCTPlusPlusException; |
| 1573 | |
| 1574 | /** |
| 1575 | * Ask super data properties. |
| 1576 | * |
| 1577 | * @param r |
| 1578 | * pointer |
| 1579 | * @param direct |
| 1580 | * true if direct only |
| 1581 | * @return the data property pointer[][] |
| 1582 | * @throws FaCTPlusPlusException |
| 1583 | * fact exception |
| 1584 | */ |
| 1585 | public native DataPropertyPointer[][] askSuperDataProperties( |
| 1586 | DataPropertyPointer r, boolean direct) throws FaCTPlusPlusException; |
| 1587 | |
| 1588 | /** |
| 1589 | * Ask sub data properties. |
| 1590 | * |
| 1591 | * @param r |
| 1592 | * pointer |
| 1593 | * @param direct |
| 1594 | * true if direct only |
| 1595 | * @return the data property pointer[][] |
| 1596 | * @throws FaCTPlusPlusException |
| 1597 | * fact exception |
| 1598 | */ |
| 1599 | public native DataPropertyPointer[][] askSubDataProperties( |
| 1600 | DataPropertyPointer r, boolean direct) throws FaCTPlusPlusException; |
| 1601 | |
| 1602 | /** |
| 1603 | * Ask equivalent data properties. |
| 1604 | * |
| 1605 | * @param r |
| 1606 | * pointer |
| 1607 | * @return the data property pointer[] |
| 1608 | * @throws FaCTPlusPlusException |
| 1609 | * fact exception |
| 1610 | */ |
| 1611 | public native DataPropertyPointer[] askEquivalentDataProperties( |
| 1612 | DataPropertyPointer r) throws FaCTPlusPlusException; |
| 1613 | |
| 1614 | /** |
| 1615 | * Ask data property domain. |
| 1616 | * |
| 1617 | * @param r |
| 1618 | * pointer |
| 1619 | * @param direct |
| 1620 | * true if direct only |
| 1621 | * @return the class pointer[][] |
| 1622 | * @throws FaCTPlusPlusException |
| 1623 | * fact exception |
| 1624 | */ |
| 1625 | public native ClassPointer[][] askDataPropertyDomain(DataPropertyPointer r, |
| 1626 | boolean direct) throws FaCTPlusPlusException; |
| 1627 | |
| 1628 | /** |
| 1629 | * Checks if is data property functional. |
| 1630 | * |
| 1631 | * @param r |
| 1632 | * pointer |
| 1633 | * @return true, if is data property functional |
| 1634 | * @throws FaCTPlusPlusException |
| 1635 | * fact exception |
| 1636 | */ |
| 1637 | public native boolean isDataPropertyFunctional(DataPropertyPointer r) |
| 1638 | throws FaCTPlusPlusException; |
| 1639 | |
| 1640 | /** |
| 1641 | * Checks if is data sub property of. |
| 1642 | * |
| 1643 | * @param r |
| 1644 | * pointer |
| 1645 | * @param s |
| 1646 | * pointer |
| 1647 | * @return true iff R is a sub-property of S |
| 1648 | * @throws FaCTPlusPlusException |
| 1649 | * fact exception |
| 1650 | */ |
| 1651 | public native boolean isDataSubPropertyOf(DataPropertyPointer r, |
| 1652 | DataPropertyPointer s) throws FaCTPlusPlusException; |
| 1653 | |
| 1654 | /** |
| 1655 | * Checks if is data property disjoint with. |
| 1656 | * |
| 1657 | * @param r |
| 1658 | * pointer |
| 1659 | * @param s |
| 1660 | * pointer |
| 1661 | * @return true iff R is disjoint with S @throws FaCTPlusPlusException fact |
| 1662 | * exception |
| 1663 | * @throws FaCTPlusPlusException |
| 1664 | * fact exception |
| 1665 | */ |
| 1666 | public native boolean isDataPropertyDisjointWith(DataPropertyPointer r, |
| 1667 | DataPropertyPointer s) throws FaCTPlusPlusException; |
| 1668 | |
| 1669 | /** |
| 1670 | * Ask individual types. |
| 1671 | * |
| 1672 | * @param i |
| 1673 | * pointer |
| 1674 | * @param direct |
| 1675 | * true if direct only |
| 1676 | * @return the class pointer[][] |
| 1677 | * @throws FaCTPlusPlusException |
| 1678 | * fact exception |
| 1679 | */ |
| 1680 | public native ClassPointer[][] askIndividualTypes(IndividualPointer i, |
| 1681 | boolean direct) throws FaCTPlusPlusException; |
| 1682 | |
| 1683 | /** |
| 1684 | * Ask object properties. |
| 1685 | * |
| 1686 | * @param i |
| 1687 | * pointer |
| 1688 | * @return helper for the askObjectPropertyRelationships() |
| 1689 | * @throws FaCTPlusPlusException |
| 1690 | * fact exception |
| 1691 | */ |
| 1692 | public native ObjectPropertyPointer[] askObjectProperties( |
| 1693 | IndividualPointer i) throws FaCTPlusPlusException; |
| 1694 | |
| 1695 | /** |
| 1696 | * Ask related individuals. |
| 1697 | * |
| 1698 | * @param individualPointer |
| 1699 | * the individual pointer |
| 1700 | * @param r |
| 1701 | * pointer |
| 1702 | * @return the individual pointer[] |
| 1703 | * @throws FaCTPlusPlusException |
| 1704 | * fact exception |
| 1705 | */ |
| 1706 | public native IndividualPointer[] askRelatedIndividuals( |
| 1707 | IndividualPointer individualPointer, ObjectPropertyPointer r) |
| 1708 | throws FaCTPlusPlusException; |
| 1709 | |
| 1710 | /** |
| 1711 | * Ask data properties. |
| 1712 | * |
| 1713 | * @param i |
| 1714 | * pointer |
| 1715 | * @return helper for the askDataPropertyRelationships() |
| 1716 | * @throws FaCTPlusPlusException |
| 1717 | * fact exception |
| 1718 | */ |
| 1719 | public native DataPropertyPointer[] askDataProperties(IndividualPointer i) |
| 1720 | throws FaCTPlusPlusException; |
| 1721 | |
| 1722 | /** |
| 1723 | * Ask related values. |
| 1724 | * |
| 1725 | * @param individualPointer |
| 1726 | * the individual pointer |
| 1727 | * @param r |
| 1728 | * pointer |
| 1729 | * @return the data value pointer[] |
| 1730 | * @throws FaCTPlusPlusException |
| 1731 | * fact exception |
| 1732 | */ |
| 1733 | public native DataValuePointer[] askRelatedValues( |
| 1734 | IndividualPointer individualPointer, DataPropertyPointer r) |
| 1735 | throws FaCTPlusPlusException; |
| 1736 | |
| 1737 | /** |
| 1738 | * Checks for data property relationship. |
| 1739 | * |
| 1740 | * @param i |
| 1741 | * pointer |
| 1742 | * @param r |
| 1743 | * pointer |
| 1744 | * @param v |
| 1745 | * the v |
| 1746 | * @return true, if successful |
| 1747 | * @throws FaCTPlusPlusException |
| 1748 | * fact exception |
| 1749 | */ |
| 1750 | public native boolean hasDataPropertyRelationship(IndividualPointer i, |
| 1751 | DataPropertyPointer r, DataValuePointer v) |
| 1752 | throws FaCTPlusPlusException; |
| 1753 | |
| 1754 | /** |
| 1755 | * Checks for object property relationship. |
| 1756 | * |
| 1757 | * @param i |
| 1758 | * pointer |
| 1759 | * @param r |
| 1760 | * pointer |
| 1761 | * @param j |
| 1762 | * pointer |
| 1763 | * @return true, if successful |
| 1764 | * @throws FaCTPlusPlusException |
| 1765 | * fact exception |
| 1766 | */ |
| 1767 | public native boolean hasObjectPropertyRelationship(IndividualPointer i, |
| 1768 | ObjectPropertyPointer r, IndividualPointer j) |
| 1769 | throws FaCTPlusPlusException; |
| 1770 | |
| 1771 | /** |
| 1772 | * Checks if is instance of. |
| 1773 | * |
| 1774 | * @param i |
| 1775 | * pointer |
| 1776 | * @param c |
| 1777 | * pointer |
| 1778 | * @return true, if is instance of |
| 1779 | * @throws FaCTPlusPlusException |
| 1780 | * fact exception |
| 1781 | */ |
| 1782 | public native boolean isInstanceOf(IndividualPointer i, ClassPointer c) |
| 1783 | throws FaCTPlusPlusException; |
| 1784 | |
| 1785 | /** |
| 1786 | * Ask instances. |
| 1787 | * |
| 1788 | * @param c |
| 1789 | * pointer |
| 1790 | * @param direct |
| 1791 | * true if direct only |
| 1792 | * @return the individual pointer[] |
| 1793 | * @throws FaCTPlusPlusException |
| 1794 | * fact exception |
| 1795 | */ |
| 1796 | public native IndividualPointer[] askInstances(ClassPointer c, |
| 1797 | boolean direct) throws FaCTPlusPlusException; |
| 1798 | |
| 1799 | /** |
| 1800 | * Ask instances grouped. |
| 1801 | * |
| 1802 | * @param c |
| 1803 | * pointer |
| 1804 | * @param direct |
| 1805 | * true if direct only |
| 1806 | * @return return instances grouped by the SameAs relation |
| 1807 | * @throws FaCTPlusPlusException |
| 1808 | * fact exception |
| 1809 | */ |
| 1810 | public native IndividualPointer[][] askInstancesGrouped(ClassPointer c, |
| 1811 | boolean direct) throws FaCTPlusPlusException; |
| 1812 | |
| 1813 | /** |
| 1814 | * Ask same as. |
| 1815 | * |
| 1816 | * @param i |
| 1817 | * pointer |
| 1818 | * @return the individual pointer[] |
| 1819 | * @throws FaCTPlusPlusException |
| 1820 | * fact exception |
| 1821 | */ |
| 1822 | public native IndividualPointer[] askSameAs(IndividualPointer i) |
| 1823 | throws FaCTPlusPlusException; |
| 1824 | |
| 1825 | /** |
| 1826 | * Checks if is same as. |
| 1827 | * |
| 1828 | * @param i |
| 1829 | * pointer |
| 1830 | * @param j |
| 1831 | * pointer |
| 1832 | * @return true, if is same as |
| 1833 | * @throws FaCTPlusPlusException |
| 1834 | * fact exception |
| 1835 | */ |
| 1836 | public native boolean isSameAs(IndividualPointer i, IndividualPointer j) |
| 1837 | throws FaCTPlusPlusException; |
| 1838 | |
| 1839 | /** |
| 1840 | * Gets the data related individuals. |
| 1841 | * |
| 1842 | * @param r |
| 1843 | * pointer |
| 1844 | * @param s |
| 1845 | * pointer |
| 1846 | * @param op |
| 1847 | * the op |
| 1848 | * @return the data related individuals |
| 1849 | * @throws FaCTPlusPlusException |
| 1850 | * fact exception |
| 1851 | */ |
| 1852 | public native IndividualPointer[] getDataRelatedIndividuals( |
| 1853 | DataPropertyPointer r, DataPropertyPointer s, int op) |
| 1854 | throws FaCTPlusPlusException; |
| 1855 | |
| 1856 | // ------------------------------------------------------------------------ |
| 1857 | // Options |
| 1858 | // ------------------------------------------------------------------------ |
| 1859 | /** |
| 1860 | * sets single operation timeout in milliseconds. |
| 1861 | * |
| 1862 | * @param millis |
| 1863 | * the new operation timeout |
| 1864 | */ |
| 1865 | public native void setOperationTimeout(long millis); |
| 1866 | |
| 1867 | /** |
| 1868 | * sets single operation timeout in milliseconds. |
| 1869 | * |
| 1870 | * @param allowFresh |
| 1871 | * the new fresh entity policy |
| 1872 | */ |
| 1873 | public native void setFreshEntityPolicy(boolean allowFresh); |
| 1874 | |
| 1875 | /** |
| 1876 | * Sets the progress monitor. |
| 1877 | * |
| 1878 | * @param progressMonitor |
| 1879 | * the new progress monitor |
| 1880 | * @throws FaCTPlusPlusException |
| 1881 | * fact exception |
| 1882 | */ |
| 1883 | public native void setProgressMonitor( |
| 1884 | FaCTPlusPlusProgressMonitor progressMonitor) |
| 1885 | throws FaCTPlusPlusException; |
| 1886 | |
| 1887 | /** |
| 1888 | * start changes. |
| 1889 | */ |
| 1890 | public native void startChanges(); |
| 1891 | |
| 1892 | /** |
| 1893 | * end changes. |
| 1894 | */ |
| 1895 | public native void endChanges(); |
| 1896 | |
| 1897 | // ------------------------------------------------------------------------ |
| 1898 | // Argument list processing |
| 1899 | // ------------------------------------------------------------------------ |
| 1900 | /** |
| 1901 | * Starts an arg list. Note that only ONE arg list may be created at any |
| 1902 | * given time. For example, it is illegal to call initArgList for a second |
| 1903 | * time without closing calling closeArgList first. |
| 1904 | * |
| 1905 | * @throws FaCTPlusPlusException |
| 1906 | * fact exception |
| 1907 | */ |
| 1908 | public native void initArgList() throws FaCTPlusPlusException; |
| 1909 | |
| 1910 | /** |
| 1911 | * Adds an argument to the currently open arg list. |
| 1912 | * |
| 1913 | * @param p |
| 1914 | * A pointer to the argument to be added. |
| 1915 | * @throws FaCTPlusPlusException |
| 1916 | * fact exception |
| 1917 | */ |
| 1918 | public native void addArg(Pointer p) throws FaCTPlusPlusException; |
| 1919 | |
| 1920 | /** |
| 1921 | * Closes the currently open arg list. It is illegal to close an empty arg |
| 1922 | * list. It is also illegal to call this method without calling initArgList |
| 1923 | * first. |
| 1924 | * |
| 1925 | * @throws FaCTPlusPlusException |
| 1926 | * fact exception |
| 1927 | */ |
| 1928 | public native void closeArgList() throws FaCTPlusPlusException; |
| 1929 | |
| 1930 | // ------------------------------------------------------------------------ |
| 1931 | // Tracing (currently unimplemented) |
| 1932 | // ------------------------------------------------------------------------ |
| 1933 | /** |
| 1934 | * Switch on the tracing of the next reasoning operation. |
| 1935 | */ |
| 1936 | public native void needTracing(); |
| 1937 | |
| 1938 | /** |
| 1939 | * Gets the trace. |
| 1940 | * |
| 1941 | * @return get the trace-set (set of axioms) for the last reasoning |
| 1942 | * operation |
| 1943 | */ |
| 1944 | public native AxiomPointer[] getTrace(); |
| 1945 | |
| 1946 | // ------------------------------------------------------------------------ |
| 1947 | // Knowledge Exploration interface |
| 1948 | // ------------------------------------------------------------------------ |
| 1949 | /** |
| 1950 | * Builds the completion tree. |
| 1951 | * |
| 1952 | * @param classPointer |
| 1953 | * the class pointer |
| 1954 | * @return the node pointer |
| 1955 | */ |
| 1956 | public native NodePointer buildCompletionTree(ClassPointer classPointer); |
| 1957 | |
| 1958 | /** |
| 1959 | * Gets the object neighbours. |
| 1960 | * |
| 1961 | * @param object |
| 1962 | * the object |
| 1963 | * @param deterministicOnly |
| 1964 | * the deterministic only |
| 1965 | * @return the object neighbours |
| 1966 | */ |
| 1967 | public native ObjectPropertyPointer[] getObjectNeighbours( |
| 1968 | NodePointer object, boolean deterministicOnly); |
| 1969 | |
| 1970 | /** |
| 1971 | * Gets the data neighbours. |
| 1972 | * |
| 1973 | * @param object |
| 1974 | * the object |
| 1975 | * @param deterministicOnly |
| 1976 | * the deterministic only |
| 1977 | * @return the data neighbours |
| 1978 | */ |
| 1979 | public native DataPropertyPointer[] getDataNeighbours(NodePointer object, |
| 1980 | boolean deterministicOnly); |
| 1981 | |
| 1982 | /** |
| 1983 | * Gets the object neighbours. |
| 1984 | * |
| 1985 | * @param object |
| 1986 | * the object |
| 1987 | * @param property |
| 1988 | * the property |
| 1989 | * @return the object neighbours |
| 1990 | */ |
| 1991 | public native NodePointer[] getObjectNeighbours(NodePointer object, |
| 1992 | ObjectPropertyPointer property); |
| 1993 | |
| 1994 | /** |
| 1995 | * Gets the data neighbours. |
| 1996 | * |
| 1997 | * @param object |
| 1998 | * the object |
| 1999 | * @param property |
| 2000 | * the property |
| 2001 | * @return the data neighbours |
| 2002 | */ |
| 2003 | public native NodePointer[] getDataNeighbours(NodePointer object, |
| 2004 | DataPropertyPointer property); |
| 2005 | |
| 2006 | /** |
| 2007 | * Gets the object label. |
| 2008 | * |
| 2009 | * @param object |
| 2010 | * the object |
| 2011 | * @param deterministicOnly |
| 2012 | * the deterministic only |
| 2013 | * @return the object label |
| 2014 | */ |
| 2015 | public native ClassPointer[] getObjectLabel(NodePointer object, |
| 2016 | boolean deterministicOnly); |
| 2017 | |
| 2018 | /** |
| 2019 | * Gets the data label. |
| 2020 | * |
| 2021 | * @param object |
| 2022 | * the object |
| 2023 | * @param deterministicOnly |
| 2024 | * the deterministic only |
| 2025 | * @return the data label |
| 2026 | */ |
| 2027 | public native DataTypePointer[] getDataLabel(NodePointer object, |
| 2028 | boolean deterministicOnly); |
| 2029 | |
| 2030 | /** |
| 2031 | * Gets the blocker. |
| 2032 | * |
| 2033 | * @param object |
| 2034 | * the object |
| 2035 | * @return the blocker |
| 2036 | */ |
| 2037 | public native NodePointer getBlocker(NodePointer object); |
| 2038 | |
| 2039 | // ------------------------------------------------------------------------ |
| 2040 | // Atomic Decomposition interface |
| 2041 | // ------------------------------------------------------------------------ |
| 2042 | /** |
| 2043 | * Gets the atomic decomposition size. |
| 2044 | * |
| 2045 | * @param moduleMethod |
| 2046 | * the module method |
| 2047 | * @param moduleType |
| 2048 | * the module type |
| 2049 | * @return the atomic decomposition size |
| 2050 | */ |
| 2051 | public native int getAtomicDecompositionSize(int moduleMethod, |
| 2052 | int moduleType); |
| 2053 | |
| 2054 | /** |
| 2055 | * Gets the atom axioms. |
| 2056 | * |
| 2057 | * @param index |
| 2058 | * the index |
| 2059 | * @return the atom axioms |
| 2060 | */ |
| 2061 | public native AxiomPointer[] getAtomAxioms(int index); |
| 2062 | |
| 2063 | /** |
| 2064 | * Gets the atom module. |
| 2065 | * |
| 2066 | * @param index |
| 2067 | * the index |
| 2068 | * @return the atom module |
| 2069 | */ |
| 2070 | public native AxiomPointer[] getAtomModule(int index); |
| 2071 | |
| 2072 | /** |
| 2073 | * Gets the atom dependents. |
| 2074 | * |
| 2075 | * @param index |
| 2076 | * the index |
| 2077 | * @return the atom dependents |
| 2078 | */ |
| 2079 | public native int[] getAtomDependents(int index); |
| 2080 | |
| 2081 | /** |
| 2082 | * Gets the loc check number. |
| 2083 | * |
| 2084 | * @return the loc check number |
| 2085 | */ |
| 2086 | public native int getLocCheckNumber(); |
| 2087 | |
| 2088 | // ------------------------------------------------------------------------ |
| 2089 | // Modularity interface |
| 2090 | // ------------------------------------------------------------------------ |
| 2091 | /** |
| 2092 | * Gets the module. |
| 2093 | * |
| 2094 | * @param moduleMethod |
| 2095 | * the module method |
| 2096 | * @param moduleType |
| 2097 | * the module type |
| 2098 | * @return the module |
| 2099 | */ |
| 2100 | public native AxiomPointer[] getModule(int moduleMethod, int moduleType); |
| 2101 | |
| 2102 | /** |
| 2103 | * Gets the non local. |
| 2104 | * |
| 2105 | * @param moduleMethod |
| 2106 | * the module method |
| 2107 | * @param moduleType |
| 2108 | * the module type |
| 2109 | * @return the non local |
| 2110 | */ |
| 2111 | public native AxiomPointer[] getNonLocal(int moduleMethod, int moduleType); |
| 2112 | |
| 2113 | // ------------------------------------------------------------------------ |
| 2114 | // Save/Load interface |
| 2115 | // ------------------------------------------------------------------------ |
| 2116 | /** |
| 2117 | * Check save load context. |
| 2118 | * |
| 2119 | * @param name |
| 2120 | * the name |
| 2121 | * @return true, if successful |
| 2122 | */ |
| 2123 | public native boolean checkSaveLoadContext(String name); |
| 2124 | |
| 2125 | /** |
| 2126 | * Sets the save load context. |
| 2127 | * |
| 2128 | * @param name |
| 2129 | * the name |
| 2130 | * @return true, if successful |
| 2131 | */ |
| 2132 | public native boolean setSaveLoadContext(String name); |
| 2133 | |
| 2134 | /** |
| 2135 | * Clear save load context. |
| 2136 | * |
| 2137 | * @param name |
| 2138 | * the name |
| 2139 | * @return true, if successful |
| 2140 | */ |
| 2141 | public native boolean clearSaveLoadContext(String name); |
| 2142 | } |