Class Predicates
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPredicateFactory(PredicateKey key, String predicateFactoryClassName) Associates aPredicateFactorywith thisKnowledgeBase.voidaddPredicateFactory(PredicateKey key, PredicateFactory predicateFactory) Associates aPredicateFactorywith thisKnowledgeBase.voidaddUserDefinedPredicate(UserDefinedPredicateFactory userDefinedPredicate) Adds a user defined predicate to this object.Returns theUserDefinedPredicateFactoryfor the specifiedPredicateKey.Returns details of all predicates, both user-defined and built-in predicates.getPredicate(Term t) Returns thePredicateFactoryassociated with the specifiedPredicateKey.getPredicateFactory(Term term) Returns thePredicateFactoryassociated with the specifiedTerm.Returns details of all the user define predicates of this object.
-
Constructor Details
-
Predicates
-
-
Method Details
-
getPredicate
-
getAllDefinedPredicateKeys
Returns details of all predicates, both user-defined and built-in predicates. -
getUserDefinedPredicates
Returns details of all the user define predicates of this object. -
createOrReturnUserDefinedPredicate
Returns theUserDefinedPredicateFactoryfor the specifiedPredicateKey.If this object does not already have a
UserDefinedPredicateFactoryfor the specifiedPredicateKeythen it will create it.- Throws:
ProjogException- if the specifiedPredicateKeyrepresents an existing "plugin" predicate
-
addUserDefinedPredicate
Adds a user defined predicate to this object.Any existing
UserDefinedPredicateFactorywith the samePredicateKeywill be replaced.- Throws:
ProjogException- if thePredicateKeyof the specifiedUserDefinedPredicateFactoryrepresents an existing "plugin" predicate
-
getPreprocessedPredicateFactory
-
getPredicateFactory
Returns thePredicateFactoryassociated with the specifiedTerm.If this object has no
PredicateFactoryassociated with thePredicateKeyof the specifiedTermthen a new instance ofUnknownPredicateis returned. -
getPredicateFactory
Returns thePredicateFactoryassociated with the specifiedPredicateKey.If this object has no
PredicateFactoryassociated with the specifiedPredicateKeythen a new instance ofUnknownPredicateis returned. -
addPredicateFactory
Associates aPredicateFactorywith thisKnowledgeBase.This method provides a mechanism for "plugging in" or "injecting" implementations of
PredicateFactoryat runtime. This mechanism provides an easy way to configure and extend the functionality of Projog - including adding functionality not possible to define in pure Prolog syntax.- Parameters:
key- The name and arity to associate thePredicateFactorywith.predicateFactoryClassName- The name of a class that implementsPredicateFactory.- Throws:
ProjogException- if there is already aPredicateFactoryassociated with thePredicateKey
-
addPredicateFactory
Associates aPredicateFactorywith thisKnowledgeBase.This method provides a mechanism for "plugging in" or "injecting" implementations of
PredicateFactoryat runtime. This mechanism provides an easy way to configure and extend the functionality of Projog - including adding functionality not possible to define in pure Prolog syntax.- Parameters:
key- The name and arity to associate thePredicateFactorywith.predicateFactory- ThePredicateFactoryto be added.- Throws:
ProjogException- if there is already aPredicateFactoryassociated with thePredicateKey
-
placeholder
-