public RVF_TAX(G g, Direction dir) { super(g, new WalkConstraintGeneric(RDFS.SUBCLASSOF, dir)); }
public static WalkConstraint copy(WalkConstraint walkConstraint) { WalkConstraintGeneric newwc = new WalkConstraintGeneric(); newwc.addAcceptedTraversal(walkConstraint.getAcceptedWalks_DIR_IN(), Direction.IN); newwc.addAcceptedTraversal(walkConstraint.getAcceptedWalks_DIR_OUT(), Direction.OUT); newwc.addAcceptedTraversal(walkConstraint.getAcceptedWalks_DIR_BOTH(), Direction.BOTH); return newwc; } }
public RVF_TAX(G g, Direction dir) { super(g, new WalkConstraintGeneric(RDFS.SUBCLASSOF, dir)); }
public static WalkConstraint copy(WalkConstraint walkConstraint) { WalkConstraintGeneric newwc = new WalkConstraintGeneric(); newwc.addAcceptedTraversal(walkConstraint.getAcceptedWalks_DIR_IN(), Direction.IN); newwc.addAcceptedTraversal(walkConstraint.getAcceptedWalks_DIR_OUT(), Direction.OUT); newwc.addAcceptedTraversal(walkConstraint.getAcceptedWalks_DIR_BOTH(), Direction.BOTH); return newwc; } }
/** * @param g * @param root * @return true if the graph contains a taxonomic graph which is rooted by a * unique vertex. * @throws SLIB_Ex_Critic */ public boolean isUniqueRootedTaxonomicDag(G g, URI root) throws SLIB_Ex_Critic { WalkConstraint wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isUniqueRootedDagRoot(g, root, wc); }
/** * * @param graph * @return true if the graph contains a taxonomic graph. * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDag(G graph) throws SLIB_Ex_Critic { WalkConstraint wct = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isDag(graph, wct); }
/** * Return the vertices which root the taxonomic graph. * * @param g * @return the vertices which can be considered as a root, i.e. all the * vertices which are not subsumed by an other vertex through a taxonomic * relationship. */ public Set<URI> getTaxonomicRoots(G g) { return getDAGRoots(g, new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT)); }
/** * * @param graph * @return true if the graph contains a taxonomic graph. * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDag(G graph) throws SLIB_Ex_Critic { WalkConstraint wct = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isDag(graph, wct); }
/** * * @param graph * @return true if the graph contains a taxonomic graph. * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDag(G graph) throws SLIB_Ex_Critic { WalkConstraint wct = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isDag(graph, wct); }
/** * @param g * @param root * @return true if the graph contains a taxonomic graph which is rooted by a * unique vertex. * @throws SLIB_Ex_Critic */ public boolean isUniqueRootedTaxonomicDag(G g, URI root) throws SLIB_Ex_Critic { WalkConstraint wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isUniqueRootedDagRoot(g, root, wc); }
/** * * @param graph * @return true if the graph contains a taxonomic graph. * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDag(G graph) throws SLIB_Ex_Critic { WalkConstraint wct = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isDag(graph, wct); }
/** * Return the vertices which root the taxonomic graph. * * @param g * @return the vertices which can be considered as a root, i.e. all the * vertices which are not subsumed by an other vertex through a taxonomic * relationship. */ public Set<URI> getTaxonomicRoots(G g) { return getDAGRoots(g, new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT)); }
/** * @param g * @param root * @return true if the graph contains a taxonomic graph which is rooted by a * unique vertex. * @throws SLIB_Ex_Critic */ public boolean isUniqueRootedTaxonomicDag(G g, URI root) throws SLIB_Ex_Critic { WalkConstraint wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isUniqueRootedDagRoot(g, root, wc); }
/** * Return the vertices which root the taxonomic graph. * * @param g * @return the vertices which can be considered as a root, i.e. all the * vertices which are not subsumed by an other vertex through a taxonomic * relationship. */ public Set<URI> getTaxonomicRoots(G g) { return getDAGRoots(g, new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT)); }
/** * @param g * @param root * @return true if the graph contains a taxonomic graph which is rooted by a * unique vertex. * @throws SLIB_Ex_Critic */ public boolean isUniqueRootedTaxonomicDag(G g, URI root) throws SLIB_Ex_Critic { WalkConstraint wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN); return isUniqueRootedDagRoot(g, root, wc); }
/** * Return the vertices which root the taxonomic graph. * * @param g * @return the vertices which can be considered as a root, i.e. all the * vertices which are not subsumed by an other vertex through a taxonomic * relationship. */ public Set<URI> getTaxonomicRoots(G g) { return getDAGRoots(g, new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT)); }
/** * Check if the given graph contains a underlying taxonomic graph with a * unique root. * * @param g the graph on which the test is performed * @return true if the graph contains a unique underlying rooted taxonomic * graph * * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDagWithUniqueRoot(G g) throws SLIB_Ex_Critic { WalkConstraintGeneric wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT); Set<URI> roots = getDAGRoots(g, wc); logger.info("Number of roots " + roots.size()); logger.debug("Root(s): " + roots); if (roots.size() == 1) { isDag(g, roots.iterator().next(), new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN)); } else { valid = false; } logger.debug("isRootedTaxonomicDag (" + roots.size() + " root(s)) valid " + valid); return valid; }
/** * Check if the given graph contains a underlying taxonomic graph with a * unique root. * * @param g the graph on which the test is performed * @return true if the graph contains a unique underlying rooted taxonomic * graph * * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDagWithUniqueRoot(G g) throws SLIB_Ex_Critic { WalkConstraintGeneric wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT); Set<URI> roots = getDAGRoots(g, wc); logger.info("Number of roots " + roots.size()); logger.debug("Root(s): " + roots); if (roots.size() == 1) { isDag(g, roots.iterator().next(), new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN)); } else { valid = false; } logger.debug("isRootedTaxonomicDag (" + roots.size() + " root(s)) valid " + valid); return valid; }
/** * Check if the given graph contains a underlying taxonomic graph with a * unique root. * * @param g the graph on which the test is performed * @return true if the graph contains a unique underlying rooted taxonomic * graph * * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDagWithUniqueRoot(G g) throws SLIB_Ex_Critic { WalkConstraintGeneric wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT); Set<URI> roots = getDAGRoots(g, wc); logger.info("Number of roots " + roots.size()); logger.debug("Root(s): " + roots); if (roots.size() == 1) { isDag(g, roots.iterator().next(), new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN)); } else { valid = false; } logger.debug("isRootedTaxonomicDag (" + roots.size() + " root(s)) valid " + valid); return valid; }
/** * Check if the given graph contains a underlying taxonomic graph with a * unique root. * * @param g the graph on which the test is performed * @return true if the graph contains a unique underlying rooted taxonomic * graph * * @throws SLIB_Ex_Critic */ public boolean containsTaxonomicDagWithUniqueRoot(G g) throws SLIB_Ex_Critic { WalkConstraintGeneric wc = new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.OUT); Set<URI> roots = getDAGRoots(g, wc); logger.info("Number of roots " + roots.size()); if (roots.size() <= 20) { logger.debug("Root(s): " + roots); } if (roots.size() == 1) { isDag(g, roots.iterator().next(), new WalkConstraintGeneric(RDFS.SUBCLASSOF, Direction.IN)); } else { valid = false; } logger.debug("isRootedTaxonomicDag (" + roots.size() + " root(s)) valid " + valid); return valid; }