Revision 479

View differences:

org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.sldsupport.SLDSupportLibrary
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/SLDSupportManager.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport;
27

  
28
import java.io.File;
29
import java.io.IOException;
30
import java.util.List;
31

  
32
import org.gvsig.sldsupport.exception.SLDException;
33
import org.gvsig.sldsupport.exception.UnsupportedSLDVersionException;
34
import org.gvsig.sldsupport.reader.SLDReader;
35
import org.gvsig.sldsupport.reader.SLDReaderFactory;
36
import org.gvsig.sldsupport.sld.SLDObject;
37
import org.gvsig.sldsupport.sld.filter.SLDFilter;
38
import org.gvsig.sldsupport.writer.SLDWriter;
39
import org.gvsig.sldsupport.writer.SLDWriterFactory;
40

  
41
public interface SLDSupportManager {
42
	
43
    public static final String FILE_EXTENSION = "sld";
44

  
45
	public void registerReader(SLDReaderFactory fact);
46
	public void registerWriter(SLDWriterFactory fact);
47
	
48
	public List<SLDWriter> createWriters(String version)
49
			throws UnsupportedSLDVersionException;
50
	public List<SLDReader> createReaders(String version)
51
			throws UnsupportedSLDVersionException;
52

  
53
	/*
54
	 * Redundant, utility methods
55
	 */
56
	public void write(SLDObject obj, String version, File outfile)
57
			throws IOException, SLDException;
58

  
59
	/*
60
	public void write(SLDObject obj, String version, OutputStream outs)
61
			throws UnsupportedSLDVersionException, IOException;
62
	public SLDObject read(InputStream instream)
63
			throws InvalidSLDObjectException, IOException;
64
	*/
65
	
66
	public SLDObject read(File infile)
67
			throws SLDException, IOException;
68
	
69
	
70
	public SLDFilter createFilter();
71

  
72

  
73
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/writer/SLDWriter.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.writer;
27

  
28
import java.io.IOException;
29
import java.io.OutputStream;
30

  
31
import org.gvsig.sldsupport.exception.InvalidSLDObjectException;
32
import org.gvsig.sldsupport.exception.UnsupportedSLDObjectException;
33
import org.gvsig.sldsupport.sld.SLDObject;
34

  
35
public interface SLDWriter {
36
	
37
	public String getVersion();
38
	
39
	public void check(SLDObject obj)
40
			throws
41
			UnsupportedSLDObjectException,
42
			InvalidSLDObjectException;
43
	
44
	public void write(SLDObject obj, OutputStream outs)
45
			throws
46
			InvalidSLDObjectException,
47
			UnsupportedSLDObjectException,
48
			IOException;
49

  
50
	/**
51
	 * Writes supported elements (not an invalid SLD file)
52
	 * @param obj
53
	 * @param outs
54
	 * @throws IOException
55
	 */
56
	public void forceWrite(SLDObject obj, OutputStream outs)
57
			throws IOException;
58

  
59
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/writer/SLDWriterFactory.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.writer;
27

  
28

  
29
public interface SLDWriterFactory {
30
	
31
	public String getVersion();
32
	public SLDWriter create();
33

  
34
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/exception/SLDException.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.exception;
27

  
28
import org.gvsig.tools.exception.BaseException;
29

  
30
public class SLDException extends BaseException {
31

  
32
	
33
	public SLDException(String msg, String key, long code) {
34
		super(msg, key, code);
35
	}
36
	
37
	public SLDException(String msg, Throwable th, String key, long code) {
38
		super(msg, th, key, code);
39
	}
40

  
41
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/exception/UnsupportedSLDObjectException.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.exception;
27

  
28

  
29
public class UnsupportedSLDObjectException extends SLDException {
30
	
31
	
32
	/**
33
	 * 
34
	 */
35
	private static final long serialVersionUID = 8269522927346991562L;
36

  
37
	public UnsupportedSLDObjectException(
38
			String element_name,
39
			String detail) {
40
		super("Unsupported SLD Object: " + element_name + "; Detail: " + detail, 
41
				"_Unsupported_SLD_object",
42
				serialVersionUID);
43
	}
44
	
45
	public UnsupportedSLDObjectException(
46
			Throwable th,
47
			String element_name,
48
			String detail) {
49
		super("Unsupported SLD Object: " + element_name + "; Detail: " + detail, 
50
				th, "_Unsupported_SLD_object",
51
				serialVersionUID);
52
	}
53

  
54
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/exception/SLDWriteException.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.exception;
27

  
28

  
29
public class SLDWriteException extends SLDException {
30
	
31
	/**
32
	 * 
33
	 */
34
	private static final long serialVersionUID = 4612344620813700878L;
35

  
36
	/**
37
	 * 
38
	 */
39
	
40
	public SLDWriteException(String message) {
41
		super(message, "_Error_while_writing_SLD_file", serialVersionUID);
42
	}
43
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/exception/SLDReadException.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.exception;
27

  
28

  
29
public class SLDReadException extends SLDException {
30
	
31
	/**
32
	 * 
33
	 */
34
	private static final long serialVersionUID = 2873749769998353025L;
35
	
36
	public SLDReadException(String message) {
37
		super(message, 
38
			"_Error_while_reading_SLD_file", serialVersionUID);
39
	}
40
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/exception/InvalidSLDObjectException.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.exception;
27

  
28

  
29
public class InvalidSLDObjectException extends SLDException {
30
	
31
	
32

  
33
	/**
34
	 * 
35
	 */
36
	private static final long serialVersionUID = -2755337838866636843L;
37

  
38
	public InvalidSLDObjectException(
39
			String element_name,
40
			String detail) {
41
		super("SLD Object has unrecognized structure: " + element_name + "; Detail: " + detail, 
42
				"_Invalid_SLD_object",
43
				serialVersionUID);
44
	}
45

  
46

  
47
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/exception/UnsupportedSLDVersionException.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.exception;
27

  
28

  
29
public class UnsupportedSLDVersionException extends SLDException {
30
	
31
	private static final long serialVersionUID = 5406859030307252728L;
32
	
33
	public UnsupportedSLDVersionException(String version) {
34
		super("Unsupported SLD version: " + (version == null ? "Null" : version), 
35
				"_Unsupported_SLD_version",
36
				serialVersionUID);
37
	}
38

  
39

  
40
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/reader/SLDReaderFactory.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.reader;
27

  
28
public interface SLDReaderFactory {
29
	
30
	public String getVersion();
31
	public SLDReader create();
32

  
33
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/reader/SLDReader.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.reader;
27

  
28
import java.io.IOException;
29
import java.io.InputStream;
30

  
31
import org.gvsig.sldsupport.exception.SLDException;
32
import org.gvsig.sldsupport.sld.SLDObject;
33

  
34
public interface SLDReader {
35
	
36
	// (soportar 1.0.0)
37
	public String getVersion();
38
	public SLDObject read(InputStream is)
39
			throws SLDException, IOException;
40

  
41
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDAnchorPoint.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
import org.gvsig.sldsupport.sld.filter.expression.operator.SLDLiteral;
29
import org.gvsig.sldsupport.sld.symbol.misc.SLDParameterValue;
30

  
31
public class SLDAnchorPoint {
32
	
33
	protected SLDParameterValue x = null;
34
	protected SLDParameterValue y = null;
35
	
36
	public SLDAnchorPoint() {
37
		x = new SLDParameterValue();
38
		x.getExpressionList().add(new SLDLiteral("0.5"));
39
		y = new SLDParameterValue();
40
		y.getExpressionList().add(new SLDLiteral("0.5"));
41
	}
42
	
43
	public SLDParameterValue getAnchorPointX() {
44
		return x;
45
	}
46
	public void setAnchorPointX(SLDParameterValue x) {
47
		this.x = x;
48
	}
49
	public SLDParameterValue getAnchorPointY() {
50
		return y;
51
	}
52
	public void setAnchorPointY(SLDParameterValue y) {
53
		this.y = y;
54
	}
55

  
56
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDGraphicFill.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
public class SLDGraphicFill {
29
	
30
	protected SLDGraphic graphic = null;
31
	
32
	public SLDGraphicFill() {
33
	}
34

  
35
	public SLDGraphicFill(SLDGraphic g) {
36
		graphic = g;
37
	}
38
	
39
	public SLDGraphic getGraphic() {
40
		return graphic;
41
	}
42
	
43
	public void setGraphic(SLDGraphic gr) {
44
		graphic = gr;
45
	}
46

  
47
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDGraphicStroke.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
import org.gvsig.sldsupport.sld.symbol.misc.SLDParameterValue;
29

  
30
public class SLDGraphicStroke {
31
	
32
	protected SLDGraphic graphic = null;
33
	
34
	/*
35
	 * SLD 1.1.0
36
	 */
37
	protected SLDParameterValue gap = null;
38
	protected SLDParameterValue initialGap = null;
39
	
40
	public SLDGraphicStroke() {
41
	}
42
	
43
	public SLDGraphicStroke(SLDGraphic g) {
44
		graphic = g;
45
	}
46
	
47
	public SLDGraphic getGraphic() {
48
		return graphic;
49
	}
50
	
51
	public void setGraphic(SLDGraphic gr) {
52
		graphic = gr;
53
	}
54

  
55
	public SLDParameterValue getGap() {
56
		return gap;
57
	}
58

  
59
	public void setGap(SLDParameterValue gap) {
60
		this.gap = gap;
61
	}
62

  
63
	public SLDParameterValue getInitialGap() {
64
		return initialGap;
65
	}
66

  
67
	public void setInitialGap(SLDParameterValue initialGap) {
68
		this.initialGap = initialGap;
69
	}
70
	
71
	
72

  
73
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDDisplacement.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
import org.gvsig.sldsupport.sld.filter.expression.operator.SLDLiteral;
29
import org.gvsig.sldsupport.sld.symbol.misc.SLDParameterValue;
30

  
31
public class SLDDisplacement {
32
	
33
	protected SLDParameterValue x = null;
34
	protected SLDParameterValue y = null;
35
	
36
	public SLDDisplacement() {
37
		x = new SLDParameterValue();
38
		x.getExpressionList().add(new SLDLiteral("0.0"));
39
		y = new SLDParameterValue();
40
		y.getExpressionList().add(new SLDLiteral("0.0"));
41
	}
42
	
43
	public SLDParameterValue getDisplacementX() {
44
		return x;
45
	}
46
	public void setDisplacementX(SLDParameterValue x) {
47
		this.x = x;
48
	}
49
	public SLDParameterValue getDisplacementY() {
50
		return y;
51
	}
52
	public void setDisplacementY(SLDParameterValue y) {
53
		this.y = y;
54
	}
55

  
56
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDMark.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
import org.gvsig.sldsupport.sld.SLDTags;
29
import org.gvsig.sldsupport.sld.symbol.misc.SLDFill;
30
import org.gvsig.sldsupport.sld.symbol.misc.SLDStroke;
31

  
32
public class SLDMark implements SLDGraphicStackElement {
33
	
34
	public static final int MARK_TYPE_SIMPLE = 0;
35
	public static final int MARK_TYPE_WELL_KNOWN_NAME = 1;
36
	public static final int MARK_TYPE_ONLINE_RESOURCE = 2;
37
	public static final int MARK_TYPE_INLINE_CONTENT = 3;
38
	
39
	/**
40
	 * Used to manage four types as exclusive
41
	 */
42
	protected int markType = MARK_TYPE_SIMPLE;
43
	
44
	/*
45
	 * square, circle, triangle, star, cross, x
46
	 */
47
	protected String wellKnownName = SLDTags.SQUARE;
48
	protected String onlineResource = null;
49
	protected byte[] inlineContent = null;
50
	
51
	protected SLDFill fill = null;
52
	protected SLDStroke stroke = null;
53
	
54
	/*
55
	 * These two fields are used when type is
56
	 * onlieResourec or inlineContent
57
	 */
58
	protected String format = null;
59
	protected int markIndex = -1;
60
	// =========================================
61
	
62
	public SLDMark() {
63
		/*
64
		 * Defaults
65
		 */
66
		markType = MARK_TYPE_SIMPLE;
67
		fill = new SLDFill();
68
		stroke = new SLDStroke();
69
	}
70
	
71
	public SLDMark(int type) {
72
		markType = type;
73
		fill = new SLDFill();
74
		stroke = new SLDStroke();
75
	}
76
	
77
	
78
	public int getMarkType() {
79
		return this.markType;
80
	}
81
	
82
	public void setMarkType(int t) {
83
		this.markType = t;
84
	}
85
	
86
	public String getWellKnownName() {
87
		if (this.markType == MARK_TYPE_WELL_KNOWN_NAME) {
88
			return wellKnownName;
89
		} else {
90
			return null;
91
		}
92
	}
93
	
94
	public String getOnlineResource() {
95
		if (this.markType == MARK_TYPE_ONLINE_RESOURCE) {
96
			return this.onlineResource;
97
		} else {
98
			return null;
99
		}
100
	}
101
	
102
	public byte[] getInlineContent() {
103
		if (this.markType == MARK_TYPE_INLINE_CONTENT) {
104
			return this.inlineContent;
105
		} else {
106
			return null;
107
		}
108
	}
109
	
110
	public void setWellKnownName(String str) {
111
		this.wellKnownName = str;
112
	}
113
	
114
	public void setOnlineResource(String res) {
115
		this.onlineResource = res;
116
	}
117
	
118
	public void setInlineContent(byte[] bb) {
119
		this.inlineContent = bb;
120
	}
121
	
122
	// ====================================
123
	
124
	public SLDFill getFill() {
125
		return this.fill;
126
	}
127

  
128
	public void setFill(SLDFill f) {
129
		this.fill = f;
130
	}
131
	
132
	
133
	public SLDStroke getStroke() {
134
		return this.stroke;
135
	}
136
	
137
	public void setStroke(SLDStroke str) {
138
		this.stroke = str;
139
	}
140

  
141
	
142
	public String getFormat() {
143
		return this.format;
144
	}
145
	
146
	public void setFormat(String fmt) {
147
		this.format = fmt;
148
	}
149

  
150
	
151
	/**
152
	 * Index of used element in online resource (example: TTY file)
153
	 * or inline content
154
	 * @return
155
	 */
156
	public int getMarkIndex() {
157
		return this.markIndex;
158
	}
159
	
160
	public void setMarkIndex(int ind) {
161
		this.markIndex = ind;
162
	}
163
	
164
	
165
	
166

  
167
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDLegendGraphic.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
public class SLDLegendGraphic {
29
	
30
	protected SLDGraphic graphic = null;
31
	
32
	public SLDLegendGraphic() {
33
	}
34
	
35
	public SLDGraphic getGraphic() {
36
		return graphic;
37
	}
38
	
39
	public void setGraphic(SLDGraphic gr) {
40
		graphic = gr;
41
	}
42

  
43
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDGraphic.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
import java.util.ArrayList;
29
import java.util.List;
30

  
31
import org.gvsig.sldsupport.sld.filter.expression.operator.SLDLiteral;
32
import org.gvsig.sldsupport.sld.symbol.misc.SLDParameterValue;
33

  
34
public class SLDGraphic {
35
	
36
	protected List<SLDGraphicStackElement> graphicStack =
37
			new ArrayList<SLDGraphicStackElement>();
38
	
39
	protected SLDParameterValue opacity = null;
40
	protected SLDParameterValue size = null;
41

  
42
	/**
43
	 * In decimal degrees, clockwise
44
	 */
45
	protected SLDParameterValue rotation = null;
46
	
47
	protected SLDAnchorPoint anchor = null;
48
	protected SLDDisplacement displacement = null;
49
	
50
	public SLDGraphic() {
51
		/*
52
		 * Defaults
53
		 */
54
		opacity = new SLDParameterValue();
55
		opacity.getExpressionList().add(new SLDLiteral("1.0"));
56
		size = new SLDParameterValue();
57
		size.getExpressionList().add(new SLDLiteral("6.0"));
58
		rotation = new SLDParameterValue();
59
		rotation.getExpressionList().add(new SLDLiteral("0.0"));
60
	}
61
	
62
	public void setDefaultMark() {
63
		graphicStack.clear();
64
		/*
65
		 * Get default marker with well known name
66
		 */
67
		SLDMark mk = new SLDMark(SLDMark.MARK_TYPE_WELL_KNOWN_NAME);
68
		graphicStack.add(mk);
69
	}
70
	
71
	
72
	/**
73
	 * Order matters, we use utility interface SLDGraphicStackElement 
74
	 * This list is made of SLDMark and SLDExternalGraphic
75
	 * 
76
	 * @return
77
	 */
78
	public List<SLDGraphicStackElement> getElementStack() {
79
		return graphicStack;
80
	}
81
	
82
	
83
	public SLDParameterValue getOpacity() {
84
		return this.opacity;
85
	}
86
	
87
	public SLDParameterValue getSize() {
88
		return this.size;
89
	}
90
	
91
	/**
92
	 * In decimal degrees, clockwise
93
	 * @return
94
	 */
95
	public SLDParameterValue getRotation() {
96
		return this.rotation;
97
	}
98
	
99
	// ====================================
100
	
101
	public void setOpacity(SLDParameterValue opa) {
102
		this.opacity = opa;
103
	}
104
	
105
	public void setSize(SLDParameterValue sz) {
106
		this.size = sz;
107
	}
108
	
109
	/**
110
	 * In decimal degrees, clockwise
111
	 * @param rot
112
	 */
113
	public void setRotation(SLDParameterValue rot) {
114
		this.rotation = rot;
115
	}
116

  
117

  
118
	public SLDAnchorPoint getAnchor() {
119
		return anchor;
120
	}
121

  
122

  
123
	public void setAnchor(SLDAnchorPoint anchor) {
124
		this.anchor = anchor;
125
	}
126

  
127

  
128
	public SLDDisplacement getDisplacement() {
129
		return displacement;
130
	}
131

  
132

  
133
	public void setDisplacement(SLDDisplacement displacement) {
134
		this.displacement = displacement;
135
	}
136

  
137

  
138
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDGraphicStackElement.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
/**
29
 * Utility interface to have ordered elements in
30
 * SLDGraphic
31
 * 
32
 * @author jldominguez
33
 *
34
 */
35
public interface SLDGraphicStackElement {
36

  
37
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/graphic/SLDExternalGraphic.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.graphic;
27

  
28
public class SLDExternalGraphic implements SLDGraphicStackElement {
29
	
30
	protected String onlineResource = null;
31
	protected byte[] inlineContent = null;
32

  
33
	/*
34
	 * true - onlineResource has URL
35
	 * false - inlineContent has content
36
	 */
37
	protected boolean isOnline = true;
38
	protected String format = null; 
39
	
40
	public SLDExternalGraphic() {
41
		
42
	}
43
	
44
	/**
45
	 * If this returns null, use getInlineContent
46
	 * @return
47
	 */
48
	public String getOnlineResource() {
49
		if (isOnline) {
50
			return this.onlineResource;
51
		} else {
52
			return null;
53
		}
54
	}
55
	
56
	public byte[] getInlineContent() {
57
		if (isOnline) {
58
			return null;
59
		} else {
60
			return this.inlineContent;
61
		}
62
	}
63
	
64
	public String getFormat() {
65
		return format;
66
	}
67
	
68
	public boolean isOnlineResource() {
69
		return isOnline;
70
	}
71

  
72
	public void setOnlineResource(String onlineResource) {
73
		this.onlineResource = onlineResource;
74
	}
75

  
76
	public void setInlineContent(byte[] inlineContent) {
77
		this.inlineContent = inlineContent;
78
	}
79

  
80
	public void setIsOnline(boolean isOnline) {
81
		this.isOnline = isOnline;
82
	}
83

  
84
	public void setFormat(String format) {
85
		this.format = format;
86
	}
87
	
88
	
89

  
90
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/style/layer/SLDNamedStyle.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.style.layer;
27

  
28
public class SLDNamedStyle extends SLDLayerStyle {
29

  
30
	public SLDNamedStyle() {
31
	}
32
	
33
	/**
34
	 * Nothing to add, SLDLayerStyle has getName()
35
	 */
36

  
37
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/style/layer/SLDLayerStyle.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.style.layer;
27

  
28
public abstract class SLDLayerStyle {
29
	
30
	protected String name = null;
31
	
32
	public SLDLayerStyle() {
33
	}
34
	
35
	public String getName() {
36
		return name;
37
	}
38
	
39
	public void setName(String n) {
40
		name = n;
41
	}
42

  
43

  
44
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.87/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/style/layer/SLDUserStyle.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
5
 *   Copyright (C) 2007-2013 gvSIG Association.
6
 *  
7
 *   This program is free software; you can redistribute it and/or
8
 *   modify it under the terms of the GNU General Public License
9
 *   as published by the Free Software Foundation; either version 3
10
 *   of the License, or (at your option) any later version.
11
 *  
12
 *   This program is distributed in the hope that it will be useful,
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *   GNU General Public License for more details.
16
 *  
17
 *   You should have received a copy of the GNU General Public License
18
 *   along with this program; if not, write to the Free Software
19
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
 *   MA  02110-1301, USA.
21
 *  
22
 *   For any additional information, do not hesitate to contact us
23
 *   at info AT gvsig.com, or visit our website www.gvsig.com.
24
 *   
25
 *******************************************************************************/
26
package org.gvsig.sldsupport.sld.style.layer;
27

  
28
import java.util.ArrayList;
29
import java.util.List;
30

  
31
import org.gvsig.sldsupport.sld.style.SLDFeatureStyle;
32

  
33
public class SLDUserStyle extends SLDLayerStyle {
34
	
35
	protected String title = null;
36
	protected String theAbstract = null;
37
	
38
	/**
39
	 * "0" = False (default)
40
	 * "1" = True
41
	 * 
42
	 */
43
	protected String isDefault = "0";
44
	
45
	protected List<SLDFeatureStyle> featureStyles = new ArrayList<SLDFeatureStyle>();
46
	
47
	public SLDUserStyle() {
48
	}
49
	
50
	public String getTitle() {
51
		return title;
52
	}
53
	
54
	public void setTile(String tit) {
55
		title = tit;
56
	}
57
	
58
	// ===============
59
	
60
	public String getAbstract() {
61
		return this.theAbstract;
62
	}
63
	
64
	public void setAbstract(String abst) {
65
		this.theAbstract = abst;
66
	}
67
	
68
	/**
69
	 * "0" = False (default)
70
	 * "1" = True
71
	 * 
72
	 * @return
73
	 */
74
	public String isDefault() {
75
		return this.isDefault;
76
	}
77
	
78
	public void setIsDefault(String def) {
79
		this.isDefault = def;
80
	}
81
	
82
	public List<SLDFeatureStyle> getFeatureStyles() {
83
		return featureStyles;
84
	}
85
	
86

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff