当前位置: 首页>>代码示例>>Java>>正文


Java Log.setLog4j方法代码示例

本文整理汇总了Java中org.apache.jena.atlas.logging.Log.setLog4j方法的典型用法代码示例。如果您正苦于以下问题:Java Log.setLog4j方法的具体用法?Java Log.setLog4j怎么用?Java Log.setLog4j使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.jena.atlas.logging.Log的用法示例。


在下文中一共展示了Log.setLog4j方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
public static void main(String[] args) {
    Log.setLog4j();
    Pipe p;
    if (args.length == 1) {
        p = new Pipe(args[0]);
    } else {
        p = new Pipe("./config.ttl");
    }
    p.pipescanner();
    System.exit(0);
}
 
开发者ID:ebremer,项目名称:PipeLogger,代码行数:12,代码来源:Pipe.java

示例2: main

import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
static public void main(String[] args) {
        Log.setLog4j("jena-log4j.properties");
        NafSemParameters nafSemParameters = new NafSemParameters(args);


        ArrayList<SemObject> semEvents = new ArrayList<SemObject>();
        ArrayList<SemObject> semActors = new ArrayList<SemObject>();
        ArrayList<SemTime> semTimes = new ArrayList<SemTime>();
        ArrayList<SemRelation> semRelations = new ArrayList<SemRelation>();
        KafSaxParser kafSaxParser = new KafSaxParser();
        kafSaxParser.parseFile(System.in);
        if (kafSaxParser.getKafMetaData().getUrl().isEmpty()) {
            //System.err.println("ERROR! Empty url in header NAF. Cannot create unique URIs! Aborting");
            try {
                String checkSum = MD5Checksum.getMD5ChecksumFromString(kafSaxParser.rawText);
              //  System.err.println("checkSum = " + checkSum);
                kafSaxParser.getKafMetaData().setUrl(checkSum);
            } catch (Exception e) {
             //   e.printStackTrace();
            }
        }
        GetSemFromNaf.processNafFile(nafSemParameters, kafSaxParser, semEvents, semActors, semTimes, semRelations );
        ArrayList<CompositeEvent> compositeEventArraylist = new ArrayList<CompositeEvent>();
        for (int j = 0; j < semEvents.size(); j++) {
            SemEvent mySemEvent = (SemEvent) semEvents.get(j);
            ArrayList<SemTime> myTimes = ComponentMatch.getMySemTimes(mySemEvent, semRelations, semTimes);
            ArrayList<SemActor> myActors = ComponentMatch.getMySemActors(mySemEvent, semRelations, semActors);
            ArrayList<SemRelation> myRelations = ComponentMatch.getMySemRelations(mySemEvent, semRelations);
            CompositeEvent compositeEvent = new CompositeEvent(mySemEvent, myActors, myTimes, myRelations);
            if (myTimes.size() <= nafSemParameters.getTIMEEXPRESSIONMAX()) {
                if (compositeEvent.isValid()) {
                    FrameTypes.setEventTypeString(compositeEvent.getEvent(), nafSemParameters);
                    compositeEventArraylist.add(compositeEvent);
                }
                else {
/*
                    System.out.println("Skipping EVENT due to no time anchor and/or no participant");
                    System.out.println("compositeEvent = " + compositeEvent.getEvent().getURI());
                    System.out.println("myTimes = " + myTimes.size());
                    System.out.println("myActors = " + myActors.size());
                    System.out.println("myRelations = " + myRelations.size());
*/
                }
            } else {
/*
                System.out.println("Skipping event due to excessive time expressions linked to it");
                System.out.println("compositeEvent = " + compositeEvent.getEvent().getURI());
                System.out.println("myTimes.size() = " + myTimes.size());
*/
            }
        }
        JenaSerialization.serializeJenaSimpleCompositeEvents(System.out, compositeEventArraylist);
    }
 
开发者ID:cltl,项目名称:EventCoreference,代码行数:54,代码来源:GetSimpleSemFromNafStream.java

示例3: main

