01: package edu.indiana.lib.osid.base.repository.http;
02:
03: /**********************************************************************************
04: * $URL: https://source.sakaiproject.org/svn/citations/tags/sakai_2-4-1/citations-osid/web2bridge/src/java/edu/indiana/lib/osid/base/repository/http/PropertiesIterator.java $
05: * $Id: PropertiesIterator.java 22657 2007-03-15 13:21:23Z jimeng@umich.edu $
06: **********************************************************************************
07: *
08: * Copyright (c) 2003, 2004, 2005 The Regents of the University of Michigan, Trustees of Indiana University,
09: * Board of Trustees of the Leland Stanford, Jr., University, and The MIT Corporation
10: *
11: * Licensed under the Educational Community License Version 1.0 (the "License");
12: * By obtaining, using and/or copying this Original Work, you agree that you have read,
13: * understand, and will comply with the terms and conditions of the Educational Community License.
14: * You may obtain a copy of the License at:
15: *
16: * http://cvs.sakaiproject.org/licenses/license_1_0.html
17: *
18: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19: * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
20: * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21: * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23: *
24: **********************************************************************************/
25: /**
26: * @author Massachusetts Institute of Techbology, Sakai Software Development Team
27: * @version
28: */
29: public class PropertiesIterator extends
30: edu.indiana.lib.osid.base.repository.PropertiesIterator {
31: private static org.apache.commons.logging.Log _log = edu.indiana.lib.twinpeaks.util.LogUtils
32: .getLog(PropertiesIterator.class);
33:
34: private java.util.Vector vector = new java.util.Vector();
35: private int i = 0;
36:
37: public PropertiesIterator(java.util.Vector vector)
38: throws org.osid.shared.SharedException {
39: this .vector = vector;
40: }
41:
42: public boolean hasNextProperties()
43: throws org.osid.shared.SharedException {
44: return i < vector.size();
45: }
46:
47: public org.osid.shared.Properties nextProperties()
48: throws org.osid.shared.SharedException {
49: if (i < vector.size()) {
50: return (org.osid.shared.Properties) vector.elementAt(i++);
51: } else {
52: throw new org.osid.shared.SharedException(
53: org.osid.shared.SharedException.NO_MORE_ITERATOR_ELEMENTS);
54: }
55: }
56: }
|