Commits

Jan Brohl committed af54be6

fast komplett aber event nicht komplett und ungetestet
tostring wäre sinnvoll

Comments (0)

Files changed (9)

src/de/scoutnet/api/API.java

+package de.scoutnet.api;
+
+import java.io.IOException;
+import java.text.ParseException;
+
+import org.json.JSONException;
+
+/*
+ Copyright (c) 2012, Jan Brohl
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification,
+ are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+public class API extends ScoutnetObject {
+	Event event(int id) throws JSONException, IOException, ParseException {
+		return (Event) getForPath("event/" + id + "/");
+	}
+
+	EventCollection events(int[] ids) throws JSONException, IOException,
+			ParseException {
+		return (EventCollection) queryForPath("events/", ids);
+	}
+
+	EventCollection events(String query, String[] args) throws JSONException,
+			IOException, ParseException {
+		return (EventCollection) queryForPath("events/", query, args);
+	}
+
+	Group group(int id) throws JSONException, IOException, ParseException {
+		return (Group) getForPath("group/" + id + "/");
+	}
+
+	GroupCollection groups(int[] ids) throws JSONException, IOException,
+			ParseException {
+		return (GroupCollection) queryForPath("groups/", ids);
+	}
+
+	GroupCollection groups(String query, String[] args) throws JSONException,
+			IOException, ParseException {
+		return (GroupCollection) queryForPath("groups/", query, args);
+	}
+
+	Section section(int id) throws JSONException, IOException, ParseException {
+		return (Section) getForPath("section/" + id + "/");
+	}
+
+	SectionCollection sections(int[] ids) throws JSONException, IOException,
+			ParseException {
+		return (SectionCollection) queryForPath("sections/", ids);
+	}
+
+	SectionCollection sections(String query, String[] args)
+			throws JSONException, IOException, ParseException {
+		return (SectionCollection) queryForPath("sections/", query, args);
+	}
+
+}

src/de/scoutnet/api/Event.java

  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.json.JSONException;
 import org.json.JSONObject;
 
 public class Event extends ScoutnetObject {
-	JSONObject jso;
+	String description, kind, last_modified_by, location, title, url, url_text,
+			zip;
+	int group_id, id, uid;
+	Date end_date, end_time, last_modified_on, start_date, start_time;
+	HashMap<Integer, String> keywords;
 
-	public Event(JSONObject jso) {
-		this.jso = jso;
+	// TODO: unvollst�ndig
+	public Event(JSONObject jso) throws JSONException, ParseException {
+		this.description = jso.getString("description");
+		this.kind = jso.getString("kind");
+		this.last_modified_by = jso.getString("last_modified_by");
+		this.location = jso.getString("location");
+		this.title = jso.getString("title");
+		this.url = jso.getString("url");
+		this.url_text = jso.getString("url_text");
+		this.zip = jso.getString("zip");
+		this.group_id = jso.getInt("group_id");
+		this.id = jso.getInt("id");
+		this.uid = jso.getInt("uid");
+		DateFormat d = DateFormat.getDateInstance();
+		DateFormat t = DateFormat.getDateTimeInstance();
+		DateFormat dt = DateFormat.getDateTimeInstance();
+		this.end_date = d.parse(jso.getString("end_date"));
+		this.end_time = t.parse(jso.getString("end_time"));
+		this.last_modified_on = dt.parse(jso.getString("last_modified_on"));
+		this.start_date = d.parse(jso.getString("start_date"));
+		this.start_time = t.parse(jso.getString("start_time"));
+		this.keywords = new HashMap<>();
+		JSONObject kw = jso.getJSONObject("keywords");
+		@SuppressWarnings("unchecked")
+		Iterator<String> it = kw.keys();
+		if (it.hasNext()) {
+
+			for (String k = it.next(); it.hasNext(); k = it.next()) {
+				this.keywords.put(new Integer(k), kw.getString(k));
+			}
+		}
+
 	}
 
 }

src/de/scoutnet/api/EventCollection.java

+package de.scoutnet.api;
+
+/*
+ Copyright (c) 2012, Jan Brohl
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification,
+ are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+public class EventCollection extends ScoutnetCollection<Event> {
+
+	public EventCollection(String kind, String element_kind, Event[] elements) {
+		super(kind, element_kind, elements);
+	}
+
+}

src/de/scoutnet/api/Group.java

 package de.scoutnet.api;
 
 /*
- Copyright (c) 2012, Jan Brohl
- All rights reserved.
+Copyright (c) 2012, Jan Brohl
+All rights reserved.
 
- Redistribution and use in source and binary forms,
- with or without modification,
- are permitted provided that the following conditions are met:
+Redistribution and use in source and binary forms,
+with or without modification,
+are permitted provided that the following conditions are met:
 
- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
 
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
 
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+import java.io.IOException;
+import java.text.ParseException;
+
+import org.json.JSONException;
 import org.json.JSONObject;
 
 public class Group extends ScoutnetObject {
-	JSONObject jso;
+	String city, country, district, federal_state, internal_id, kind, layer,
+			name, zip;
+	int global_id;
 
-	public Group(JSONObject jso) {
-		this.jso = jso;
+	public Group(JSONObject jso) throws JSONException {
+		this.city = jso.getString("city");
+		this.country = jso.getString("country");
+		this.district = jso.getString("district");
+		this.federal_state = jso.getString("federal_state");
+		this.internal_id = jso.getString("internal_id");
+		this.kind = jso.getString("kind");
+		this.layer = jso.getString("layer");
+		this.name = jso.getString("name");
+		this.zip = jso.getString("zip");
+		this.global_id = jso.getInt("global_id");
+	}
+
+	EventCollection events() throws JSONException, IOException, ParseException {
+		return (EventCollection) getForPath("group/" + global_id + "/events/");
+	}
+
+	EventCollection events(String query, String[] args) throws JSONException,
+			IOException, ParseException {
+		return (EventCollection) queryForPath(
+				"group/" + global_id + "/events/", query, args);
+	}
+
+	Group parent() throws JSONException, IOException, ParseException {
+		return (Group) getForPath("group/" + global_id + "/parent/");
+	}
+
+	GroupCollection parents() throws JSONException, IOException, ParseException {
+		return (GroupCollection) getForPath("group/" + global_id + "/parents/");
+	}
+
+	SectionCollection sections() throws JSONException, IOException,
+			ParseException {
+		return (SectionCollection) getForPath("group/" + global_id
+				+ "/sections/");
 	}
 
 }

src/de/scoutnet/api/GroupCollection.java

+package de.scoutnet.api;
+/*
+Copyright (c) 2012, Jan Brohl
+All rights reserved.
+
+Redistribution and use in source and binary forms,
+with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+public class GroupCollection extends ScoutnetCollection<Group> {
+
+	public GroupCollection(String kind, String element_kind, Group[] elements) {
+		super(kind, element_kind, elements);
+	}
+
+}

src/de/scoutnet/api/ScoutnetCollection.java

+package de.scoutnet.api;
+/*
+Copyright (c) 2012, Jan Brohl
+All rights reserved.
+
+Redistribution and use in source and binary forms,
+with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+public class ScoutnetCollection<T> extends ScoutnetObject {
+	String kind, element_kind;
+	T[] elements;
+
+	public ScoutnetCollection(String kind, String element_kind, T[] elements) {
+		this.elements = elements;
+		this.kind = kind;
+		this.element_kind = element_kind;
+	}
+
+}

src/de/scoutnet/api/ScoutnetObject.java

 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
 import java.net.URL;
+import java.text.ParseException;
+import java.util.Iterator;
 
 import javax.net.ssl.HttpsURLConnection;
+/*
+Copyright (c) 2012, Jan Brohl
+All rights reserved.
 
+Redistribution and use in source and binary forms,
+with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
-
 /**
  * @author: Jan Brohl
- *
+ * 
  */
