Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better change to FedoraObject.getDSSize(), also better type-safety in…
… SimpleObserver
- Loading branch information
Showing
6 changed files
with
59 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
fcrepo-kernel/src/main/java/org/fcrepo/utils/FedoraEventIterator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
package org.fcrepo.utils; | ||
|
||
import java.util.Iterator; | ||
|
||
import javax.jcr.observation.Event; | ||
import javax.jcr.observation.EventIterator; | ||
|
||
public class FedoraEventIterator implements Iterator<Event>, Iterable<Event> { | ||
|
||
EventIterator i; | ||
|
||
public FedoraEventIterator(final EventIterator i) { | ||
this.i = i; | ||
} | ||
|
||
@Override | ||
public boolean hasNext() { | ||
return i.hasNext(); | ||
} | ||
|
||
@Override | ||
public Event next() { | ||
return i.nextEvent(); | ||
} | ||
|
||
@Override | ||
public void remove() { | ||
i.remove(); | ||
} | ||
|
||
@Override | ||
public Iterator<Event> iterator() { | ||
return this; | ||
} | ||
|
||
} |