@Override public boolean hasNamedInverse() { return _inverse != null && !_inverse.isAnon(); }
@Override public boolean hasNamedInverse() { return _inverse != null && !_inverse.isAnon(); }
/** * Returns if the role from the parent of _blocked candidate has any inverse super properties. * * @return if the role from the parent of _blocked candidate has any inverse super properties */ public boolean isInvSuccessor() { for (final Role role : getIncomingRoles()) if (role.isAnon()) return true; return false; }
/** * Returns if the role from the parent of _blocked candidate has any inverse super properties. * * @return if the role from the parent of _blocked candidate has any inverse super properties */ public boolean isInvSuccessor() { for (final Role role : getIncomingRoles()) if (role.isAnon()) return true; return false; }
private void addAlphaNode(final Role r, final AlphaNode node) { if (!r.isAnon()) { List<AlphaNode> subNodes = _map.get(r.getName()); if (subNodes == null) { subNodes = new ArrayList<>(); _map.put(r.getName(), subNodes); } subNodes.add(node); } }
private void addAlphaNode(final Role r, final AlphaNode node) { if (!r.isAnon()) { List<AlphaNode> subNodes = _map.get(r.getName()); if (subNodes == null) { subNodes = new ArrayList<>(); _map.put(r.getName(), subNodes); } subNodes.add(node); } }
protected boolean hasAnonInverse(final Role role) { return !role.isBuiltin() && (role.isAnon() || _expressivity.getAnonInverses().contains(role.getName())); } }
protected boolean hasAnonInverse(final Role role) { return !role.isBuiltin() && (role.isAnon() || _expressivity.getAnonInverses().contains(role.getName())); } }
public void activateEdge(final Edge edge) { Role r = edge.getRole(); if (r.isAnon()) r = r.getInverse(); final List<AlphaNode> alphas = _map.get(r.getName()); if (alphas != null) for (final AlphaNode alpha : alphas) ((AlphaEdgeNode) alpha).activate(edge); }
public void activateEdge(final Edge edge) { Role r = edge.getRole(); if (r.isAnon()) r = r.getInverse(); final List<AlphaNode> alphas = _map.get(r.getName()); if (alphas != null) for (final AlphaNode alpha : alphas) ((AlphaEdgeNode) alpha).activate(edge); }
if (role.isAnon()) continue;
if (role.isAnon()) continue;
return false; if (r.isAnon()) for (final Role subRole : r.getSubRoles()) if (!subRole.isAnon() && !subRole.isBottom()) return false; if (r.isAnon() && r.isFunctional()) return false; if (r.isFunctional()) final boolean isInv = r.isAnon(); for (ATermList chain : r.getSubRoleChains()) for (; !chain.isEmpty(); chain = chain.getNext())
return false; if (r.isAnon()) for (final Role subRole : r.getSubRoles()) if (!subRole.isAnon() && !subRole.isBottom()) return false; if (r.isAnon() && r.isFunctional()) return false; if (r.isFunctional()) final boolean isInv = r.isAnon(); for (ATermList chain : r.getSubRoleChains()) for (; !chain.isEmpty(); chain = chain.getNext())
default void ignoreTransitivity(final Role role) { final Role namedRole = role.isAnon() ? role.getInverse() : role; final String msg = "Unsupported axiom: Ignoring transitivity and/or complex subproperty axioms for " + namedRole; if (!OpenlletOptions.IGNORE_UNSUPPORTED_AXIOMS) throw new UnsupportedFeatureException(msg); getLogger().warning(msg); role.removeSubRoleChains(); role.setHasComplexSubRole(false); role.setSimple(true); role.setFSM(null); role.getInverse().removeSubRoleChains(); role.getInverse().setHasComplexSubRole(false); role.getInverse().setSimple(true); role.getInverse().setFSM(null); }
default void ignoreTransitivity(final Role role) { final Role namedRole = role.isAnon() ? role.getInverse() : role; final String msg = "Unsupported axiom: Ignoring transitivity and/or complex subproperty axioms for " + namedRole; if (!OpenlletOptions.IGNORE_UNSUPPORTED_AXIOMS) throw new UnsupportedFeatureException(msg); getLogger().warning(msg); role.removeSubRoleChains(); role.setHasComplexSubRole(false); role.setSimple(true); role.setFSM(null); role.getInverse().removeSubRoleChains(); role.getInverse().setHasComplexSubRole(false); role.getInverse().setSimple(true); role.getInverse().setFSM(null); }
public RoleChainCache(final KnowledgeBase kb) { _anonRoleCount = 0; _binaryRoleInclusions = CollectionUtils.makeMap(); for (final Role supRole : kb.getRBox().getRoles().values()) { if (supRole.isAnon()) continue; for (ATermList chain : supRole.getSubRoleChains()) { final int chainLength = chain.getLength(); if (chainLength <= 1) continue; ATermAppl r1 = (ATermAppl) chain.getFirst(); chain = chain.getNext(); ATermAppl r2 = (ATermAppl) chain.getFirst(); ATermAppl superRole = createSuperRoleFor(r1, r2); for (int i = 1; i < chainLength - 1; i++) { add(kb, r1, r2, superRole); r1 = superRole; chain = chain.getNext(); r2 = (ATermAppl) chain.getFirst(); superRole = createSuperRoleFor(r1, r2); } add(kb, r1, r2, supRole.getName()); } } }
public RoleChainCache(final KnowledgeBase kb) { _anonRoleCount = 0; _binaryRoleInclusions = CollectionUtils.makeMap(); for (final Role supRole : kb.getRBox().getRoles().values()) { if (supRole.isAnon()) continue; for (ATermList chain : supRole.getSubRoleChains()) { final int chainLength = chain.getLength(); if (chainLength <= 1) continue; ATermAppl r1 = (ATermAppl) chain.getFirst(); chain = chain.getNext(); ATermAppl r2 = (ATermAppl) chain.getFirst(); ATermAppl superRole = createSuperRoleFor(r1, r2); for (int i = 1; i < chainLength - 1; i++) { add(kb, r1, r2, superRole); r1 = superRole; chain = chain.getNext(); r2 = (ATermAppl) chain.getFirst(); superRole = createSuperRoleFor(r1, r2); } add(kb, r1, r2, supRole.getName()); } } }