Class SimpleXmlClaimReporter
- java.lang.Object
-
- org.apache.rat.report.AbstractReport
-
- org.apache.rat.report.claim.impl.xml.SimpleXmlClaimReporter
-
- All Implemented Interfaces:
RatReport
public class SimpleXmlClaimReporter extends AbstractReport
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringFILE_TYPE_PREDICATEprivate booleanfirstTimeprivate static java.lang.StringHEADER_SAMPLE_PREDICATEprivate static java.lang.StringHEADER_TYPE_PREDICATEprivate static java.lang.StringLICENSE_APPROVAL_PREDICATEprivate static java.lang.StringLICENSE_FAMILY_PREDICATEprivate static java.lang.StringNAMEprivate static java.lang.StringRAT_REPORTprivate static java.lang.StringTIMESTAMPprivate IXmlWriterwriter
-
Constructor Summary
Constructors Constructor Description SimpleXmlClaimReporter(IXmlWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendReport()voidreport(Document subject)voidstartReport()private voidwriteApprovedLicense(MetaData metaData)protected voidwriteClaim(java.lang.String pPredicate, java.lang.String pObject, boolean pLiteral)Writes a single claim to the XML file.private voidwriteDocumentCategory(MetaData metaData)private voidwriteDocumentClaims(Document subject)private voidwriteHeaderCategory(MetaData metaData)private voidwriteHeaderSample(MetaData metaData)private voidwriteLicenseFamilyName(MetaData metaData)
-
-
-
Field Detail
-
RAT_REPORT
private static final java.lang.String RAT_REPORT
- See Also:
- Constant Field Values
-
TIMESTAMP
private static final java.lang.String TIMESTAMP
- See Also:
- Constant Field Values
-
LICENSE_APPROVAL_PREDICATE
private static final java.lang.String LICENSE_APPROVAL_PREDICATE
- See Also:
- Constant Field Values
-
LICENSE_FAMILY_PREDICATE
private static final java.lang.String LICENSE_FAMILY_PREDICATE
- See Also:
- Constant Field Values
-
HEADER_SAMPLE_PREDICATE
private static final java.lang.String HEADER_SAMPLE_PREDICATE
- See Also:
- Constant Field Values
-
HEADER_TYPE_PREDICATE
private static final java.lang.String HEADER_TYPE_PREDICATE
- See Also:
- Constant Field Values
-
FILE_TYPE_PREDICATE
private static final java.lang.String FILE_TYPE_PREDICATE
- See Also:
- Constant Field Values
-
writer
private final IXmlWriter writer
-
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
-
firstTime
private boolean firstTime
-
-
Constructor Detail
-
SimpleXmlClaimReporter
public SimpleXmlClaimReporter(IXmlWriter writer)
-
-
Method Detail
-
writeClaim
protected void writeClaim(java.lang.String pPredicate, java.lang.String pObject, boolean pLiteral) throws java.io.IOException, RatExceptionWrites a single claim to the XML file.- Parameters:
pPredicate- The claims predicate.pObject- The claims object.pLiteral- Whether to write the object as an element (true), or an attribute (false).- Throws:
java.io.IOException- An I/O error occurred while writing the claim.RatException- Another error occurred while writing the claim.
-
report
public void report(Document subject) throws RatException
- Specified by:
reportin interfaceRatReport- Overrides:
reportin classAbstractReport- Throws:
RatException
-
writeDocumentClaims
private void writeDocumentClaims(Document subject) throws java.io.IOException, RatException
- Throws:
java.io.IOExceptionRatException
-
writeApprovedLicense
private void writeApprovedLicense(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOExceptionRatException
-
writeLicenseFamilyName
private void writeLicenseFamilyName(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOExceptionRatException
-
writeHeaderCategory
private void writeHeaderCategory(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOExceptionRatException
-
writeHeaderSample
private void writeHeaderSample(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOExceptionRatException
-
writeDocumentCategory
private void writeDocumentCategory(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOExceptionRatException
-
startReport
public void startReport() throws RatException- Specified by:
startReportin interfaceRatReport- Overrides:
startReportin classAbstractReport- Throws:
RatException
-
endReport
public void endReport() throws RatException- Specified by:
endReportin interfaceRatReport- Overrides:
endReportin classAbstractReport- Throws:
RatException
-
-