本文整理汇总了Java中org.semanticweb.HermiT.Configuration类的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Configuration类属于org.semanticweb.HermiT包,在下文中一共展示了Configuration类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setOntology
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
@Override
public void setOntology(OWLOntology o) {
this.ontology = o;
this.manager = o.getOWLOntologyManager();
Configuration conf = new Configuration();
this.reasoner = new Reasoner(conf, ontology);
}
示例2: ReducedABoxOnlyClausification
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
public ReducedABoxOnlyClausification(Configuration configuration, OWLDataFactory factory, Set<AtomicConcept> allAtomicConcepts, Set<AtomicRole> allAtomicObjectRoles, Set<AtomicRole> allAtomicDataRoles) {
m_warningMonitor=configuration.warningMonitor;
m_ignoreUnsupportedDatatypes=configuration.ignoreUnsupportedDatatypes;
m_factory=factory;
m_allAtomicConcepts=allAtomicConcepts;
m_allAtomicObjectRoles=allAtomicObjectRoles;
m_allAtomicDataRoles=allAtomicDataRoles;
m_positiveFacts=new HashSet<Atom>();
m_negativeFacts=new HashSet<Atom>();
m_allIndividuals=new HashSet<Individual>();
}
示例3: createReasoner
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
/**
* Create a HermiT reasoner instance
* @param useProgressMonitor true if a progress monitor should be used, false otherwise
* @return Reasoner instance
*/
public OWLReasoner createReasoner(boolean useProgressMonitor) {
Configuration config = new Configuration();
config.freshEntityPolicy = FreshEntityPolicy.ALLOW;
if(verbose) System.out.print(" Creating reasoner... ");
long start = System.currentTimeMillis();
OWLReasoner reasoner = new Reasoner(config, ont);
long end = System.currentTimeMillis();
if(verbose) System.out.println("done (" + (end-start)/1000.0 + " secs)");
return reasoner;
}
示例4: setUpReasoner
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
protected void setUpReasoner(boolean useFactory) throws Exception{
//new SimpleConfiguration()); //BufferingMode.NON_BUFFERING
//This may avoid the exception due to datatypes outside OWL 2 specification
Configuration conf = new Configuration();
conf.ignoreUnsupportedDatatypes=true;
if (useFactory){
reasonerFactory = new Reasoner.ReasonerFactory();
reasoner = reasonerFactory.createReasoner(ontoBase, conf);
}
else{
reasoner=new HermiT_adapted(ontoBase, conf);
}
reasonerName = "HermiT";//reasoner.getReasonerName();
}
示例5: HermiT_adapted
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
public HermiT_adapted(OWLOntology rootOntology, Configuration conf) throws Exception{
super(conf, rootOntology);
}
示例6: OWLClausification
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
public OWLClausification(Configuration configuration) {
m_configuration=configuration;
}
示例7: DataRangeConverter
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
public DataRangeConverter(Configuration.WarningMonitor warningMonitor,Set<String> definedDatatypeIRIs,Set<DatatypeRestriction> allUnknownDatatypeRestrictions,boolean ignoreUnsupportedDatatypes) {
m_warningMonitor=warningMonitor;
m_definedDatatypeIRIs=definedDatatypeIRIs;
m_ignoreUnsupportedDatatypes=ignoreUnsupportedDatatypes;
m_allUnknownDatatypeRestrictions=allUnknownDatatypeRestrictions;
}
示例8: createHermit
import org.semanticweb.HermiT.Configuration; //导入依赖的package包/类
@SuppressWarnings("unused")
private Pair<OWLReasoner, OWLReasonerFactory> createHermit(final OWLOntology ontology) {
// use Hermit, as GO has inverse_of relations between part_of and has_part
OWLReasonerFactory factory = new org.semanticweb.HermiT.ReasonerFactory();
final Configuration configuration = new Configuration();
configuration.reasonerProgressMonitor = new ReasonerProgressMonitor() {
// generated
private static final long serialVersionUID = 5925042026163506083L;
@Override
public void reasonerTaskStopped() {
logger.info("HermiT reasoning task - Finished.");
}
@Override
public void reasonerTaskStarted(String taskName) {
logger.info("HermiT reasoning task - Start: "+taskName);
}
double lastProgress = 0.0d;
@Override
public void reasonerTaskProgressChanged(int value, int max) {
double progress = value / (double) max;
if (Math.abs(progress - lastProgress) > 0.05d) {
NumberFormat percentFormat = NumberFormat.getPercentInstance();
percentFormat.setMaximumFractionDigits(1);
logger.info("HermiT reasoning task - Progress: "+percentFormat.format(progress));
lastProgress = progress;
}
}
@Override
public void reasonerTaskBusy() {
// do nothing
}
};
OWLReasoner reasoner = factory.createReasoner(ontology, configuration);
return Pair.of(reasoner, factory);
}