There are 4 code examples for org.apache.log4j.Level.
The API names are highlighted below.
You can use
button
to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.
Project Name: icTAKES Package: edu.mayo.bmi.uima.pad.impl
Source Code: PADLocationConsumerImpl.java (Click to view .java file)
Method Code:
private void addLocation(JCas jcas,MetaDataHit metaData,int neBegin,int neEnd){
String mfValue=null;
boolean skipTerm=false;
mfValue=metaData.getMetaFieldValue("1");
String standAlone=metaData.getMetaFieldValue("2");
iv_logger.log(Level.INFO,"Meta field 1 [" + mfValue + "] col2["+ standAlone+ "]");
int cutOffForRevision=findOriginalReportSubSection(jcas);
PADLocation locationTerm=new PADLocation(jcas);
locationTerm.setHitDictionaryValue(mfValue);
if (standAlone != null && standAlone.equalsIgnoreCase(STAND_ALONE)) locationTerm.setIsStandAlone(TRUE);
else {
locationTerm.setIsStandAlone(FALSE);
locationTerm.setTypeID(new Integer(standAlone).intValue());
}
locationTerm.setBegin(neBegin);
locationTerm.setEnd(neEnd);
List list=getTokenData(jcas,locationTerm);
FSArray fsArr=new FSArray(jcas,list.size());
for (int i=0; i < list.size(); i++) {
BaseToken wta=(BaseToken)list.get(i);
if (wta.getCoveredText().compareToIgnoreCase("at") != 0 || (wta.getCoveredText().compareTo("AT") == 0 && wta.getPartOfSpeech().compareTo("IN") != 0)) fsArr.set(i,wta);
else if (i == 0) skipTerm=true;
}
String segStatus=getSubSectionStatus(locationTerm,jcas,cutOffForRevision);
if (!skipTerm && (segStatus.compareTo("-1") == 0 || segStatus.compareTo("1") != 0)) {
locationTerm.setRelatedTokens(fsArr);
String segId=getSegmentIdContaining(locationTerm,jcas);
locationTerm.setSegmentID(segId);
locationTerm.addToIndexes();
}
}
Project Name: icTAKES Package: edu.mayo.bmi.uima.pad.impl
Source Code: PADTermConsumerImpl.java (Click to view .java file)
Method Code:
private void addTerm(JCas jcas,MetaDataHit metaData,int neBegin,int neEnd){
String mfValue=null;
mfValue=metaData.getMetaFieldValue("1");
String mfIsStandAlone=metaData.getMetaFieldValue("2");
iv_logger.log(Level.INFO,"Meta field 1 [" + mfValue + "] col2["+ mfIsStandAlone+ "]");
int cutOffForRevision=findOriginalReportSubSection(jcas);
PADTerm uaTerm=new PADTerm(jcas);
uaTerm.setHitDictionaryValue(mfValue);
uaTerm.setBegin(neBegin);
uaTerm.setEnd(neEnd);
String segStatus=getSubSectionStatus(uaTerm,jcas,cutOffForRevision);
if (mfIsStandAlone != null && mfIsStandAlone.equalsIgnoreCase(STAND_ALONE)) uaTerm.setIsStandAlone(TRUE);
else {
uaTerm.setIsStandAlone(FALSE);
uaTerm.setTypeID(new Integer(mfIsStandAlone).intValue());
}
List<?> list=getTokenData(jcas,uaTerm);
FSArray fsArr=new FSArray(jcas,list.size());
for (int i=0; i < list.size(); i++) fsArr.set(i,(WordToken)list.get(i));
uaTerm.setRelatedTokens(fsArr);
if (segStatus.compareTo("-1") == 0 || segStatus.compareTo("1") != 0) {
String segId=getSegmentIdContaining(uaTerm,jcas);
uaTerm.setSegmentID(segId);
uaTerm.addToIndexes();
}
}
Project Name: icTAKES Package: edu.mayo.bmi.uima.termspotter.ae
Source Code: PADHitAnnotator.java (Click to view .java file)
Method Code:
/**
* Checks if the annotations passed are adjacent to each other and are instances of
* PADLocation and PADTerm.
* @param jcas
* @param prevAnn
* @param currAnn
*/
private void processTermAndLocation(JCas jcas,Annotation prevAnn,Annotation currAnn){
if (iv_logger.getLevel() == Level.DEBUG) iv_logger.debug("Processing term and loc[" + prevAnn.getCoveredText() + "] currAnn["+ currAnn.getCoveredText()+ "]");
if (isAdjacentWithWindowSize(jcas,prevAnn,currAnn,iAnnotationType,iWindowSize)) {
boolean isHit=false;
PADLocation ual=null;
PADTerm uat=null;
if ((prevAnn != null && prevAnn instanceof PADLocation) && (currAnn != null && currAnn instanceof PADTerm)) {
ual=(PADLocation)prevAnn;
uat=(PADTerm)currAnn;
isHit=true;
}
else if ((prevAnn != null && prevAnn instanceof PADTerm) && (currAnn != null && currAnn instanceof PADLocation)) {
uat=(PADTerm)prevAnn;
ual=(PADLocation)currAnn;
isHit=true;
}
else if (prevAnn != null) {
if (prevAnn instanceof PADTerm && ((PADTerm)prevAnn).getIsStandAlone() == 1) {
uat=(PADTerm)prevAnn;
ual=null;
isHit=true;
}
else if (prevAnn instanceof PADLocation && ((PADLocation)prevAnn).getIsStandAlone() == 1) {
ual=(PADLocation)prevAnn;
uat=null;
isHit=true;
}
}
if (isHit) {
PADHit uah=new PADHit(jcas);
uah.setUaLocation(ual);
uah.setUaTerm(uat);
uah.addToIndexes();
}
}
}
Project Name: streamy.core Package: com.migniot.streamy.core
Source Code: CorePlugin.java (Click to view .java file)
Method Code:
/**
* Apply the logger levels.
*/
public void applyLoggerLevels(){
String level=getPluginPreferences().getString(CorePreferenceInitializer.DEBUG_LEVEL);
Logger.getRootLogger().setLevel(Level.toLevel(level));
boolean headers=getPluginPreferences().getBoolean(CorePreferenceInitializer.DEBUG_HEADERS);
Level headersLevel=(headers ? Level.DEBUG : Level.WARN);
Logger.getLogger("headers").setLevel(headersLevel);
}