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); }
/** * 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); }
/** * * @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); }
/** * Root the underlying taxonomic DAG of the specified graph. * * @param g * @param rootUri * @return the URI of the root * @throws SLIB_Ex_Critic */ public static URI rootUnderlyingTaxonomicDAG(G g, URI rootUri) throws SLIB_Ex_Critic { Logger logger = LoggerFactory.getLogger(RooterDAG.class); logger.info("Rooting taxonomic Graph using " + rootUri); ValidatorDAG validator = new ValidatorDAG(); if (!validator.containsTaxonomicDagWithUniqueRoot(g)) { return rootUnderlyingDAG(g, rootUri, new WalkConstraintGeneric(RDFS.SUBCLASSOF,Direction.OUT),true); } else { return validator.getUniqueTaxonomicRoot(g); } } }
/** * Root the underlying taxonomic DAG of the specified graph. * * @param g * @param rootUri * @return the URI of the root * @throws SLIB_Ex_Critic */ public static URI rootUnderlyingTaxonomicDAG(G g, URI rootUri) throws SLIB_Ex_Critic { Logger logger = LoggerFactory.getLogger(RooterDAG.class); logger.info("Rooting taxonomic Graph using " + rootUri); ValidatorDAG validator = new ValidatorDAG(); if (!validator.containsTaxonomicDagWithUniqueRoot(g)) { return rootUnderlyingDAG(g, rootUri, new WalkConstraintGeneric(RDFS.SUBCLASSOF,Direction.OUT),true); } else { return validator.getUniqueTaxonomicRoot(g); } } }
/** * Root the underlying taxonomic DAG of the specified graph. * * @param g * @param rootUri * @return the URI of the root * @throws SLIB_Ex_Critic */ public static URI rootUnderlyingTaxonomicDAG(G g, URI rootUri) throws SLIB_Ex_Critic { Logger logger = LoggerFactory.getLogger(RooterDAG.class); logger.info("Rooting taxonomic Graph using " + rootUri); ValidatorDAG validator = new ValidatorDAG(); if (!validator.containsTaxonomicDagWithUniqueRoot(g)) { return rootUnderlyingDAG(g, rootUri, new WalkConstraintGeneric(RDFS.SUBCLASSOF,Direction.OUT),true); } else { return validator.getUniqueTaxonomicRoot(g); } } }
/** * Root the underlying taxonomic DAG of the specified graph. * * @param g * @param rootUri * @return the URI of the root * @throws SLIB_Ex_Critic */ public static URI rootUnderlyingTaxonomicDAG(G g, URI rootUri) throws SLIB_Ex_Critic { Logger logger = LoggerFactory.getLogger(RooterDAG.class); logger.info("Rooting taxonomic Graph using " + rootUri); ValidatorDAG validator = new ValidatorDAG(); if (!validator.containsTaxonomicDagWithUniqueRoot(g)) { return rootUnderlyingDAG(g, rootUri, new WalkConstraintGeneric(RDFS.SUBCLASSOF,Direction.OUT),true); } else { return validator.getUniqueTaxonomicRoot(g); } } }