Package org.apache.rat.document

Examples of org.apache.rat.document.IDocumentAnalyser


            }

            public void reset() {
            }           
        };
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createDefaultAnalyser(matcher);
        final List<AbstractReport> reporters = new ArrayList<AbstractReport>();
        reporters.add(reporter);
        report = new ClaimReporterMultiplexer(analyser, reporters);
    }
View Full Code Here


            }

            public void reset() {
            }           
        };
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createDefaultAnalyser(matcher);
        final List reporters = new ArrayList();
        reporters.add(reporter);
        report = new ClaimReporterMultiplexer(analyser, reporters);
    }
View Full Code Here

    }


    public void testStandardTypeAnalyser() throws Exception {
        MonolithicFileDocument document = new MonolithicFileDocument(new File("src/test/elements/Text.txt"));
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createStandardTypeAnalyser(reporter);
        analyser.analyse(document);
        assertEquals("Open standard element", "<resource name='src/test/elements/Text.txt'><type name='standard'/>", out.toString());
    }
View Full Code Here

        assertEquals("Open standard element", "<resource name='src/test/elements/Text.txt'><type name='standard'/>", out.toString());
    }

    public void testNoteTypeAnalyser() throws Exception {
        MonolithicFileDocument document = new MonolithicFileDocument(new File("src/test/elements/LICENSE"));
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createNoticeTypeAnalyser(reporter);
        analyser.analyse(document);
        assertEquals("Open note element", "<resource name='src/test/elements/LICENSE'><type name='notice'/>", out.toString());
    }
View Full Code Here

        assertEquals("Open note element", "<resource name='src/test/elements/LICENSE'><type name='notice'/>", out.toString());
    }

    public void testBinaryTypeAnalyser() throws Exception {
        MonolithicFileDocument document = new MonolithicFileDocument(new File("src/test/elements/Image.png"));
        IDocumentAnalyser analyser = DefaultAnalyserFactory.createBinaryTypeAnalyser(reporter);
        analyser.analyse(document);
        assertEquals("Open note element", "<resource name='src/test/elements/Image.png'><type name='binary'/>", out.toString());
    }
View Full Code Here

        assertEquals("Open note element", "<resource name='src/test/elements/Image.png'><type name='binary'/>", out.toString());
    }

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

        final SimpleXmlClaimReporter reporter = new SimpleXmlClaimReporter(writer);
        final DefaultPolicy policy = new DefaultPolicy(reporter, approvedLicenses);
        final IClaimReporter[] reporters = {reporter, policy};
        final ClaimReporterMultiplexer multiplexer = new ClaimReporterMultiplexer(reporters);
       
        final IDocumentAnalyser analyser =
            DefaultAnalyserFactory.createDefaultAnalyser(multiplexer, matcher);
       
        final RatReport result = new XmlReport(writer, analyser);
        return result;
    }
View Full Code Here

        super.setUp();
        out = new StringWriter();
        writer = new XmlWriter(out);
        writer.startDocument();
        final SimpleXmlClaimReporter reporter = new SimpleXmlClaimReporter(writer);
        IDocumentAnalyser archiveAnalyser = DefaultAnalyserFactory.createArchiveTypeAnalyser(reporter);
        IDocumentAnalyser binaryAnalyser = DefaultAnalyserFactory.createBinaryTypeAnalyser(reporter);
        IDocumentAnalyser noticeAnalyser = DefaultAnalyserFactory.createNoticeTypeAnalyser(reporter);
        IDocumentAnalyser standardAnalyser = DefaultAnalyserFactory.createStandardTypeAnalyser(reporter);
        IDocumentAnalyser analyser =DefaultAnalyserFactory.createDefaultAnalyser(binaryAnalyser, archiveAnalyser, noticeAnalyser, standardAnalyser);
        report = new XmlReport(writer, analyser);
    }
View Full Code Here

        final AbstractSingleClaimAnalyser constantClaimAnalyser = new ConstantClaimAnalyser(reporter, "type", "standard", false);
        return constantClaimAnalyser;
    }
   
    public static final IDocumentAnalyser createDefaultBinaryAnalyser(final IClaimReporter reporter) {
        final IDocumentAnalyser result = createBinaryTypeAnalyser(reporter);
        return result;
    }
View Full Code Here

        final IDocumentAnalyser result = createBinaryTypeAnalyser(reporter);
        return result;
    }
   
    public static final IDocumentAnalyser createDefaultNoticeAnalyser(final IClaimReporter reporter) {
        final IDocumentAnalyser result = createNoticeTypeAnalyser(reporter);
        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.rat.document.IDocumentAnalyser

Copyright © 2018 www.massapicom. 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.