Skip to content

Commit

Permalink
Fix javadoc errors and add javadoc to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
robyj authored and Andrew Woods committed Jun 2, 2015
1 parent c5a9b37 commit 6a17a5f
Show file tree
Hide file tree
Showing 17 changed files with 66 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -4,6 +4,12 @@ jdk:
before_install:
- "echo $JAVA_OPTS"
- "export JAVA_OPTS=-Xmx512m"

script:
- mvn install -B -V
- mvn javadoc:jar
- mvn javadoc:test-aggregate

notifications:
irc: "irc.freenode.org#fcrepo"
email:
Expand Down
Expand Up @@ -123,6 +123,8 @@ protected int getStatus(final HttpUriRequest method)
/**
* Gets a random (but valid) pid for use in testing. This pid is guaranteed
* to be unique within runs of this application.
*
* @return A string containing the new Pid
*/
protected static String getRandomUniquePid() {
return UUID.randomUUID().toString();
Expand Down
Expand Up @@ -41,7 +41,7 @@
* This class acts as the REST Resource endpoint against which integration tests are executed.
* This is used instead of the real F4 REST API for two reasons:
* - These integration tests are intended to test the AuthZ functionality, not the F4 REST API
* - A circular dependency between fcrepo-auth-common <--> fcrepo-http-api is bad
* - A circular dependency between fcrepo-auth-common &lt;--&gt; fcrepo-http-api is bad
*
* @author awoods
* @since 2014-06-26
Expand Down
Expand Up @@ -102,18 +102,24 @@ public abstract class AbstractFedoraFileSystemConnectorIT {
/**
* Gets the path (relative to the filesystem federation) of a directory
* that's expected to be present.
*
* @return string that contains the path to the dir
*/
protected abstract String testDirPath();

/**
* Gets the path (relative to the filesystem federation) of a file
* that's expected to be present.
*
* @return string that contains the path to the file
*/
protected abstract String testFilePath();

/**
* The name (relative path) of the federation to be tested. This
* must coincide with the "projections" provided in repository.json.
*
* @return string that contains the path to the federation
*/
protected abstract String federationName();

Expand All @@ -122,6 +128,8 @@ public abstract class AbstractFedoraFileSystemConnectorIT {
* tested. This must coincide with the "directoryPath" provided in
* repository.json (or the system property that's populating the relevant
* configuration".
*
* @return string that contains the path to root
*/
protected abstract String getFederationRoot();

Expand Down Expand Up @@ -319,6 +327,9 @@ protected File fileForNode(@SuppressWarnings("unused") final Node node) {
* but it's critical that we test that the json files are actually written
* somewhere, so it's the best I can do without further opening up the
* internals of JsonSidecarExtraPropertiesStore.
*
* @param node The node to access for the file reference
* @return A reference to the nodes property file
*/
protected File propertyFileForNode(final Node node) {
try {
Expand Down
Expand Up @@ -275,8 +275,8 @@ protected HttpResponse setProperty(final String pid, final String txId,
/**
* Creates a transaction, asserts that it's successful and
* returns the transaction location.
* @return
* @throws IOException
* @return string containing transaction location
* @throws IOException exception thrown during the function
*/
protected String createTransaction() throws IOException {
final HttpPost createTx = new HttpPost(serverAddress + "fcr:tx");
Expand Down Expand Up @@ -304,20 +304,26 @@ protected static void addMixin(final String pid, final String mixinUrl) throws I
/**
* Gets a random (but valid) pid for use in testing. This pid
* is guaranteed to be unique within runs of this application.
*
* @return string containing new Pid
*/
protected static String getRandomUniquePid() {
return UUID.randomUUID().toString();
}

/**
* Gets a random (but valid) property name for use in testing.
*
* @return string containing random property name
*/
protected static String getRandomPropertyName() {
return randomUUID().toString();
}

/**
* Gets a random (but valid) property value for use in testing.
*
* @return string containing random property value
*/
protected static String getRandomPropertyValue() {
return randomUUID().toString();
Expand Down
Expand Up @@ -35,7 +35,7 @@
* This "test" is a utility for collecting the timing of concurrent operations operations.
* It takes roughly 2 minutes to complete and should only be run if the timing metrics are wanted.
* In order to activate this utility, the following System Property must be set:
* <p/>
* &lt;p/&gt;
* mvn -Dfcrepo.test.http.concurrent install
*
* @author lsitu
Expand Down
Expand Up @@ -1750,6 +1750,8 @@ public void testDescribeCount() throws Exception {
* to retrieve an object from fedora:/files/FileSystem1 that lists a child
* object at fedora:/files/FileSystem1/TestSubdir and lists datastreams ds1
* and ds2
*
* @throws Exception thrown during this function
*/
@Test
public void testGetProjectedNode() throws Exception {
Expand Down Expand Up @@ -1861,6 +1863,8 @@ public void fatalError(final SAXParseException e) {
/**
* I should be able to create two subdirectories of a non-existent parent
* directory.
*
* @throws Exception thrown during this function
**/
@Ignore("Enabled once the FedoraFileSystemConnector becomes readable/writable")
public void testBreakFederation() throws Exception {
Expand All @@ -1873,6 +1877,8 @@ public void testBreakFederation() throws Exception {

/**
* I should be able to upload a file to a read/write federated filesystem.
*
* @throws IOException thrown during this function
**/
@Ignore("Enabled once the FedoraFileSystemConnector becomes readable/writable")
public void testUploadToProjection() throws IOException {
Expand Down Expand Up @@ -1901,6 +1907,8 @@ public void testUploadToProjection() throws IOException {

/**
* I should be able to link to content on a federated filesystem.
*
* @throws IOException thrown during this function
**/
@Test
public void testFederatedDatastream() throws IOException {
Expand Down Expand Up @@ -2029,6 +2037,8 @@ public void testLinkedDeletion() throws Exception {
/**
* When I make changes to a resource in a federated filesystem, the parent
* folder's Last-Modified header should be updated.
*
* @throws Exception thrown during this function
**/
@Test
public void testLastModifiedUpdatedAfterUpdates() throws Exception {
Expand Down
Expand Up @@ -224,6 +224,8 @@ public String getMethod() {

/**
* I should be able to copy objects from the repository to a federated filesystem.
*
* @throws IOException exception thrown during this function
**/
@Ignore("Enabled once the FedoraFileSystemConnector becomes readable/writable")
public void testCopyToProjection() throws IOException {
Expand All @@ -250,6 +252,8 @@ public void testCopyToProjection() throws IOException {

/**
* I should be able to copy objects from a federated filesystem to the repository.
*
* @throws IOException exception thrown during this function
**/
@Test
public void testCopyFromProjection() throws IOException {
Expand Down Expand Up @@ -281,6 +285,8 @@ public void testCopyFromProjection() throws IOException {
/**
* I should be able to move a node within a federated filesystem with
* properties preserved.
*
* @throws Exception exception thrown during this function
**/
@Ignore("Enabled once the FedoraFileSystemConnector becomes readable/writable")
public void testFederatedMoveWithProperties() throws Exception {
Expand Down
Expand Up @@ -283,7 +283,7 @@ public void testCreateDoStuffAndCommitTransactionSeparateConnections() throws Ex
/**
* Tests whether a Sparql update is visible within a transaction
* and if the update is made persistent along with the commit.
* @throws Exception
* @throws Exception exception thrown during this function
*/
@Test
public void testIngestNewWithSparqlPatchWithinTransaction() throws Exception {
Expand Down Expand Up @@ -357,6 +357,8 @@ public void testGetNonExistingObject() throws Exception {

/**
* Tests that transactions cannot be hijacked
*
* @throws Exception exception thrown during this function
*/
@Test
public void testTransactionHijackingNotPossible() throws Exception {
Expand Down Expand Up @@ -391,6 +393,8 @@ public void testTransactionHijackingNotPossible() throws Exception {
/**
* Tests that transactions cannot be hijacked,
* even if created by an anonymous user
*
* @throws Exception exception thrown during this function
*/
@Test
public void testTransactionHijackingNotPossibleAnoymous() throws Exception {
Expand Down Expand Up @@ -428,7 +432,7 @@ public void testTransactionHijackingNotPossibleAnoymous() throws Exception {
* delivered content may be stale. Etag won't work either
* because it is directly derived from Last-Modified.
*
* @throws Exception
* @throws Exception excpetion thrown during this function
*/
@Test
public void testNoCachingHeadersDuringTransaction() throws Exception {
Expand Down Expand Up @@ -476,6 +480,8 @@ public void testNoCachingHeadersDuringTransaction() throws Exception {
* "deleter" deleting objects it should not be possible for an object
* to be deleted if a client has added a title and received a successful
* http response code.
*
* @throws Exception exception thorn during this function
*/
@Test
@Ignore("Until we implement some kind of record level locking.")
Expand Down
Expand Up @@ -298,6 +298,8 @@ public void testCreateTwoVersionsWithSameLabel() throws Exception {
* This test just makes sure that while an object may not have two
* versions with the same label, two different objects may have versions
* with the same label.
*
* @throws Exception exception thrown during this function
*/
@Test
public void testCreateTwoObjectsWIthVersionsWithTheSameLabel() throws Exception {
Expand Down
Expand Up @@ -26,7 +26,7 @@

/**
* @author ajs6f
* @date 30 Oct 2014
* @since 30 Oct 2014
*
*/
public class MultiPreferTest extends SinglePreferTest {
Expand Down
Expand Up @@ -31,8 +31,8 @@
public class TestTriplesContext extends RdfStream {
/**
* Add a triple that says we've been there..
* @param resource
* @param idTranslator
* @param resource a FedoraREsource
* @param idTranslator an IdentifierConvertor
*/
public TestTriplesContext(final FedoraResource resource,
final IdentifierConverter<Resource, FedoraResource> idTranslator) {
Expand Down
Expand Up @@ -39,7 +39,7 @@

/**
* A stream of RDF triples along with some useful context.
*
*
* @author ajs6f
* @since Oct 9, 2013
*/
Expand Down
Expand Up @@ -50,7 +50,7 @@ public TransformationFactory() {
* the transform program
* @param contentType the content type
* @param inputStream the input stream
* @return a Transformation
* @return T a Transformation
*/

public <T> Transformation<T> getTransform(final MediaType contentType, final InputStream inputStream) {
Expand Down
Expand Up @@ -89,6 +89,8 @@ protected int getStatus(final HttpUriRequest method)
/**
* Gets a random (but valid) pid for use in testing. This pid
* is guaranteed to be unique within runs of this application.
*
* @return string containing new random unique Pid
*/
protected static String getRandomUniquePid() {
return UUID.randomUUID().toString();
Expand Down
Expand Up @@ -214,6 +214,8 @@ public void testNodeTypes() throws IOException {
* This test walks through the steps for creating an object, setting some
* metadata, creating a version, updating that metadata, viewing the
* version history to find that old version.
*
* @throws IOException exception thrown during this function
*/
@Ignore
@Test
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Expand Up @@ -59,6 +59,7 @@
<jacoco.out.it.file>jacoco-it.exec</jacoco.out.it.file>
<sonar.jacoco.reportPath>${jacoco.outputDir}/${jacoco.out.unit.file}</sonar.jacoco.reportPath>
<sonar.jacoco.itReportPath>${jacoco.outputDir}/${jacoco.out.it.file}</sonar.jacoco.itReportPath>
<javadoc.plugin.version>2.10.3</javadoc.plugin.version>
<!-- default properties that can be altered on the command line -->
<fcrepo.test.context.path />
</properties>
Expand Down Expand Up @@ -992,7 +993,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<version>${javadoc.plugin.version}</version>
<configuration>
<linksource>true</linksource>
</configuration>
Expand Down

0 comments on commit 6a17a5f

Please sign in to comment.