Revision 19432 branches/v10/extensions/extPublishGeoserver/src/org/gvsig/publish/geoserver/conf/GSService.java

View differences:

GSService.java
41 41

  
42 42
package org.gvsig.publish.geoserver.conf;
43 43

  
44
import java.net.MalformedURLException;
45
import java.net.URL;
44 46
import java.util.ArrayList;
45 47
import java.util.Iterator;
46 48

  
49
import org.gvsig.publish.PublishLogger;
47 50
import org.w3c.dom.Document;
48 51
import org.w3c.dom.Element;
49 52
import org.w3c.dom.Node;
......
61 64
	private String title;
62 65
	private String abst;
63 66
	private ArrayList keywords = new ArrayList();
67
	private URL onlineResource;
64 68
	
65 69
	public abstract String getType();
66 70
    //Methods 
......
129 133
    public void setAbstract(String abs) {
130 134
    	this.abst = abs;
131 135
    }
136
    /**
137
     * 
138
     * @return
139
     */
140
	public URL getOnlineResource() {
141
		if (onlineResource==null){
142
			try {
143
				onlineResource = new URL("http://");
144
			} catch (MalformedURLException e) {
145
				PublishLogger.getLog().error("ERROR " + getClass().getName() + ":malformed url", e);
146
			}
147
		}
148
		return onlineResource;
149
	}
150
	/**
151
	 * 
152
	 * @param onlineResource
153
	 */
154
	public void setOnlineResource(URL onlineResource) {
155
		this.onlineResource = onlineResource;
156
	}
132 157
	
133 158
    /**
134 159
     * 
......
171 196
			keyEle.appendChild(tx);
172 197
			paramEle.appendChild(keyEle);
173 198
		}
199
		//onlineResource
200
		paramEle = dom.createElement("onlineResource");
201
		txt = dom.createTextNode(this.getOnlineResource().toString());
202
		paramEle.appendChild(txt);
203
		rootEle.appendChild(paramEle);
174 204
		//TODO:metadatalink
175
		//TODO:onlineResource
205
		
176 206
		//TODO:fees
177 207
		//TODO:accessConstraints
178 208
		//TODO:srsXmlStyle

Also available in: Unified diff