/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getObjectValue * Signature: (Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer;Luk/ac/manchester/cs/factplusplus/IndividualPointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getObjectValue (JNIEnv * env, jobject obj, jobject arg1, jobject arg2) { TRACE_JNI("getObjectValue"); TJNICache* J = getJ(env,obj); return J->Class ( J->EM->Value ( getORoleExpr(env,arg1), getIndividualExpr(env,arg2) ) ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getTopObjectProperty * Signature: ()Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getTopObjectProperty (JNIEnv * env, jobject obj) { TRACE_JNI("getTopObjectProperty"); TJNICache* J = getJ(env,obj); return J->ObjectProperty(J->getOName("http://www.w3.org/2002/07/owl#topObjectProperty")); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getInverseProperty * Signature: (Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer;)Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getInverseProperty (JNIEnv * env, jobject obj, jobject arg) { TRACE_JNI("getInverseProperty"); TJNICache* J = getJ(env,obj); return J->ObjectProperty(J->EM->Inverse(getORoleExpr(env,arg))); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getOneOf * Signature: ()Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getOneOf (JNIEnv * env, jobject obj) { TRACE_JNI("getOneOf"); TJNICache* J = getJ(env,obj); return J->Class(J->EM->OneOf()); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getDataAtMost * Signature: (ILuk/ac/manchester/cs/factplusplus/DataPropertyPointer;Luk/ac/manchester/cs/factplusplus/DataTypePointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getDataAtMost (JNIEnv * env, jobject obj, jint n, jobject arg1, jobject arg2) { TRACE_JNI("getDataAtMost"); TJNICache* J = getJ(env,obj); return J->Class ( J->EM->MaxCardinality ( n, getDRoleExpr(env,arg1), getDataExpr(env,arg2) ) ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getRestrictedDataType * Signature: (Luk/ac/manchester/cs/factplusplus/DataTypeExpressionPointer;Luk/ac/manchester/cs/factplusplus/DataTypeFacet;)Luk/ac/manchester/cs/factplusplus/DataTypeExpressionPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getRestrictedDataType (JNIEnv * env, jobject obj, jobject arg1, jobject arg2) { TRACE_JNI("getRestrictedDataType"); TJNICache* J = getJ(env,obj); return J->DataTypeExpression ( J->EM->RestrictedType ( getDataTypeExpr(env,arg1), getFacetExpr(env,arg2) ) ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getDataValue * Signature: (Luk/ac/manchester/cs/factplusplus/DataPropertyPointer;Luk/ac/manchester/cs/factplusplus/DataValuePointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getDataValue__Luk_ac_manchester_cs_factplusplus_DataPropertyPointer_2Luk_ac_manchester_cs_factplusplus_DataValuePointer_2 (JNIEnv * env, jobject obj, jobject arg1, jobject arg2) { TRACE_JNI("getDataValue"); TJNICache* J = getJ(env,obj); return J->Class ( J->EM->Value ( getDRoleExpr(env,arg1), getDataValueExpr(env,arg2) ) ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getObjectSome * Signature: (Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer;Luk/ac/manchester/cs/factplusplus/ClassPointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getObjectSome (JNIEnv * env, jobject obj, jobject arg1, jobject arg2) { TRACE_JNI("getObjectSome"); TJNICache* J = getJ(env,obj); return J->Class ( J->EM->Exists ( getORoleExpr(env,arg1), getConceptExpr(env,arg2) ) ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getSelf * Signature: (Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getSelf (JNIEnv * env, jobject obj, jobject arg) { TRACE_JNI("getSelf"); TJNICache* J = getJ(env,obj); return J->Class(J->EM->SelfReference(getORoleExpr(env,arg))); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getConceptNot * Signature: (Luk/ac/manchester/cs/factplusplus/ClassPointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getConceptNot (JNIEnv * env, jobject obj, jobject arg) { TRACE_JNI("getConceptNot"); TJNICache* J = getJ(env,obj); return J->Class(J->EM->Not(getConceptExpr(env,arg))); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getDataUnionOf * Signature: ()Luk/ac/manchester/cs/factplusplus/DataTypeExpressionPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getDataUnionOf (JNIEnv * env, jobject obj) { TRACE_JNI("getDataUnionOf"); TJNICache* J = getJ(env,obj); return J->DataTypeExpression(J->EM->DataOr()); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getDataNot * Signature: (Luk/ac/manchester/cs/factplusplus/DataTypeExpressionPointer;)Luk/ac/manchester/cs/factplusplus/DataTypeExpressionPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getDataNot (JNIEnv * env, jobject obj, jobject arg) { TRACE_JNI("getDataNot"); TJNICache* J = getJ(env,obj); return J->DataTypeExpression(J->EM->DataNot(getDataExpr(env,arg))); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getMaxInclusiveFacet * Signature: (Luk/ac/manchester/cs/factplusplus/DataValuePointer;)Luk/ac/manchester/cs/factplusplus/DataTypeFacet; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getMaxInclusiveFacet (JNIEnv * env, jobject obj, jobject arg) { TRACE_JNI("getMaxInclusiveFacet"); TJNICache* J = getJ(env,obj); return J->Facet(J->EM->FacetMaxInclusive(getDataValueExpr(env,arg))); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getPropertyComposition * Signature: ()Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getPropertyComposition (JNIEnv * env, jobject obj) { TRACE_JNI("getPropertyComposition"); TJNICache* J = getJ(env,obj); return J->ObjectComplex(J->EM->Compose()); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getDataAll * Signature: (Luk/ac/manchester/cs/factplusplus/DataPropertyPointer;Luk/ac/manchester/cs/factplusplus/DataTypeExpressionPointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getDataAll (JNIEnv * env, jobject obj, jobject arg1, jobject arg2) { TRACE_JNI("getDataAll"); TJNICache* J = getJ(env,obj); return J->Class ( J->EM->Forall ( getDRoleExpr(env,arg1), getDataExpr(env,arg2) ) ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: askDataProperties * Signature: (Luk/ac/manchester/cs/factplusplus/IndividualPointer;)[Luk/ac/manchester/cs/factplusplus/DataPropertyPointer; */ JNIEXPORT jobjectArray JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_askDataProperties (JNIEnv * env, jobject obj, jobject arg) { TRACE_JNI("askDataProperties"); TRACE_ARG(env,obj,arg); TJNICache* J = getJ(env,obj); ReasoningKernel::NamesVector Rs; PROCESS_QUERY ( J->K->getRelatedRoles ( getROIndividualExpr(env,arg), Rs, /*data=*/true, /*needI=*/false ) ); std::vector<TExpr*> acc; for ( ReasoningKernel::NamesVector::const_iterator p = Rs.begin(), p_end = Rs.end(); p < p_end; ++p ) acc.push_back(J->getDName((*p)->getName())); return J->buildArray ( acc, J->DataPropertyPointer ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: askRelatedIndividuals * Signature: (Luk/ac/manchester/cs/factplusplus/IndividualPointer;Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer;)[Luk/ac/manchester/cs/factplusplus/IndividualPointer; */ JNIEXPORT jobjectArray JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_askRelatedIndividuals (JNIEnv * env, jobject obj, jobject arg1, jobject arg2) { TRACE_JNI("askRelatedIndividuals"); TRACE_ARG(env,obj,arg1); TRACE_ARG(env,obj,arg2); TJNICache* J = getJ(env,obj); ReasoningKernel::NamesVector Js; PROCESS_QUERY ( J->K->getRoleFillers ( getROIndividualExpr(env,arg1), getROORoleExpr(env,arg2), Js ) ); std::vector<TExpr*> acc; for ( ReasoningKernel::NamesVector::const_iterator p = Js.begin(), p_end = Js.end(); p < p_end; ++p ) acc.push_back(J->getIName((*p)->getName())); return J->buildArray ( acc, J->IndividualPointer ); }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getDataValue * Signature: (Ljava/lang/String;Luk/ac/manchester/cs/factplusplus/DataTypePointer;)Luk/ac/manchester/cs/factplusplus/DataValuePointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getDataValue__Ljava_lang_String_2Luk_ac_manchester_cs_factplusplus_DataTypePointer_2 (JNIEnv * env, jobject obj, jstring str, jobject type) { TRACE_JNI("getDataValue"); TRACE_STR(env,str); TJNICache* J = getJ(env,obj); JString name(env,str); jobject ret = (jobject)0; try { ret = J->DataValue ( J->EM->DataValue ( name(), getDataTypeExpr(env,type) ) ); } catch (const EFPPCantRegName&) { Throw ( env, "FaCT++ Kernel: Can not register new data value" ); } return ret; }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getNamedClass * Signature: (Ljava/lang/String;)Luk/ac/manchester/cs/factplusplus/ClassPointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getNamedClass (JNIEnv * env, jobject obj, jstring str) { TRACE_JNI("getNamedClass"); TRACE_STR(env,str); TJNICache* J = getJ(env,obj); JString name(env,str); jobject ret = (jobject)0; try { ret = J->Class(J->getCName(name())); } catch (const EFPPCantRegName&) { Throw ( env, "FaCT++ Kernel: Can not register new class name" ); } return ret; }
/* * Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus * Method: getBuiltInDataType * Signature: (Ljava/lang/String;)Luk/ac/manchester/cs/factplusplus/DataTypePointer; */ JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getBuiltInDataType (JNIEnv * env, jobject obj, jstring str) { TRACE_JNI("getBuiltInDataType"); TRACE_STR(env,str); TJNICache* J = getJ(env,obj); JString name(env,str); std::string DTName(name()); if ( DTName == "http://www.w3.org/2000/01/rdf-schema#Literal" || DTName == "http://www.w3.org/2000/01/rdf-schema#anySimpleType" || DTName == "http://www.w3.org/2001/XMLSchema#anyType" || DTName == "http://www.w3.org/2001/XMLSchema#anySimpleType" ) return J->DataType(J->EM->DataTop()); if ( DTName == "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral" || DTName == "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" || DTName == "http://www.w3.org/2001/XMLSchema#string" || DTName == "http://www.w3.org/2001/XMLSchema#anyURI" || DTName == "http://www.w3.org/2001/XMLSchema#ID" ) return J->DataType(J->EM->getStrDataType()); if ( DTName == "http://www.w3.org/2001/XMLSchema#integer" || DTName == "http://www.w3.org/2001/XMLSchema#int" || DTName == "http://www.w3.org/2001/XMLSchema#long" || DTName == "http://www.w3.org/2001/XMLSchema#nonNegativeInteger" || DTName == "http://www.w3.org/2001/XMLSchema#positiveInteger" || DTName == "http://www.w3.org/2001/XMLSchema#negativeInteger" || DTName == "http://www.w3.org/2001/XMLSchema#short" || DTName == "http://www.w3.org/2001/XMLSchema#byte" ) return J->DataType(J->EM->getIntDataType()); if ( DTName == "http://www.w3.org/2001/XMLSchema#float" || DTName == "http://www.w3.org/2001/XMLSchema#double" || DTName == "http://www.w3.org/2001/XMLSchema#real" || DTName == "http://www.w3.org/2001/XMLSchema#decimal" ) return J->DataType(J->EM->getRealDataType()); if ( DTName == "http://www.w3.org/2001/XMLSchema#boolean" ) return J->DataType(J->EM->getBoolDataType()); if ( DTName == "http://www.w3.org/2001/XMLSchema#dateTimeAsLong" ) return J->DataType(J->EM->getTimeDataType()); std::stringstream err; err << "Unsupported datatype '" << DTName.c_str() << "'"; Throw ( env, err.str().c_str() ); return (jobject)0; }