/** * 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); } } }
logger.debug(" Contains Rooted taxonomic DAG " + validator.containsTaxonomicDagWithUniqueRoot(g));
logger.debug(" Contains Rooted taxonomic DAG " + validator.containsTaxonomicDagWithUniqueRoot(g));
logger.debug(" Contains Rooted taxonomic DAG " + validator.containsTaxonomicDagWithUniqueRoot(g));
logger.debug(" Contains Rooted taxonomic DAG " + validator.containsTaxonomicDagWithUniqueRoot(g));