import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
static public void main(String[] args) {
        Log.setLog4j("jena-log4j.properties");
        NafSemParameters nafSemParameters = new NafSemParameters(args);


        ArrayList<SemObject> semEvents = new ArrayList<SemObject>();
        ArrayList<SemObject> semActors = new ArrayList<SemObject>();
        ArrayList<SemTime> semTimes = new ArrayList<SemTime>();
        ArrayList<SemRelation> semRelations = new ArrayList<SemRelation>();
        KafSaxParser kafSaxParser = new KafSaxParser();
        kafSaxParser.parseFile(System.in);
        if (kafSaxParser.getKafMetaData().getUrl().isEmpty()) {
            //System.err.println("ERROR! Empty url in header NAF. Cannot create unique URIs! Aborting");
            try {
                String checkSum = MD5Checksum.getMD5ChecksumFromString(kafSaxParser.rawText);
              //  System.err.println("checkSum = " + checkSum);
                kafSaxParser.getKafMetaData().setUrl(checkSum);
            } catch (Exception e) {
             //   e.printStackTrace();
            }
        }
        GetSemFromNaf.processNafFile(nafSemParameters, kafSaxParser, semEvents, semActors, semTimes, semRelations );
        ArrayList<CompositeEvent> compositeEventArraylist = new ArrayList<CompositeEvent>();
        for (int j = 0; j < semEvents.size(); j++) {
            SemEvent mySemEvent = (SemEvent) semEvents.get(j);
            ArrayList<SemTime> myTimes = ComponentMatch.getMySemTimes(mySemEvent, semRelations, semTimes);
            ArrayList<SemActor> myActors = ComponentMatch.getMySemActors(mySemEvent, semRelations, semActors);
            ArrayList<SemRelation> myRelations = ComponentMatch.getMySemRelations(mySemEvent, semRelations);
            CompositeEvent compositeEvent = new CompositeEvent(mySemEvent, myActors, myTimes, myRelations);
            if (myTimes.size() <= nafSemParameters.getTIMEEXPRESSIONMAX()) {
                if (compositeEvent.isValid()) {
                    FrameTypes.setEventTypeString(compositeEvent.getEvent(), nafSemParameters);
                    compositeEventArraylist.add(compositeEvent);
                }
                else {
/*
                    System.out.println("Skipping EVENT due to no time anchor and/or no participant");
                    System.out.println("compositeEvent = " + compositeEvent.getEvent().getURI());
                    System.out.println("myTimes = " + myTimes.size());
                    System.out.println("myActors = " + myActors.size());
                    System.out.println("myRelations = " + myRelations.size());
*/
                }
            } else {
/*
                System.out.println("Skipping event due to excessive time expressions linked to it");
                System.out.println("compositeEvent = " + compositeEvent.getEvent().getURI());
                System.out.println("myTimes.size() = " + myTimes.size());
*/
            }
        }
        if (!nafSemParameters.isPERSPECTIVE()) {
            JenaSerialization.serializeJenaCompositeEvents(System.out, compositeEventArraylist, null, nafSemParameters.isILIURI(), nafSemParameters.isVERBOSE());
        }
        else {
            ArrayList<PerspectiveObject> sourcePerspectives = GetPerspectiveRelations.getSourcePerspectives(kafSaxParser,
                    semActors,
                    semEvents,
                    nafSemParameters);
            ArrayList<PerspectiveObject> documentPerspectives = GetPerspectiveRelations.getAuthorPerspectives(
                    kafSaxParser, nafSemParameters.getPROJECT(), sourcePerspectives);
            JenaSerialization.serializeJenaCompositeEventsAndPerspective(System.out, compositeEventArraylist, kafSaxParser, nafSemParameters.getPROJECT(), sourcePerspectives, documentPerspectives);
        }
    }
 
开发者ID:cltl,项目名称:EventCoreference,代码行数:65,代码来源:GetSemFromNafStream.java


注:本文中的org.apache.jena.atlas.logging.Log.setLog4j方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。