-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added functionalities for version 2.1.0 #187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
checkstyle
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|78 col 25| Variable 'sipId' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|78 col 32| Parameter contentType should be final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|78 col 46| Variable 'contentType' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|78 col 59| Parameter contentInformationType should be final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|78 col 84| Variable 'contentInformationType' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|78 col 108| Parameter version should be final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|78 col 115| Variable 'version' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|113 col 19| Variable 'metsWrapper' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|117 col 23| Variable 'structMap' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIP.java|224 col 19| Variable 'mainMETSWrapper' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|67 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|68 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|70 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|70 col 20| Parameter version should be final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|70 col 27| Variable 'version' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|71 col 23| '=' is not followed by whitespace.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|71 col 23| '=' is not preceded with whitespace.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|86 col 15| Variable 'mdRef' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|109 col 15| Variable 'mdRef' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|131 col 15| Variable 'mdRef' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|236 col 20| Variable 'fileType' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|269 col 18| Variable 'fileType' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKUtils.java|290 col 18| Variable 'fileType' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/METSGeneratorFactory.java|8 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/METSGeneratorFactory.java|8 col 33| '{' is not followed by whitespace.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/METSGeneratorFactory.java|8 col 34| '}' is not preceded with whitespace.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/METSGeneratorFactory.java|10 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/METSGeneratorFactory.java|10 col 45| Parameter version should be final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/METSGeneratorFactory.java|10 col 52| Variable 'version' should be declared final.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKMETSUtils204.java|11 col 1| 'org.roda_project.commons_ip2.mets_v1_12.beans.MetsType.FileSec.FileGrp' should be separated from previous imports.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKMETSUtils204.java|24 col 45| Name 'dataFileGrp' must match pattern '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'.
src/main/java/org/roda_project/commons_ip2/model/impl/eark/EARKMETSUtils204.java|26 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|28 col 1| Wrong order for 'javax.xml.bind.JAXBException' import.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|31 col 1| Wrong order for 'java.io.IOException' import.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|52 col 62| Name 'dataFileGrp' must match pattern '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|55 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|55 col 22| More than 7 parameters (found 17).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|56| Line is longer than 120 characters (found 150).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|57| Line is longer than 120 characters (found 147).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|58| Line is longer than 120 characters (found 153).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|59| Line is longer than 120 characters (found 138).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|139 col 23| More than 7 parameters (found 14).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|140| Line is longer than 120 characters (found 157).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|141| Line is longer than 120 characters (found 148).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|142| Line is longer than 120 characters (found 139).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|214| Line is longer than 120 characters (found 171).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|215| Line is longer than 120 characters (found 161).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|251| Line is longer than 120 characters (found 127).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|271 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|298 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|299| Line is longer than 120 characters (found 147).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|306 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|307| Line is longer than 120 characters (found 129).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|312| Line is longer than 120 characters (found 152).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|313| Line is longer than 120 characters (found 122).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|342 col 3| Missing a Javadoc comment.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|343| Line is longer than 120 characters (found 139).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|453| Line is longer than 120 characters (found 124).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|524| Line is longer than 120 characters (found 158).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|578| Line is longer than 120 characters (found 149).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|590| Line is longer than 120 characters (found 131).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|602| Line is longer than 120 characters (found 129).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|620| Line is longer than 120 characters (found 160).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|722| Line is longer than 120 characters (found 145).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|750| Line is longer than 120 characters (found 134).
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|798 col 32| Parameter fileRelativeFolders should be final.
src/main/java/org/roda_project/commons_ip2/model/IPMets.java|798 col 45| Variable 'fileRelativeFolders' should be declared final.
src/test/java/org/roda_project/commons_ip2/model/impl/eark/SIPRepresentativityTest.java|57 col 9| Variable 'sip' should be declared final.
src/test/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIPTest.java|140 col 9| Variable 'sip' should be declared final.
src/test/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIPTest.java|140 col 101| The String "2.1.0" appears 3 times in the file.
src/test/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIPTest.java|252 col 9| Variable 'sip' should be declared final.
src/test/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIPTest.java|252 col 27| The String "SIP_1" appears 2 times in the file.
src/test/java/org/roda_project/commons_ip2/model/impl/eark/EARKSIPTest.java|400 col 9| Variable 'sip' should be declared final.
@@ -365,4 +367,10 @@ public static boolean validateAllOptions(final String metadataFile, final String | |||
return metadataFile != null || documentation != null || representationData != null; | |||
} | |||
|
|||
public static boolean validateVersion(String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
@@ -365,4 +367,10 @@ public static boolean validateAllOptions(final String metadataFile, final String | |||
return metadataFile != null || documentation != null || representationData != null; | |||
} | |||
|
|||
public static boolean validateVersion(String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter version should be final.
@@ -365,4 +367,10 @@ public static boolean validateAllOptions(final String metadataFile, final String | |||
return metadataFile != null || documentation != null || representationData != null; | |||
} | |||
|
|||
public static boolean validateVersion(String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable 'version' should be declared final.
@@ -365,4 +367,10 @@ public static boolean validateAllOptions(final String metadataFile, final String | |||
return metadataFile != null || documentation != null || representationData != null; | |||
} | |||
|
|||
public static boolean validateVersion(String version) { | |||
if (version != null) { | |||
return (version.equals("2.1.0") || version.equals("2.0.4")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary parentheses around return value.
@@ -46,6 +46,8 @@ public final class ExitCodes { | |||
*/ | |||
public static final int EXIT_CODE_CREATE_INVALID_PATHS = 4; | |||
|
|||
public static final int EXIT_CODE_CREATE_INVALID_VERSION=5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
new EARKSIP(sipId, EARK_VERSION); | ||
} | ||
|
||
public EARKSIP(String sipId, String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter version should be final.
new EARKSIP(sipId, EARK_VERSION); | ||
} | ||
|
||
public EARKSIP(String sipId, String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable 'version' should be declared final.
new EARKSIP(sipId, contentType, contentInformationType, EARK_VERSION); | ||
} | ||
|
||
public EARKSIP(String sipId, IPContentType contentType, IPContentInformationType contentInformationType, String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 120 characters (found 124).
new EARKSIP(sipId, contentType, contentInformationType, EARK_VERSION); | ||
} | ||
|
||
public EARKSIP(String sipId, IPContentType contentType, IPContentInformationType contentInformationType, String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
new EARKSIP(sipId, contentType, contentInformationType, EARK_VERSION); | ||
} | ||
|
||
public EARKSIP(String sipId, IPContentType contentType, IPContentInformationType contentInformationType, String version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter sipId should be final.
No description provided.