Skip to content

Commit

Permalink
Fix javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitakovaliov92 committed Aug 6, 2024
1 parent bd86bac commit dabb4f9
Show file tree
Hide file tree
Showing 22 changed files with 90 additions and 123 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/verapdf/core/JAXBCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
/**
* Generic collection wrapper class.
*
* Makes it easier to (un)marshall a collectiono of a single type.
* Makes it easier to (un)marshall a collection of a single type.
*
* @author Arno Moonen <info@arnom.nl>
* @author <a href="mailto:info@arnom.nl">Arno Moonen</a>
*/
public class JAXBCollection<T>
{
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/java/org/verapdf/core/MapBackedRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ public MapBackedRegistry() {

/**
* Creates a registry instance initialise using the passed map
*
* @param map
* a <code>Map<K, V> instance used to initialise the registry.
*
* @param map a <code>Map&lt;K, V&gt;</code> instance used to initialise the registry.
*/
public MapBackedRegistry(final Map<K, V> map) {
super(map);
Expand Down
7 changes: 3 additions & 4 deletions core/src/main/java/org/verapdf/core/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public interface Registry<K, V> extends Directory<K, V> {
V registerItem(final K key, final V value);

/**
* Add a Map<K, V> of items to the Registry
* Add a Map&lt;K, V&gt; of items to the Registry
*
* @param itemMap
*/
Expand Down Expand Up @@ -86,9 +86,8 @@ public interface Registry<K, V> extends Directory<K, V> {
/**
* Registers or updates all item in Registry caring not if the items already
* exist or not.
*
* @param itemMap
* a Map of keys & values to add.
*
* @param itemMap a Map of keys &amp; values to add.
*/
void putdateItems(final Map<K, V> itemMap);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ public static ValidationStatus validationStatus(
* @param objects
* metadata failed rules type
* @return validation status
* @throws IOException
* @throws URISyntaxException
* @throws ParserConfigurationException
* @throws SAXException
*/
public static ValidationStatus validationStatus(
List<TestAssertion> assertions, ValidationProfile profile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
* run different handling of document.
*
* @author Evgeniy Muravitskiy
* @see org.verapdf.metadata.fixer.gf.MetadataFixerImpl#fixAndSaveDocument(java.io.OutputStream,
* org.verapdf.metadata.fixer.entity.PDFDocument, org.verapdf.pdfa.results.ValidationResult, boolean,
* org.verapdf.metadata.fixer.utils.parser.ProcessedObjectsParser)
* @see org.verapdf.metadata.fixer.utils.ProcessedObjectsInspector
*/
public enum ValidationStatus {
Expand Down Expand Up @@ -89,17 +86,16 @@ public static ValidationStatus valueOf(int index) {

/**
* Return combination of current status and given status according to next table:
* <p>
*
* <table border="1" style="border: 1px solid">
* <col border="1" style="border: 1px solid"/>
* <col border="1" style="border: 1px solid"/>
* <col border="1" style="border: 1px solid"/>
* <body>
* <caption>Table: Validation status</caption>
* <tr>
* <th>Current value</th>
* <th>Passed value</th>
* <th>Result value</th>
* </tr>
* <tr border="1" style="border: 1px solid" >
* <tr style="border: 1px solid">
* <td rowspan="5">INVALID_DOCUMENT</td>
* <tr>
* <td>INVALID_DOCUMENT</td>
Expand All @@ -117,8 +113,7 @@ public static ValidationStatus valueOf(int index) {
* <td>VALID</td>
* <td>INVALID_DOCUMENT</td>
* </tr>
* </tr>
* <tr border="1" style="border: 1px solid" >
* <tr style="border: 1px solid">
* <td rowspan="5">INVALID_STRUCTURE</td>
* <tr>
* <td>INVALID_DOCUMENT</td>
Expand All @@ -136,8 +131,7 @@ public static ValidationStatus valueOf(int index) {
* <td>VALID</td>
* <td>INVALID_STRUCTURE</td>
* </tr>
* </tr>
* <tr border="1" style="border: 1px solid" >
* <tr style="border: 1px solid">
* <td rowspan="5">INVALID_METADATA</td>
* <tr>
* <td>INVALID_DOCUMENT</td>
Expand All @@ -155,8 +149,7 @@ public static ValidationStatus valueOf(int index) {
* <td>VALID</td>
* <td>INVALID_METADATA</td>
* </tr>
* </tr>
* <tr border="1" style="border: 1px solid" >
* <tr style="border: 1px solid">
* <td rowspan="5">VALID</td>
* <tr>
* <td>INVALID_DOCUMENT</td>
Expand All @@ -174,11 +167,10 @@ public static ValidationStatus valueOf(int index) {
* <td>VALID</td>
* <td>VALID</td>
* </tr>
* </tr>
* </body>
* </table>
*
* @param status passed status argument
*
* @return result status
*/
public ValidationStatus getStatus(ValidationStatus status) {
Expand Down
8 changes: 2 additions & 6 deletions core/src/main/java/org/verapdf/pdfa/PDFAValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,10 @@ public interface PDFAValidator extends Component {
*
* @param toValidate
* a {@link java.io.InputStream} to be validated
* @return a {@link ValidationResult} containing the result of valdiation
* @return a {@link ValidationResult} containing the result of validation
* and details of failed checks and possibly passed checks,
* dependent upon configuration.
* @throws ValidationException
* @throws org.verapdf.core.ModelParsingException
* @throws IllegalArgumentException
* if the toValidate parameter is null PDFAValidationException
* if the validation process fails
* @throws ValidationException
*/
public ValidationResult validate(PDFAParser toValidate) throws ValidationException;

Expand Down
58 changes: 27 additions & 31 deletions core/src/main/java/org/verapdf/pdfa/flavours/PDFAFlavour.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,40 @@
import java.util.Set;

/**
* Enums used as id for PDF/A flavours where a flavour uniquely identifies a
* specific PDF/A Standard part and associated conformance level.
*
* The PDF/A Specification:<br/>
* ISO 19005 - Document Management - Electronic document format for long-term
* preservation (PDF/A)<br/>
* Enums used as id for PDF/A flavours where a flavour uniquely identifies a specific PDF/A Standard part and
* associated conformance level. The PDF/A Specification:<br/>
* ISO 19005 - Document Management - Electronic document format for long-term preservation (PDF/A)<br/>
* comprises 4 parts:
* <ol>
* <li>Part 1: PDF/A-1 - Use of PDF 1.4</li>
* <li>Part 2: PDF/A-2 - Use of ISO 32000-1</li>
* <li>Part 3: PDF/A-3 - Use of ISO 32000-1 with support for embedded files</li>
* <li>Part 4: PDF/A-4 - Use of ISO 32000-2</li>
* <ol>
* <li>Part 1: PDF/A-1 - Use of PDF 1.4
* <li>Part 2: PDF/A-2 - Use of ISO 32000-1
* <li>Part 3: PDF/A-3 - Use of ISO 32000-1 with support for embedded files
* <li>Part 4: PDF/A-4 - Use of ISO 32000-2
* </ol>
* Note that "Use of ISO 32000-1" indicates that PDF/A parts 2 and 3 are based
* upon PDF 1.7. ISO 32000-1 is the code for the PDF 1.7 ISO standard. The
* specification parts specify different conformance levels:
* <ul>
* <li>Level b - basic</li>
* <li>Level a - accessible</li>
* <li>Level u - unicode</li>
* <li>Level f - embedded files</li>
* <li>Level e - engineering</li>
* <li>Level b - basic
* <li>Level a - accessible
* <li>Level u - unicode
* <li>Level f - embedded files
* <li>Level e - engineering
* </ul>
* Part 1 does not allow a conformance level u (Unicode) so there are eight
* <p>Part 1 does not allow a conformance level u (Unicode) so there are eight
* valid combinations of specification part and level, shown below:
* <ul>
* <li>1a</li>
* <li>1b</li>
* <li>2a</li>
* <li>2b</li>
* <li>2u</li>
* <li>3a</li>
* <li>3b</li>
* <li>3u</li>
* <li>4</li>
* <li>4f</li>
* <li>4e</li>
* <li>1a
* <li>1b
* <li>2a
* <li>2b
* <li>2u
* <li>3a
* <li>3b
* <li>3u
* <li>4
* <li>4f
* <li>4e
* </ul>
*
* @author <a href="mailto:carl@openpreservation.org">Carl Wilson</a>
Expand Down Expand Up @@ -332,9 +329,8 @@ public String toString() {
}

/**
* Enum type that identifies the different PDF/A Conformance Levels A
* (accessible), B (basic), U (unicode), F (embedded files) & E (engineering).
*
* Enum type that identifies the different PDF/A Conformance Levels A (accessible), B (basic), U (unicode),
* F (embedded files) &amp; E (engineering).
*/
public enum Level {
/** Special identifier for the none case */
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/java/org/verapdf/pdfa/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@
* Developers wishing to integrate veraPDF PDF/A validation into
* their own Java applications should only need to use:
* <ul>
* <li>{@link org.verapdf.pdfa.ValidatorFactory} to obtain a {@link org.verapdf.pdfa.Validator} instance.</li>
* <li>{@link org.verapdf.pdfa.validation.validators.ValidatorFactory} to configure validator instance.</li>
* <li>{@link org.verapdf.pdfa.PDFAValidator} to validate a {@link java.io.InputStream} believed to be a PDF/A document.</li>
* <li>{@link org.verapdf.pdfa.flavours.PDFAFlavour} to determine the flavour of PDF/A enforced by a particular validator instance.</li>
* </ul>
* </p>
*
* @author <a href="mailto:carl@openpreservation.org">Carl Wilson</a>
* @version 0.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

/**
* Encapsulates the details of an error message, a String message and a
* <code>List<String></code> of arguments to substitute into the error message
* <code>List&lt;String&gt;</code> of arguments to substitute into the error message
*
* @author <a href="mailto:carl@openpreservation.org">Carl Wilson</a>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@
* <li>XML helper methods, <code>typeNameToXml(...)</code>, to facilitate XML
* serialisation to Strings, OutputStreams and Writers.</li>
* <li>XML helper methods, <code>typeNameFromXml(...)</code>, to facilitate XML
* deserialisation.</li>
* deserialization.</li>
* </ul>
* Note that XML serialisation and de-serialisation is achieved through JAXB
* bindings.
* </p>
* <p>
* TODO: Defensive Checks for all parameters.
* </p>
*
*
* @author <a href="mailto:carl@openpreservation.org">Carl Wilson</a>
*/
public final class Profiles {
Expand Down Expand Up @@ -407,21 +405,16 @@ public static Variable variableFromValues(final String name, final String object

/**
* Convert a {@link ValidationProfile} instance into an XML String.
*
* @param toConvert
* a {@link ValidationProfile} to convert to an XML String
* @param format
* set to Boolean.TRUE for pretty formatted XML, Boolean.FALSE
* for no space formatting
*
* @param toConvert a {@link ValidationProfile} to convert to an XML String
* @param format set to Boolean.TRUE for pretty formatted XML, Boolean.FALSE
* for no space formatting
*
* @return a String xml representation of toConvert
* @throws JAXBException
* thrown by JAXB marshaller if there's an error converting the
* object
* @throws IOException
* thrown when's there's a problem closing the underlying
* StringWriter
* @throws IllegalArgumentException
* if toConvert is null
*
* @throws JAXBException thrown by JAXB marshaller if there's an error converting the
* object
* @throws IllegalArgumentException if toConvert is null
*/
public static String profileToXml(final ValidationProfile toConvert, boolean format, boolean fragment)
throws JAXBException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ public interface BatchProcessingHandler extends Closeable {
public void handleBatchStart(ProcessorConfig config) throws VeraPDFException;

/**
* This method is called by the {@link BatchProcessor} after each item in
* the batch is processed allowing the implementor to take specific action
* for each item processed.
*
* @param result
* the {@link ProcessorResult} for the last item processed.
* @throws VeraPDFException
* if there's a problem with the particular result.
* This method is called by the {@link BatchProcessor} after each item in the batch is processed allowing the
* implementor to take specific action for each item processed.
*
* @param result the {@link ProcessorResult} for the last item processed.
* @param isLogsEnabled flag if logs are enabled or not
*
* @throws VeraPDFException if there's a problem with the particular result.
*/
public void handleResult(ProcessorResult result, Boolean isLogsEnabled) throws VeraPDFException;

Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/org/verapdf/report/XmpHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* </ul>
* Regarding the FeatureReporting mechanism, it's crying out for a generics
* based approach but that can come over the re-design.
* </p>
*
* @author <a href="mailto:carl@openpreservation.org">Carl Wilson</a>
*/
Expand Down
2 changes: 1 addition & 1 deletion xmp-core/src/main/java/org/verapdf/xmp/XMPMetaFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static XMPMeta parse(InputStream in) throws XMPException
* The available options are:
* <ul>
* <li> XMP_REQUIRE_XMPMETA - The &lt;x:xmpmeta&gt; XML element is required around
* <tt>&lt;rdf:RDF&gt;</tt>.
* <code>&lt;rdf:RDF&gt;</code>.
* <li> XMP_STRICT_ALIASING - Do not reconcile alias differences, throw an exception.
* </ul>
* <em>Note:</em>The XMP_STRICT_ALIASING option is not yet implemented.
Expand Down
Loading

0 comments on commit dabb4f9

Please sign in to comment.