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 static java.lang.String
ARCHIVE_TYPE_PREDICATE
static java.lang.String
ARCHIVE_TYPE_READABLE
static java.lang.String
ARCHIVE_TYPE_UNREADABLE
static java.lang.String
FILE_TYPE_PREDICATE
private boolean
firstTime
static java.lang.String
HEADER_SAMPLE_PREDICATE
static java.lang.String
HEADER_TYPE_PREDICATE
static java.lang.String
LICENSE_APPROVAL_PREDICATE
static java.lang.String
LICENSE_FAMILY_PREDICATE
private static java.lang.String
NAME
static java.lang.String
RAT_REPORT
static java.lang.String
TIMESTAMP
private IXmlWriter
writer
-
Constructor Summary
Constructors Constructor Description SimpleXmlClaimReporter(IXmlWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endReport()
void
report(Document subject)
void
startReport()
private void
writeApprovedLicense(MetaData metaData)
protected void
writeClaim(java.lang.String pPredicate, java.lang.String pObject, boolean pLiteral)
Writes a single claim to the XML file.private void
writeDocumentCategory(MetaData metaData)
private void
writeDocumentClaims(Document subject)
private void
writeHeaderCategory(MetaData metaData)
private void
writeHeaderSample(MetaData metaData)
private void
writeLicenseFamilyName(MetaData metaData)
-
-
-
Field Detail
-
RAT_REPORT
public static final java.lang.String RAT_REPORT
- See Also:
- Constant Field Values
-
TIMESTAMP
public static final java.lang.String TIMESTAMP
- See Also:
- Constant Field Values
-
LICENSE_APPROVAL_PREDICATE
public static final java.lang.String LICENSE_APPROVAL_PREDICATE
- See Also:
- Constant Field Values
-
LICENSE_FAMILY_PREDICATE
public static final java.lang.String LICENSE_FAMILY_PREDICATE
- See Also:
- Constant Field Values
-
HEADER_SAMPLE_PREDICATE
public static final java.lang.String HEADER_SAMPLE_PREDICATE
- See Also:
- Constant Field Values
-
HEADER_TYPE_PREDICATE
public static final java.lang.String HEADER_TYPE_PREDICATE
- See Also:
- Constant Field Values
-
FILE_TYPE_PREDICATE
public static final java.lang.String FILE_TYPE_PREDICATE
- See Also:
- Constant Field Values
-
ARCHIVE_TYPE_PREDICATE
public static final java.lang.String ARCHIVE_TYPE_PREDICATE
- See Also:
- Constant Field Values
-
ARCHIVE_TYPE_UNREADABLE
public static final java.lang.String ARCHIVE_TYPE_UNREADABLE
- See Also:
- Constant Field Values
-
ARCHIVE_TYPE_READABLE
public static final java.lang.String ARCHIVE_TYPE_READABLE
- 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, RatException
Writes 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:
report
in interfaceRatReport
- Overrides:
report
in classAbstractReport
- Throws:
RatException
-
writeDocumentClaims
private void writeDocumentClaims(Document subject) throws java.io.IOException, RatException
- Throws:
java.io.IOException
RatException
-
writeApprovedLicense
private void writeApprovedLicense(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOException
RatException
-
writeLicenseFamilyName
private void writeLicenseFamilyName(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOException
RatException
-
writeHeaderCategory
private void writeHeaderCategory(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOException
RatException
-
writeHeaderSample
private void writeHeaderSample(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOException
RatException
-
writeDocumentCategory
private void writeDocumentCategory(MetaData metaData) throws java.io.IOException, RatException
- Throws:
java.io.IOException
RatException
-
startReport
public void startReport() throws RatException
- Specified by:
startReport
in interfaceRatReport
- Overrides:
startReport
in classAbstractReport
- Throws:
RatException
-
endReport
public void endReport() throws RatException
- Specified by:
endReport
in interfaceRatReport
- Overrides:
endReport
in classAbstractReport
- Throws:
RatException
-
-