Examples of analyse()


Examples of org.apache.rat.document.IDocumentAnalyser.analyse()

    @Test
    public void noteTypeAnalyser() throws Exception {
        MonolithicFileDocument document = new MonolithicFileDocument(new File("src/test/elements/LICENSE"));
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createDefaultAnalyser(matcherStub);
        analyser.analyse(document);
        reporter.report(document);
        assertEquals("Open note element", "<resource name='src/test/elements/LICENSE'><type name='notice'/>", out.toString());
    }

    @Test
View Full Code Here

Examples of org.apache.rat.document.IDocumentAnalyser.analyse()

    @Test
    public void binaryTypeAnalyser() throws Exception {
        MonolithicFileDocument document = new MonolithicFileDocument(new File("src/test/elements/Image.png"));
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createDefaultAnalyser(matcherStub);
        analyser.analyse(document);
        reporter.report(document);
        assertEquals("Open binary element", "<resource name='src/test/elements/Image.png'><type name='binary'/>", out.toString());
    }

    @Test
View Full Code Here

Examples of org.apache.rat.document.IDocumentAnalyser.analyse()

    @Test
    public void archiveTypeAnalyser() throws Exception {
        MonolithicFileDocument document = new MonolithicFileDocument(new File("src/test/elements/Dummy.jar"));
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createDefaultAnalyser(matcherStub);
        analyser.analyse(document);
        reporter.report(document);
        assertEquals("Open archive element", "<resource name='src/test/elements/Dummy.jar'><type name='archive'/>", out.toString());
    }
}
View Full Code Here

Examples of org.apache.stanbol.commons.opennlp.TextAnalyzer.analyse()

    }

    @Test
    public void testMultipleSentenceDefaultConfig(){
        TextAnalyzer analyzer = new TextAnalyzer(openNLP,LANGUAGE);
        Iterator<AnalysedText> analysedSentences = analyzer.analyse(MULTI_SENTENCES);
        assertNotNull(analysedSentences);
        int sentenceCount = 0;
        while(analysedSentences.hasNext()){
            AnalysedText analysed = analysedSentences.next();
            checkSingleSentence(analysed, MULTIPLE_SENTENCE_TOKENS[sentenceCount], true, true);
View Full Code Here

Examples of org.apache.stanbol.commons.opennlp.TextAnalyzer.analyse()

    }

    @Test
    public void testMultipleSentenceDefaultConfig(){
        TextAnalyzer analyzer = new TextAnalyzer(openNLP,LANGUAGE);
        Iterator<AnalysedText> analysedSentences = analyzer.analyse(MULTI_SENTENCES);
        assertNotNull(analysedSentences);
        int sentenceCount = 0;
        while(analysedSentences.hasNext()){
            AnalysedText analysed = analysedSentences.next();
            checkSingleSentence(analysed, MULTIPLE_SENTENCE_TOKENS[sentenceCount], true, true);
View Full Code Here

Examples of org.drools.guvnor.server.util.VerifierRunner.analyse()

        }

        String drl = this.buildPackageSource( packageUUID );
        VerifierRunner runner = new VerifierRunner();
        try {
            return runner.analyse( drl );
        } catch ( DroolsParserException e ) {
            log.error( e );
            throw new DetailedSerializableException( "Unable to parse the rules.",
                                                     e.getMessage() );
        }
View Full Code Here

Examples of util.paramhandler.ParamParser.analyse()

      return;
    }

    ParamParser parser = new ParamParser();

    String title = parser.analyse(formating.getTitleValue(), program);
    String content = parser.analyse(formating.getContentValue(), program);
    String url = program.getChannel().getWebpage();

    try {
      Launch.openURL(urlFactory(title, content, url));
View Full Code Here

Examples of util.paramhandler.ParamParser.analyse()

    }

    ParamParser parser = new ParamParser();

    String title = parser.analyse(formating.getTitleValue(), program);
    String content = parser.analyse(formating.getContentValue(), program);
    String url = program.getChannel().getWebpage();

    try {
      Launch.openURL(urlFactory(title, content, url));
    } catch (Exception e) {
View Full Code Here

Examples of util.paramhandler.ParamParser.analyse()

      SimpleDateFormat formatTime = new SimpleDateFormat("HH:mm:ss");
      formatTime.setTimeZone(TimeZone.getTimeZone("GMT"));

      ParamParser parser = new ParamParser();
      for (Program program : programs) {
        final String title = parser.analyse(formatting.getTitleValue(), program);

        // First step: search for event in calendar
        boolean createEvent = true;

        CalendarEventEntry entry = findEntryForProgram(myService, postUrl, title, program);
View Full Code Here

Examples of util.paramhandler.ParamParser.analyse()

        if (createEvent) {
          EventEntry myEntry = new EventEntry();

          myEntry.setTitle(new PlainTextConstruct(title));

          String desc = parser.analyse(formatting.getContentValue(), program);
          myEntry.setContent(new PlainTextConstruct(desc));

          Calendar c = CalendarToolbox.getStartAsCalendar(program);

          DateTime startTime = new DateTime(c.getTime(), c.getTimeZone());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.