Skip to content

Commit

Permalink
Fix javadoc errors and warnings for Kitodo-API
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jul 31, 2024
1 parent 62ef5a4 commit 8682283
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public interface DataEditorInterface {
* The URI to the xml file to read.
* @param xsltFileUri
* The URI to the xsl file for transformation of old format goobi metadata files.
* @throws IOException if reading fails.
*/
void readData(URI xmlFileUri, URI xsltFileUri) throws IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* for this key. If the key is a multiple choice, the values are grouped, hence
* the list, otherwise the length of the list is always only one. Effectively,
* the return type of
* {@link ComplexMetadataViewInterface#getSortedVisibleMetadatas(Collection, Collection)}
* {@link ComplexMetadataViewInterface#getSortedVisibleMetadata(Collection, Collection)}
* is {@code List<Pair<MetadataViewInterface, Collection<T>>>}. Since the key
* must be repeatable if there is more than one value but the key is not a
* multiple choice, a map would be an inappropriate choice at this point.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class MediaPartial {
*
* @param begin
* The begin as formatted time in form of
* {@link org.kitodo.production.helper.metadata.MediaPartialHelper#FORMATTED_TIME_PATTERN}
* ([0-1]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}
*/
public MediaPartial(String begin) {
this.begin = begin;
Expand All @@ -40,10 +40,10 @@ public MediaPartial(String begin) {
*
* @param begin
* The begin as formatted time in form of
* {@link org.kitodo.production.helper.metadata.MediaPartialHelper#FORMATTED_TIME_PATTERN}
* ([0-1]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}
* @param extent
* The extent as formatted time in form of
* {@link org.kitodo.production.helper.metadata.MediaPartialHelper#FORMATTED_TIME_PATTERN}
* ([0-1]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}
*/
public MediaPartial(String begin, String extent) {
this(begin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public interface FileManagementInterface {
* the name of the new resource
* @param file
* if true it creates the file, if false it created directory
* @throws IOException if file/folder could not be created
* @return the URI of the new resource
*/
URI create(URI parentFolderUri, String name, boolean file) throws IOException;
Expand All @@ -43,6 +44,7 @@ public interface FileManagementInterface {
*
* @param uri
* the uri to write to
* @throws IOException if uri could not be written
* @return an writable OutputStream
*/
OutputStream write(URI uri) throws IOException;
Expand All @@ -52,6 +54,7 @@ public interface FileManagementInterface {
*
* @param uri
* the uri to write from
* @throws IOException if uri could not be read
* @return a readable InputStream
*/
InputStream read(URI uri) throws IOException;
Expand All @@ -63,6 +66,7 @@ public interface FileManagementInterface {
* source file as uri
* @param targetResource
* destination file as uri
* @throws IOException if source could not be read or destination could not be written
*/
void copy(URI sourceResource, URI targetResource) throws IOException;

Expand All @@ -71,6 +75,7 @@ public interface FileManagementInterface {
*
* @param uri
* the URI to delete
* @throws IOException if uri could not be deleted
* @return true if successful, false otherwise
*/
boolean delete(URI uri) throws IOException;
Expand All @@ -94,6 +99,7 @@ public interface FileManagementInterface {
* the URI to the resource to rename
* @param newName
* the new name of the resource
* @throws IOException if uri could not be renamed
* @return URI of renamed resource
*/
URI rename(URI uri, String newName) throws IOException;
Expand All @@ -113,6 +119,7 @@ public interface FileManagementInterface {
*
* @param directory
* URI to get size
* @throws IOException if getting the size of URI failed
* @return size of directory as Long
*/
Long getSizeOfDirectory(URI directory) throws IOException;
Expand Down Expand Up @@ -178,6 +185,7 @@ public interface FileManagementInterface {
*
* @param processId
* the id of the process
* @throws IOException if the folder structure could not be created
* @return the URI to the process Location
*/
URI createProcessLocation(String processId) throws IOException;
Expand Down
5 changes: 5 additions & 0 deletions Kitodo-API/src/main/java/org/kitodo/config/OPACConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ private OPACConfig() {
*
* @param catalogName String identifying the catalog by title
* @param parameter String identifying the parameter by name
* @throws ParameterNotFoundException if parameter was not found
* @return value of parameter
*/
public static String getConfigValue(String catalogName, String parameter) throws ParameterNotFoundException {
Expand Down Expand Up @@ -150,6 +151,7 @@ private static String getUrlConfigPart(String catalogName, String parameter)
/**
* Get host parameter of catalog configuration with name 'catalogName'.
* @param catalogName name of catalog configuration
* @throws MandatoryParameterMissingException if required parameter is missing
* @return host value as String
*/
public static String getHost(String catalogName) throws MandatoryParameterMissingException {
Expand All @@ -159,6 +161,7 @@ public static String getHost(String catalogName) throws MandatoryParameterMissin
/**
* Get scheme parameter of catalog configuration with name 'catalogName'.
* @param catalogName name of catalog configuration
* @throws MandatoryParameterMissingException if required parameter is missing
* @return scheme value as String
*/
public static String getScheme(String catalogName) throws MandatoryParameterMissingException {
Expand All @@ -168,6 +171,7 @@ public static String getScheme(String catalogName) throws MandatoryParameterMiss
/**
* Get path parameter of catalog configuration with name 'catalogName'.
* @param catalogName name of catalog configuration
* @throws MandatoryParameterMissingException if required parameter is missing
* @return path value as String
*/
public static String getPath(String catalogName) throws MandatoryParameterMissingException {
Expand All @@ -177,6 +181,7 @@ public static String getPath(String catalogName) throws MandatoryParameterMissin
/**
* Get port parameter of catalog configuration with name 'catalogName'.
* @param catalogName name of catalog configuration
* @throws MandatoryParameterMissingException if required parameter is missing
* @return port value as String
*/
public static String getPort(String catalogName) throws MandatoryParameterMissingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public String getAbsolutePath() {
*
* @param name
* of configuration file
* @throws FileNotFoundException if the configuration file is not found
* @return File
*/
public static KitodoConfigFile getByName(String name) throws FileNotFoundException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class UnknownTreeNodeDataException extends RuntimeException {

/**
* Constructor with given parameter name for exception message.
* @param type String which describes the unexpected type
*/
public UnknownTreeNodeDataException(String type) {
super("TreeNode contains data of unexpected type '" + type + "!");
Expand Down

0 comments on commit 8682283

Please sign in to comment.