Revision 19432 branches/v10/extensions/extPublishGeoserver/src/org/gvsig/publish/geoserver/conf/GSCatalog.java
GSCatalog.java | ||
---|---|---|
71 | 71 |
private Map datastores = null; |
72 | 72 |
private Map namespaces = null; |
73 | 73 |
private Map formats = null; |
74 |
// public ArrayList styles = null;
|
|
74 |
private Map styles = null;
|
|
75 | 75 |
|
76 | 76 |
/** |
77 | 77 |
* Default constructor |
... | ... | |
80 | 80 |
this.datastores = new HashMap(); |
81 | 81 |
this.namespaces = new HashMap(); |
82 | 82 |
this.formats = new HashMap(); |
83 |
//this.styles = new HashMap();
|
|
83 |
this.styles = new HashMap(); |
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
/** |
... | ... | |
97 | 97 |
public void addNamespace(GSNamespace item){ |
98 | 98 |
this.namespaces.put(item.getPrefix() ,item); |
99 | 99 |
} |
100 |
/** |
|
101 |
* Put an element into styles |
|
102 |
* @param namespaces |
|
103 |
*/ |
|
104 |
public void addStyle(GSStyle item){ |
|
105 |
this.styles.put(item.getId() ,item); |
|
106 |
} |
|
100 | 107 |
|
101 | 108 |
/** |
102 | 109 |
* Writes the catalog.xml |
... | ... | |
136 | 143 |
GSNamespace n = (GSNamespace) i.next(); |
137 | 144 |
rootNsEle.appendChild(n.getXMLElement(dom)); |
138 | 145 |
} |
146 |
//TODO: create style elements |
|
147 |
Element rootStEle = dom.createElement("styles"); |
|
148 |
rootEle.appendChild(rootStEle); |
|
149 |
i = styles.values().iterator(); |
|
150 |
while (i.hasNext()){ |
|
151 |
GSStyle s = (GSStyle) i.next(); |
|
152 |
rootStEle.appendChild(s.getXMLElement(dom)); |
|
153 |
} |
|
139 | 154 |
//write files |
140 | 155 |
try |
141 | 156 |
{ |
Also available in: Unified diff