本文整理汇总了Java中org.apache.jena.atlas.logging.Log.info方法的典型用法代码示例。如果您正苦于以下问题:Java Log.info方法的具体用法?Java Log.info怎么用?Java Log.info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jena.atlas.logging.Log
的用法示例。
在下文中一共展示了Log.info方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
public static void main(String[] args) {
System.setProperty("log4j.configuration", "file:log4j.properties") ;
Log.info(Run.class, "Start") ;
RunJetty.exec(3030);
for(int i = 0 ; i < 10000 ; i++ )
Lib.sleep(1000);
System.exit(0) ;
}
示例2: addClauses
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
private void addClauses(OWLDataPropertyExpression[] axiom) {
if(isValidDataPropertyInclusion(axiom)){
//TODO String role0 = axiom[0].getNamedProperty().toString();
String role0 = axiom[0].asOWLDataProperty().getURI().toString();
//String role0 = axiom[0].getNamedProperty().asOWLObjectProperty().getURI().toString();
//TODO String role1 = axiom[1].getNamedProperty().toString();
String role1 = axiom[1].asOWLDataProperty().getURI().toString();
//String role1 = axiom[1].getNamedProperty().asOWLObjectProperty().getURI().toString();
Term X_0 = m_termFactory.getVariable(0);
Term X_1 = m_termFactory.getVariable(1);
Term P1 = null;
Term P2 = null;
if((!axiom[0].toString().contains("InverseOf") && axiom[1].toString().contains("InverseOf")) ||
(axiom[0].toString().contains("InverseOf") && !axiom[1].toString().contains("InverseOf"))){
P1 = m_termFactory.getFunctionalTerm(role0,X_0,X_1);
P2 = m_termFactory.getFunctionalTerm(role1,X_1,X_0);
}
else if((axiom[0].toString().contains("InverseOf") && axiom[1].toString().contains("InverseOf")) ||
(!axiom[0].toString().contains("InverseOf") && !axiom[1].toString().contains("InverseOf"))){
P1 = m_termFactory.getFunctionalTerm(role0,X_0,X_1);
P2 = m_termFactory.getFunctionalTerm(role1,X_0,X_1);
}
clauses.add(new Clause(new Term[]{P1}, P2));
roles.add(role0);
roles.add(role1);
}
else{
String info = "ignoring role inclusion: ";
for(int j=0; j<axiom.length; j++){
info+=axiom[j].toString() + " ";
}
Log.info(this,info);
}
}
示例3: printIgnoring
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
private void printIgnoring(OWLDescription[] conceptInclusion){
String info = ("ignoring invalid concept inclusion: ");
for(int j=0; j < conceptInclusion.length; j++){
info+=(conceptInclusion[j].toString() + " ");
}
Log.info(this,info);
}
示例4: saturate
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
public ArrayList<Clause> saturate(ArrayList<Clause> clauses, SelectionFunction selectionFunction, String mode) {
int inferences = 0;
this.m_unprocessedClauses = clauses;
this.m_clausesCanonicals = new ArrayList<String>();
this.m_workedOffClauses = new ArrayList<Clause>();
while (!m_unprocessedClauses.isEmpty()) {
/*if(m_workedOffClauses.size()%100 == 0){
System.out.println(m_workedOffClauses.size());
}*/
Clause givenClause = m_unprocessedClauses.remove(0);
if(!givenClause.isTautology()){
selectionFunction.selectAtoms(givenClause);
m_workedOffClauses.add(givenClause);
m_clausesCanonicals.add(givenClause.m_canonicalRepresentation);
ArrayList<Clause> results = m_resolution.generateResolvents(givenClause, m_workedOffClauses);
for (Clause resolvent : results) {
inferences++;
//System.out.println("Inferences: " + inferences);
if ((!resolvent.isTautology()) &&
(!isRedundant(resolvent, mode))) { //"N" for SC check, "F" for forward subsumption
m_unprocessedClauses.add(resolvent);
m_clausesCanonicals.add(resolvent.m_canonicalRepresentation);
}
}
}
}
Log.info(this,"Inferences: " + inferences);
return prune(selectionFunction);
}
示例5: addSshKeys
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
private void addSshKeys(String newUser){
String[] addSshKeyCMD;
Log.info("SSH", "Adding Public Keys to 'authorized_keys'");
for(String publicKey : this.getPossibleAccesses()){
String addKeysString = "echo " + publicKey + " >> ~/../"
+ newUser + "/.ssh/authorized_keys";
String [] addSshKeyCMDtmp = { "/bin/sh", "-c", addKeysString };
addSshKeyCMD=addSshKeyCMDtmp;
executeCommand(addSshKeyCMD);
}
}
示例6: rewrite
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
public ArrayList<Clause> rewrite(ArrayList<Clause> clauses, String mode) throws Exception{
ArrayList<Clause> saturation = new ArrayList<Clause>();
ArrayList<Clause> rewriting = new ArrayList<Clause>();
Log.info(this,"Ontology and query loaded ("+ clauses.size() +" clauses)");
//Prune irrelevant clauses based on the dependency graph from the query
clauses = m_optimizer.pruneWithDependencyGraph("Q", clauses);
//Saturation
saturation = m_saturator.saturate(clauses, new SelectionFunctionSaturate(), mode);
Log.info(this,"Saturation completed ("+ saturation.size() +" clauses)");
//Unfolding
if(mode.equals("N") || mode.equals("F")){
rewriting = m_saturator.unfoldNaively(saturation);
}
else{
rewriting = m_saturator.unfoldGreedily(saturation);
}
Log.info(this,"Unfolding completed ("+ rewriting.size() +" clauses)");
//Optimize
if(!mode.equals("N")){
//Prune irrelevant clauses based on the dependency graph from the query
rewriting = m_optimizer.pruneWithDependencyGraph("Q", rewriting);
//Prune clauses containing AUX EDB predicates
rewriting = m_optimizer.pruneAUX(rewriting);
//Prune subsumed clauses
rewriting = m_optimizer.querySubsumptionCheck(rewriting);
//replace each query with its condensation
rewriting = m_optimizer.condensate(rewriting);
}
Log.info(this,"Pruning completed ("+ rewriting.size() +" clauses)");
return rewriting;
}