-public abstract class ScoutnetObject{
-	static String baseUrl = "https://www.scoutnet.de/api/";	
-	
-	static ScoutnetObject getForPath(String pfad) throws JSONException, IOException{
-		JSONObject jso= new JSONObject(fetch(pfad));
-		String kind= jso.getString("kind");
-		if (kind=="group")
-			return new Group(jso);
-		if (kind=="event")
-			return new Event(jso);
-		if (kind=="section")
-			return new Section(jso);
+public abstract class ScoutnetObject {
+	static String baseUrl = "https://www.scoutnet.de/api/";
+
+	static ScoutnetObject queryForPath(String pfad, String query, String[] args)
+			throws JSONException, IOException, ParseException {
+		JSONArray jsa = new JSONArray(
+				new Object[] { query, new JSONArray(args) });
+		try {
+			String url = pfad + "?json="
+					+ java.net.URLEncoder.encode(jsa.toString(), "utf-8");
+			return getForPath(url);
+		} catch (UnsupportedEncodingException e) {
+			// OH NO!!!
+			e.printStackTrace();
+		}
+		return null;
+
+	}
+
+	static ScoutnetObject queryForPath(String pfad, int[] ids)
+			throws JSONException, IOException, ParseException {
+		JSONArray jsa = new JSONArray(new JSONArray[] { new JSONArray(ids),
+				new JSONArray() });
+		try {
+			String url = pfad + "?json="
+					+ java.net.URLEncoder.encode(jsa.toString(), "utf-8");
+			return getForPath(url);
+		} catch (UnsupportedEncodingException e) {
+			// OH NO!!!
+			e.printStackTrace();
+		}
 		return null;
 	}
-	static String fetch(String url) throws IOException{
-		HttpsURLConnection con=(HttpsURLConnection) new URL(baseUrl+url).openConnection();
-		BufferedReader br=new BufferedReader(new InputStreamReader(con.getInputStream()));
-		String read="",s;
+
+	static String fetch(String pfad) throws IOException {
+		HttpsURLConnection con = (HttpsURLConnection) new URL(baseUrl + pfad)
+				.openConnection();
+		BufferedReader br = new BufferedReader(new InputStreamReader(
+				con.getInputStream()));
+		String read = "", s;
 		while ((s = br.readLine()) != null) {
-			read=read+s+"\n";
+			read = read + s + "\n";
 		}
 		return read;
 	}
-	
+
+	static ScoutnetObject getForPath(String pfad) throws JSONException,
+			IOException, ParseException {
+		JSONObject jso = new JSONObject(fetch(pfad));
+		return load(jso);
+	}
+
+	static ScoutnetObject load(JSONObject jso) throws NumberFormatException,
+			JSONException, ParseException {
+		String kind = jso.getString("kind");
+		if (kind == "group")
+			return new Group(jso);
+		if (kind == "event")
+			return new Event(jso);
+		if (kind == "section")
+			return new Section(jso);
+		if (kind == "collection") {
+			String element_kind = jso.getString("element_kind");
+			JSONObject elementsjso = jso.getJSONObject("elements");
+			ScoutnetObject[] elements = new ScoutnetObject[elementsjso.length()];
+			@SuppressWarnings("unchecked")
+			Iterator<String> it = elementsjso.keys();
+			if (it.hasNext()) {
+				for (String k = it.next(); it.hasNext(); k = it.next()) {
+					elements[new Integer(k)] = load(elementsjso
+							.getJSONObject(k));
+				}
+			}
+			if (element_kind == "group")
+				return new GroupCollection(kind, element_kind,
+						(Group[]) elements);
+			if (element_kind == "event")
+				return new EventCollection(kind, element_kind,
+						(Event[]) elements);
+			if (element_kind == "section")
+				return new SectionCollection(kind, element_kind,
+						(Section[]) elements);
+		}
+		return null;
+	}
 }

src/de/scoutnet/api/Section.java

  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+import org.json.JSONException;
 import org.json.JSONObject;
 
 public class Section extends ScoutnetObject {
-	JSONObject jso;
+	String color, kind, name;
+	int id, start_age, end_age;
 
-	public Section(JSONObject jso) {
-		this.jso = jso;
+	public Section(JSONObject jso) throws JSONException {
+		color = jso.getString("color");
+		kind = jso.getString("kind");
+		name = jso.getString("name");
+		id = jso.getInt("id");
+		start_age = jso.getInt("start_age");
+		end_age = jso.getInt("end_age");
 	}
 
 }

src/de/scoutnet/api/SectionCollection.java

+package de.scoutnet.api;
+/*
+Copyright (c) 2012, Jan Brohl
+All rights reserved.
+
+Redistribution and use in source and binary forms,
+with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+public class SectionCollection extends ScoutnetCollection<Section> {
+
+	public SectionCollection(String kind, String element_kind,
+			Section[] elements) {
+		super(kind, element_kind, elements);
+	}
+
+}