Skip to content

Commit

Permalink
Fix javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitakovaliov92 committed Jul 30, 2024
1 parent d4cb8eb commit bcf5d02
Show file tree
Hide file tree
Showing 22 changed files with 81 additions and 110 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
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
2 changes: 0 additions & 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,9 @@
* 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.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 check whether 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
13 changes: 6 additions & 7 deletions xmp-core/src/main/java/org/verapdf/xmp/XMPPathFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* You can use these functions is to compose a complete path expression, or all but the last
* component. Suppose you have a property that is an array of integers within a struct. You can
* access one of the array items like this:
* <p>
* <blockquote>
*
* <pre>
Expand Down Expand Up @@ -76,7 +75,7 @@ private XMPPathFactory()
* 0 and below means last array item and renders as <code>[last()]</code>.
*
* @return Returns the composed path basing on fullPath. This will be of the form
* <tt>ns:arrayName[i]</tt>, where &quot;ns&quot; is the prefix for schemaNS and
* <code>ns:arrayName[i]</code>, where &quot;ns&quot; is the prefix for schemaNS and
* &quot;i&quot; is the decimal representation of itemIndex.
* @throws XMPException Throws exeption if index zero is used.
*/
Expand Down Expand Up @@ -107,7 +106,7 @@ else if (itemIndex == XMPConst.ARRAY_LAST_ITEM)
* @param fieldName The name of the field. Must be a simple XML name, must not be
* <code>null</code> or the empty string.
* @return Returns the composed path. This will be of the form
* <tt>ns:structName/fNS:fieldName</tt>, where &quot;ns&quot; is the prefix for
* <code>ns:structName/fNS:fieldName</code>, where &quot;ns&quot; is the prefix for
* schemaNS and &quot;fNS&quot; is the prefix for fieldNS.
* @throws XMPException Thrown if the path to create is not valid.
*/
Expand Down Expand Up @@ -135,7 +134,7 @@ public static String composeStructFieldPath(String fieldNS,
* @param qualName The name of the qualifier. Must be a simple XML name, must not be
* <code>null</code> or the empty string.
* @return Returns the composed path. This will be of the form
* <tt>ns:propName/?qNS:qualName</tt>, where &quot;ns&quot; is the prefix for
* <code>ns:propName/?qNS:qualName</code>, where &quot;ns&quot; is the prefix for
* schemaNS and &quot;qNS&quot; is the prefix for qualNS.
* @throws XMPException Thrown if the path to create is not valid.
*/
Expand All @@ -161,7 +160,7 @@ public static String composeQualifierPath(
* path syntax allows two forms of &quot;content addressing&quot; that may
* be used to select an item in an array of alternatives. The form used in
* ComposeLangSelector lets you select an item in an alt-text array based on
* the value of its <tt>xml:lang</tt> qualifier. The other form of content
* the value of its <code>xml:lang</code> qualifier. The other form of content
* addressing is shown in ComposeFieldSelector. \note ComposeLangSelector
* does not supplant SetLocalizedText or GetLocalizedText. They should
* generally be used, as they provide extra logic to choose the appropriate
Expand All @@ -175,7 +174,7 @@ public static String composeQualifierPath(
* @param langName
* The RFC 3066 code for the desired language.
* @return Returns the composed path. This will be of the form
* <tt>ns:arrayName[@xml:lang='langName']</tt>, where
* <code>ns:arrayName[@xml:lang='langName']</code>, where
* &quot;ns&quot; is the prefix for schemaNS.
*/
public static String composeLangSelector(String arrayName,
Expand Down Expand Up @@ -214,7 +213,7 @@ public static String composeLangSelector(String arrayName,
* itself simple.
* @param fieldValue The desired value of the field.
* @return Returns the composed path. This will be of the form
* <tt>ns:arrayName[fNS:fieldName='fieldValue']</tt>, where &quot;ns&quot; is the
* <code>ns:arrayName[fNS:fieldName='fieldValue']</code>, where &quot;ns&quot; is the
* prefix for schemaNS and &quot;fNS&quot; is the prefix for fieldNS.
* @throws XMPException Thrown if the path to create is not valid.
*/
Expand Down
2 changes: 1 addition & 1 deletion xmp-core/src/main/java/org/verapdf/xmp/XMPUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public static void appendProperties(XMPMeta source, XMPMeta dest, boolean doAllP
* <li>&quot;t&quot; and &quot;f&quot;
* <li>&quot;on&quot; and &quot;off&quot;
* <li>&quot;yes&quot; and &quot;no&quot;
* <li>&quot;value <> 0&quot; and &quot;value == 0&quot;
* <li>&quot;value &lt;&gt; 0&quot; and &quot;value == 0&quot;
* </ul>
* @throws XMPException If an empty string is passed.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void append(byte b)
*
* @param bytes a byte array
* @param offset an offset with
* @param len
* @param len a buffer length
*/
public void append(byte[] bytes, int offset, int len)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

<body>
<p>Package containing the XMPPath handling.</p>
<p>An XMPPath a simplified form of an XPath, used only to create or retrieve properties in an XMPMeta object.<p>
<p>An XMPPath a simplified form of an XPath, used only to create or retrieve properties in an XMPMeta object.</p>
</body>
</html>
4 changes: 2 additions & 2 deletions xmp-core/src/main/java/org/verapdf/xmp/options/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public boolean containsOneOf(int optionBits)

/**
* @param optionBit the binary bit or bits that are requested
* @return Returns if <emp>all</emp> of the requested bits are set or not.
* @return Returns if all the requested bits are set or not.
*/
protected boolean getOption(int optionBit)
{
Expand Down Expand Up @@ -122,7 +122,7 @@ public int getOptions()

/**
* @param options The options to set.
* @throws XMPException
* @throws XMPException Wraps all errors and exceptions that may occur.
*/
public void setOptions(int options) throws XMPException
{
Expand Down
Loading

0 comments on commit bcf5d02

Please sign in to comment.