001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2006, Adrian Custer, assigned to the PMC.
006: *
007: * This file is hereby placed into the Public Domain. This means anyone is
008: * free to do whatever they wish with this file. Use it well and enjoy!
009: */
010:
011: package org.geotools.demo.introduction;
012:
013: import java.util.HashMap;
014: import java.util.LinkedList;
015: import java.util.List;
016: import java.util.Map;
017:
018: import org.geotools.catalog.Catalog;
019: import org.geotools.catalog.defaults.DefaultCatalog;
020:
021: /**
022: * A demo class illustrating some of the various parts of the geotools api.
023: *
024: * @author Adrian Custer, gnuGIS
025: *
026: * @version 0.03
027: * @since 2.3-M0
028: *
029: */
030: public class DemoData {
031:
032: /**
033: * The List of Features used to store data outside the localCatalog.
034: */
035: List theFeatureList;
036: // List <Feature> theFeatureList;
037:
038: /**
039: * The List of FeatureCollections used to store data outside the localCatalog.
040: */
041: List theFeatureCollectionList;
042: // List <FeatureCollection> theFeatureCollectionList;
043:
044: /**
045: * The List of DataStores used to store data outside the localCatalog.
046: */
047: List theDataStoreList;
048: // List <DataStore> theDataStoreList;
049:
050: /**
051: * The local Catalog used to store the services pointing to data in data stores.
052: */
053: Catalog localCatalog;
054:
055: /**
056: * A Network Catalog used to store the services pointing to data on the network.
057: */
058: Catalog aNetworkCatalog;
059:
060: /**
061: * The Map of Styles used to render the different layers stored as:
062: * String name, Style s.
063: */
064: Map theStyleMap;
065:
066: /**
067: * Creates the demo class and an underlying catalog for storing data.
068: */
069: public DemoData() {
070: theFeatureList = new LinkedList();
071: theFeatureCollectionList = new LinkedList();
072: theDataStoreList = new LinkedList();
073: localCatalog = new DefaultCatalog();
074: aNetworkCatalog = new DefaultCatalog();//TODO: How is this done?
075: theStyleMap = new HashMap();
076: }
077:
078: /**
079: * @return The List used to store data as Features.
080: */
081: public List getFeaturenList() {
082: return theFeatureList;
083: }
084:
085: /**
086: * @return The List used to store data in FeatureCollections.
087: */
088: public List getFeatureCollectionList() {
089: return theFeatureCollectionList;
090: }
091:
092: /**
093: * @return The List used to store data in DataStores.
094: */
095: public List getDataStoreList() {
096: return theDataStoreList;
097: }
098:
099: /**
100: * @return The catalog used to store data.
101: */
102: public Catalog getLocalCatalog() {
103: return localCatalog;
104: }
105:
106: }
|