public class Utility extends Object
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkAtomsCompatible(Atomic a,
Atomic b) |
static boolean |
checkTypesCompatible(Type aType,
Type bType) |
static void |
computeRoleCombinations(Set<String> vars,
Set<RoleType> roles,
Map<String,String> roleMap,
Set<Map<String,String>> roleMaps) |
static String |
createFreshVariable(Set<String> vars,
String var)
generate a fresh variable avoiding global variables and variables from the same query
|
static Rule |
createPropertyChainRule(String ruleId,
RelationType relation,
String fromRoleId,
String toRoleId,
LinkedHashMap<RelationType,javafx.util.Pair<String,String>> chain,
MindmapsGraph graph) |
static Rule |
createReflexiveRule(String ruleId,
RelationType relType,
MindmapsGraph graph)
create reflexive rule R(from: X, to: X) :- R(from: X,to: Y)
|
static Rule |
createSubPropertyRule(String ruleId,
RelationType parent,
RelationType child,
Map<String,String> roleMappings,
MindmapsGraph graph)
creates rule parent :- child
|
static Rule |
createTransitiveRule(String ruleId,
RelationType relType,
String fromRoleId,
String toRoleId,
MindmapsGraph graph)
create transitive rule R(from: X, to: Y) :- R(from: X,to: Z), R(from: Z, to: Y)
|
static Set<RoleType> |
getCompatibleRoleTypes(Type type,
Type relType) |
static void |
printAnswers(Set<Map<String,Concept>> answers) |
static void |
printMatchQueryResults(MatchQuery sq) |
public static void printMatchQueryResults(MatchQuery sq)
public static void computeRoleCombinations(Set<String> vars, Set<RoleType> roles, Map<String,String> roleMap, Set<Map<String,String>> roleMaps)
public static String createFreshVariable(Set<String> vars, String var)
vars - vars to be avoidedvar - variable to be generated a fresh replacementpublic static Rule createTransitiveRule(String ruleId, RelationType relType, String fromRoleId, String toRoleId, MindmapsGraph graph)
ruleId - rule identifierrelType - transitive relation typefromRoleId - from directional role type idtoRoleId - to directional role type idgraph - graphpublic static Rule createReflexiveRule(String ruleId, RelationType relType, MindmapsGraph graph)
ruleId - rule identifierrelType - reflexive relation typegraph - graphpublic static Rule createSubPropertyRule(String ruleId, RelationType parent, RelationType child, Map<String,String> roleMappings, MindmapsGraph graph)
ruleId - rule identifierparent - relation type of parentchild - relation type of childroleMappings - map of corresponding role type idsgraph - graphpublic static Rule createPropertyChainRule(String ruleId, RelationType relation, String fromRoleId, String toRoleId, LinkedHashMap<RelationType,javafx.util.Pair<String,String>> chain, MindmapsGraph graph)
Copyright © 2016. All rights reserved.