Revision 1265

View differences:

org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.sldsupport.lib.api</artifactId>
5
  <packaging>jar</packaging>
6
  <name>${project.artifactId}</name>
7
  <parent>
8
    <groupId>org.gvsig</groupId>
9
    <artifactId>org.gvsig.sldsupport.lib</artifactId>
10
    <version>2.0.243</version>
11
  </parent>
12

  
13
  <dependencies>
14

  
15
    <dependency>
16
      <groupId>org.gvsig</groupId>
17
      <artifactId>org.gvsig.symbology.lib.api</artifactId>
18
      <scope>compile</scope>
19
    </dependency>
20

  
21
<!--     <dependency>
22
    	<groupId>org.gvsig</groupId>
23
    	<artifactId>org.gvsig.xmlpull.lib.api</artifactId>
24
    	<scope>compile</scope>
25
    </dependency> -->
26

  
27
  </dependencies>
28

  
29
  <!-- Generates a jar file only with the test classes
30
  <build>
31
    <plugins>
32
      <plugin>
33
        <groupId>org.apache.maven.plugins</groupId>
34
        <artifactId>maven-jar-plugin</artifactId>
35
        <configuration>
36
        </configuration>
37
        <executions>
38
          <execution>
39
            <goals>
40
              <goal>test-jar</goal>
41
            </goals>
42
          </execution>
43
        </executions>
44
      </plugin>
45
    </plugins>
46
  </build>
47
  -->
48

  
49
</project>
50

  
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/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.243/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.243/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.243/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.243/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.243/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.243/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.243/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.243/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.243/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.243/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.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/SLDTags.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;
27
/**
28
 * Tags for SLD
29
 *
30
 * @see http://portal.opengeospatial.org/files/?artifact_id=1188
31
 *
32
 * @author pepe vidal salvador - jose.vidal.salvador@iver.es
33
 */
34
public class SLDTags
35
{
36
	public final static String SLD_ROOT="StyledLayerDescriptor";
37
	public final static String VERSION_ATTR="version";
38

  
39
	public final static String NAMEDLAYER="NamedLayer";
40
	public final static String USERDEFINEDLAYER="UserLayer";
41
	public final static String NAME="Name";
42
	public final static String TITLE ="Title";
43
	
44
	public final static String ABSTRACT ="Abstract";
45
	public final static String DESCRIPTION ="Description";
46
	
47
	public final static String USERSTYLE ="UserStyle";
48
	public final static String NAMEDSTYLE ="NamedStyle";
49
	
50
	/*
51
	 * SLD 1.0.0
52
	 */
53
	public final static String FEATURETYPESTYLE ="FeatureTypeStyle";
54
	/*
55
	 * SLD 1.1.0
56
	 */
57
	public final static String FEATURESTYLE ="FeatureStyle";
58
	
59
	public final static String FEATURETYPENAME ="FeatureTypeName";
60
	public final static String FEATURETYPECONSTRAINT = "FeatureTypeConstraint";
61
	public final static String SEMANTICTYPEIDENTIFIER="SemanticTypeIdentifier";
62
	public final static String RULE = "Rule";
63
	public final static String FILTER = "Filter";
64

  
65
	public final static String LITERAL = "Literal";
66
	public static final String LITERAL_ATTR = "literal";
67

  
68
	public static final String LINESYMBOLIZER = "LineSymbolizer";
69
	public static final String POINTSYMBOLIZER = "PointSymbolizer";
70
	public static final String TEXTSYMBOLIZER = "TextSymbolizer";
71
	public static final String POLYGONSYMBOLIZER = "PolygonSymbolizer";
72
	public static final String RASTERSYMBOLIZER = "RasterSymbolizer";
73

  
74
	/*^
75
	 * SLD 1.1.0
76
	 */
77
	public static final String LINESYMBOL = "LineSymbol";
78
	public static final String POINTSYMBOL = "PointSymbol";
79
	public static final String POLYGONSYMBOL = "PolygonSymbol";
80
	public static final String TEXTSYMBOL = "TextSymbol";
81
	public static final String RASTERSYMBOL = "RasterSymbol";
82
	public static final String MAPPEDCOLORSYMBOL = "MappedColorSymbol";
83
	// 
84

  
85
	public static final String GEOMETRY = "Geometry";
86

  
87
	/*
88
	 * SLD 1.0.0
89
	 */
90
	public static final String CSSPARAMETER = "CssParameter";
91
	/*
92
	 * SLD 1.1.0
93
	 */
94
	public static final String SVGPARAMETER = "SvgParameter";
95
	
96
	public static final String PERPENDICULAROFFSET = "PerpendicularOffset";
97
	
98
	public static final String NAME_ATTR = "name";
99

  
100
	public static final String NAME_ATTR_VERSAL = "Name";//Ppara compatibilizar leyendas generadas con la 1.1.2
101

  
102
	public static final String FILL = "Fill";
103
	public static final String FILL_ATTR = "fill";
104
	public static final String FILLOPACITY_ATTR = "fill-opacity";
105

  
106
	public static final String STROKE = "Stroke";
107
	public static final String STROKE_ATTR = "stroke";
108
	public static final String STROKE_WIDTH_ATTR = "stroke-width";
109
	public static final String STROKE_OPACITY_ATTR = "stroke-opacity";
110

  
111

  
112
	public static final String SIZE = "Size";
113
	public static final String ROTATION = "Rotation";
114
	public static final String WIDTH = "Width";
115
	public static final String MARK = "Mark";
116
	
117
	/*
118
	 * SLD 1.1.0
119
	 */
120
	public static final String ANCHOR_POINT = "AnchorPoint";
121
	public static final String DISPLACEMENT = "Displacement";
122
	public static final String MARK_INDEX = "MarkIndex";
123
	
124
	/*
125
	 * SLD 1.1.0
126
	 */
127
	public static final String ANCHOR_POINT_X = "AnchorPointX";
128
	public static final String ANCHOR_POINT_Y = "AnchorPointY";
129
	public static final String DISPLACEMENT_X = "DisplacementX";
130
	public static final String DISPLACEMENT_Y = "DisplacementY";
131

  
132
	public static final String GRAPHIC = "Graphic";
133
	public static final String EXTERNALGRAPHIC = "ExternalGraphic";
134
	public static final String LEGENDGRAPHIC = "LegendGraphic";
135
	public static final String GRAPHICFILL = "GraphicFill";
136
	public static final String GRAPHICSTROKE = "GraphicStroke";
137
	
138
	public static final String INITIAL_GAP = "InitialGap";
139
	public static final String GAP = "Gap";
140
	
141
	
142

  
143
	public static final String LABEL = "Label";
144
	public static final String LABELPLACEMENT = "LabelPlacement";
145
	public static final String FONT = "Font";
146
	public static final String FONTFAMILY_ATTR = "font-family";
147
	public static final String FONTSTYLE_ATTR = "font-style";
148
	public static final String FONTSIZE_ATTR = "font-size";
149
	public static final String FONTWEIGHT_ATTR = "font-weight";
150
	public static final String DISPLACEMENT_ATTR = "displacement";
151

  
152
	public static final String WELLKNOWNNAME = "WellKnownName";
153
	public static final String FORMAT = "Format";
154

  
155
	public static final String OVERLAPBEHAVIOR = "OverlapBehavior";
156
	public static final String OPACITY = "Opacity";
157
	public static final String COLORMAP = "ColorMap";
158
	public static final String MINSCALEDENOMINATOR = "MinScaleDenominator";
159
	public static final String MAXSCALEDENOMINATOR = "MaxScaleDenominator";
160
	public static final String ELSEFILTER = "ElseFilter";
161
	public static final String HALO = "Halo";
162
	public static final String PRIORITY_ATTR = "priority";
163
	public static final String VENDOROPTION_ATTR = "vendoroption";
164
	public static final String FID_ATTR = "fid";
165
	public static final String LOWERBOUNDARY = "LowerBoundary";
166
	public static final String UPPERBOUNDARY = "UpperBoundary";
167
	public static final String WILDCARD_ATTR = "wildCard";
168
	public static final String SINGLECHAR_ATTR = "singleChar";
169
	public static final String ESCAPECHAR_ATTR = "escapeChar";
170
	public static final String ESCAPE_ATTR = "escape";
171

  
172
	public static final String ROTATION_ATTR = "rotation";
173
	public static final String WIDTH_ATTR = "width";
174
	public static final String LINECAP_ATTR = "linecap";
175
	public static final String STROKE_LINECAP_ATTR = "stroke-linecap";
176
	public static final String LINEJOIN_ATTR = "linejoin";
177
	public static final String STROKE_LINEJOIN_ATTR = "stroke-linejoin";
178
	public static final String DASHARRAY_ATTR = "dasharray";
179
	public static final String STROKE_DASHARRAY_ATTR = "stroke-dasharray";
180
	public static final String DASHOFFSET_ATTR = "dashoffset";
181
	public static final String STROKE_DASHOFFSET_ATTR = "stroke-dashoffset";
182

  
183
	public static final String LAYER_FEATURE_CONST = "LayerFeatureConstraints";
184
	public static final String IS_DEFAULT = "IsDefault";
185

  
186
	public static final String REMOTE_OWS = "RemoteOWS";
187
	public static final String SERVICE = "Service";
188
	public static final String ONLINE_RESOURCE = "OnlineResource";
189
	
190
	/*
191
	 * SLD 1.1.0
192
	 */
193
	public static final String INLINE_CONTENT = "InlineContent";
194
	
195
	public final static String XLINK_HREF ="xlink:href";
196

  
197
	public static final String EXTENT = "Extent";
198
	public static final String VALUE = "Value";
199
	public static final String CSSPARAMETER_WIDTH = "CssParameter name=\"Stroke-width\"";
200
	public static final String PROPERTY_NAME =  "PropertyName";
201
	public static final String FUNCTION = "Function";
202

  
203

  
204
	public static final String SQUARE = "square";
205
	public static final String CIRCLE = "circle";
206
	public static final String TRIANGLE = "triangle";
207
	public static final String STAR = "star";
208
	public static final String CROSS = "cross";
209
	public static final String X = "x";
210

  
211

  
212

  
213
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/FilterTags.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.filter;
27

  
28
/**
29
 * Tags for Filter Encoding 
30
 * 
31
 * @see http://www.opengeospatial.org/standards/filter
32
 * @author pepe vidal salvador - jose.vidal.salvador@iver.es
33
 */
34
public class FilterTags {
35

  
36

  
37
	public final static String FILTER = "Filter";
38
	public final static String OGC_FILTER = "ogc:Filter";
39
	
40
	public final static String NAME = "Name";
41

  
42
	public final static String PROPERTYISEQUALTO = "PropertyIsEqualTo";
43
	public final static String PROPERTYISNOTEQUALTO = "PropertyIsNotEqualTo";
44
	public final static String PROPERTYISLESSTHAN = "PropertyIsLessThan";
45
	public final static String PROPERTYISLESSOREQUALTHAN = "PropertyIsLessThanOrEqualTo";
46
	public final static String PROPERTYISGREATERTHAN = "PropertyIsGreaterThan";
47
	public final static String PROPERTYISGREATEROREQUALTHAN = "PropertyIsGreaterThanOrEqualTo";
48
	public final static String OGC_PROPERTYISEQUALTO = "ogc:PropertyIsEqualTo";
49
	public final static String OGC_PROPERTYISNOTEQUALTO = "ogc:PropertyIsNotEqualTo";
50
	public final static String OGC_PROPERTYISLESSTHAN = "ogc:PropertyIsLessThan";
51
	public final static String OGC_PROPERTYISLESSOREQUALTHAN = "ogc:PropertyIsLessThanOrEqualTo";
52
	public final static String OGC_PROPERTYISGREATERTHAN = "ogc:PropertyIsGreaterThan";
53
	public final static String OGC_PROPERTYISGREATEROREQUALTHAN = "ogc:PropertyIsGreaterThanOrEqualTo";
54
	
55
	public final static String PROPERTYISLIKE = "PropertyIsLike";
56
	public final static String PROPERTYISNULL = "PropertyIsNull";
57
	public final static String PROPERTYISBETWEEN = "PropertyIsBetween";
58
	public final static String OGC_PROPERTYISLIKE = "ogc:PropertyIsLike";
59
	public final static String OGC_PROPERTYISNULL = "ogc:PropertyIsNull";
60
	public final static String OGC_PROPERTYISBETWEEN = "ogc:PropertyIsBetween";
61
	
62
	public final static String PROPERTYFEATUREID = "FeatureId";
63
	public final static String OGC_PROPERTYFEATUREID = "ogc:FeatureId";
64
	
65
	public static final String PROPERTYNAME = "PropertyName";
66
	public static final String OGC_PROPERTYNAME = "ogc:PropertyName";
67

  
68
	public final static String EQUALS = "Equals";
69
	public final static String DISJOINT= "Disjoint";
70
	public final static String INTERSECTS = "Intersects";
71
	public final static String TOUCHES = "Touches";
72
	public final static String CROSSES = "Crosses";
73
	public final static String WITHIN = "Within";
74
	public final static String CONTAINS = "Contains";
75
	public final static String OVERLAPS = "Overlaps";
76
	
77
	public final static String BEYOND = "Beyond";
78
	public final static String DWITHIN = "DWithin";
79
	
80
	public final static String BBOX = "BBOX";
81

  
82
	public final static String AND = "And";
83
	public final static String NOT = "Not";
84
	public final static String OR = "Or";
85
	public final static String OGC_AND = "ogc:And";
86
	public final static String OGC_NOT = "ogc:Not";
87
	public final static String OGC_OR = "ogc:Or";
88

  
89
	public static final String ADD = "Add";
90
	public static final String SUB = "Sub";
91
	public static final String MUL = "Mul";
92
	public static final String DIV = "Div";
93
	public static final String OGC_ADD = "ogc:Add";
94
	public static final String OGC_SUB = "ogc:Sub";
95
	public static final String OGC_MUL = "ogc:Mul";
96
	public static final String OGC_DIV = "ogc:Div";
97

  
98
	public final static String LITERAL = "Literal";
99
	public final static String OGC_LITERAL = "ogc:Literal";
100
	
101
	public static final String LITERAL_ATTR = "literal";
102
	public static final String EXPRESSION = "Expression";
103
	public static final String FUNCTION = "Function";
104
	public static final String LOWER_BOUNDARY = "LowerBoundary";
105
	public static final String UPPER_BOUNDARY = "UpperBoundary";
106
	public static final String WILDCHAR = "wildChar";
107
	public static final String SINGLECHAR = "singleChar";
108
	public static final String ESCAPECHAR = "escapeChar";
109
	
110
	public static final String MATCHCASE_ATT = "matchCase";
111
	
112
	
113

  
114
	public static final String ENVELOPE = "Envelope";
115
	public static final String LOWER_CORNER = "lowerCorner";
116
	public static final String UPPER_CORNER = "upperCorner";
117

  
118
	//Geometries
119
	public static final String GML_POINT = "Point";
120
	public static final String GML_LINESTRING = "LineString";
121
	public static final String GML_LINEARRING = "LinearRing";
122
	public static final String GML_POLYGON = "Polygon";
123
	public static final String GML_MULTIPOINT = "MultiPoint";
124
	public static final String GML_MULTILINESTRING = "MultiLineString";
125
	public static final String GML_MULTIPOLYGON = "MultiPolygon";
126
	public static final String GML_MULTIGEOMETRY = "MultiGeometry";
127
	public static final String GML_POINTPROPERTY = "pointProperty";
128
	public static final String GML_LINESTRINGPROPERTY = "lineStringProperty";
129
	public static final String GML_POLYGONPROPERTY = "polygonProperty";
130
	public static final String GML_GEOMETRYPROPERTY = "geometryProperty";
131
	public static final String GML_MULTIPOINTPROPERTY = "multiPointProperty";
132
	public static final String GML_MULTILINESTRINGPROPERTY = "multiLineStringProperty";
133
	public static final String GML_MULTIPOLYGONPROPERTY = "multiPolygonProperty";
134
	public static final String GML_MULTIGEOMETRYPROPERTY = "multiGeometryProperty";
135

  
136
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/SLDFilterOperator.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.filter;
27

  
28
public interface SLDFilterOperator {
29

  
30
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/SLDFilter.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.filter;
27

  
28
public abstract class SLDFilter {
29
	
30
	protected SLDFilterOperator operator = null;
31
	protected boolean isElse = false;
32

  
33
	public SLDFilter() {
34
	}
35
	
36
	/**
37
	 * If this is true, getFilterOperator() must not be
38
	 * called.
39
	 * 
40
	 * @return
41
	 */
42
	public boolean isElse() {
43
		return isElse;
44
	}
45
	
46
	public void setIsElse(boolean b) {
47
		isElse = b;
48
	}
49

  
50
	
51
	public SLDFilterOperator getFilterOperator() {
52
		return operator;
53
	}
54
	
55
	public void setFilterOperator(SLDFilterOperator ope) {
56
		operator = ope;
57
	}
58
	
59
	/**
60
	 * This causes the reset of the SLDFilterOperator
61
	 * 
62
	 * @param expr as a SQL predicate
63
	 */
64
	public abstract void setSQLExpression(String expr);
65
	
66
	/**
67
	 * Get expression as a SQL predicate
68
	 * @return
69
	 */
70
	public abstract String getSQLExpression();
71

  
72

  
73
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/operator/SLDComparisonOperator.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.filter.operator;
27

  
28
import java.util.List;
29

  
30
import org.gvsig.sldsupport.sld.filter.SLDFilterOperator;
31
import org.gvsig.sldsupport.sld.filter.expression.SLDExpression;
32

  
33
public interface SLDComparisonOperator extends SLDFilterOperator {
34
	
35
	/**
36
	 * Return list of expressions (literals, property names, etc)
37
	 * involved in the comparison
38
	 * @return
39
	 */
40
	public List<SLDExpression> getExpressions(); 
41

  
42
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/operator/comparison/SLDIsBetweenOperator.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.filter.operator.comparison;
27

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

  
31
import org.gvsig.sldsupport.sld.filter.expression.SLDExpression;
32
import org.gvsig.sldsupport.sld.filter.operator.SLDComparisonOperator;
33

  
34
public class SLDIsBetweenOperator
35
implements SLDComparisonOperator {
36
	
37
	protected SLDExpression expr = null;
38
	protected SLDExpression lower_expr = null;
39
	protected SLDExpression upper_expr = null;
40
	
41
	public SLDIsBetweenOperator() {
42
	}
43
	
44
	public SLDExpression getExpression() {
45
		return expr;
46
	}
47
	
48
	public SLDExpression getLowerBoundary() {
49
		return lower_expr;
50
	}
51
	
52
	public SLDExpression getUpperBoundary() {
53
		return upper_expr;
54
	}
55
	
56
	public void setExpression(SLDExpression e) {
57
		expr = e;
58
	}
59
	
60
	public void setLowerBoundary(SLDExpression e) {
61
		lower_expr = e;
62
	}
63
	
64
	public void setUpperBoundary(SLDExpression e) {
65
		upper_expr = e;
66
	}
67
	
68
	public List<SLDExpression> getExpressions() {
69
		
70
		List<SLDExpression> resp = new ArrayList<SLDExpression>();
71
		if (expr != null) {
72
			resp.add(expr);
73
		}
74
		if (lower_expr != null) {
75
			resp.add(lower_expr);
76
		}
77
		if (upper_expr != null) {
78
			resp.add(upper_expr);
79
		}
80
		return resp;
81
	}	
82

  
83
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/operator/comparison/SLDIsNullOperator.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.filter.operator.comparison;
27

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

  
31
import org.gvsig.sldsupport.sld.filter.expression.SLDExpression;
32
import org.gvsig.sldsupport.sld.filter.expression.operator.SLDPropertyName;
33
import org.gvsig.sldsupport.sld.filter.operator.SLDComparisonOperator;
34

  
35
public class SLDIsNullOperator
36
implements SLDComparisonOperator {
37
	
38
	protected String propertyName = null;
39
	
40
	public SLDIsNullOperator() {
41
	}
42
	
43
	public String getPropertyName() {
44
		return this.propertyName;
45
	}
46
	
47
	public void setPropertyName(String str) {
48
		this.propertyName = str;
49
	}
50
	
51
	public List<SLDExpression> getExpressions() {
52
		
53
		List<SLDExpression> resp = new ArrayList<SLDExpression>();
54
		if (propertyName != null) {
55
			resp.add(new SLDPropertyName(propertyName));
56
		}
57
		return resp;
58
	}
59
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/operator/comparison/SLDBinaryComparisonOperator.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.filter.operator.comparison;
27

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

  
31
import org.gvsig.sldsupport.sld.filter.expression.SLDExpression;
32
import org.gvsig.sldsupport.sld.filter.operator.SLDComparisonOperator;
33

  
34
public class SLDBinaryComparisonOperator
35
implements SLDComparisonOperator {
36
	
37
	/*
38
	 * PropertyIsEqualTo
39
	 * PropertyIsNotEqualTo
40
	 * PropertyIsLessThan
41
	 * PropertyIsGreaterThan
42
	 * PropertyIsLessThanOrEqualTo
43
	 * PropertyIsGreaterThanOrEqualTo
44
	 * 
45
	 */
46
	protected String compOperator = null;
47
	protected boolean caseSensitive = true;
48
	
49
	protected SLDExpression expr_1 = null;
50
	protected SLDExpression expr_2 = null;
51

  
52
	public SLDBinaryComparisonOperator() {
53
	}
54
	
55
	public String getComparisonOperator() {
56
		return compOperator;
57
	}
58
	
59
	public void setComparisonOperator(String o) {
60
		compOperator = o;
61
	}
62
	
63
	public boolean isCaseSensitive() {
64
		return caseSensitive;
65
	}
66
	
67
	public void setIsCaseSensitive(boolean bo) {
68
		caseSensitive = bo;
69
	}
70
	
71
	public SLDExpression getFirstExpression() {
72
		return expr_1;
73
	}
74
	
75
	public SLDExpression getSecondExpression() {
76
		return expr_2;
77
	}
78
	
79
	public void setFirstExpression(SLDExpression ex) {
80
		expr_1 = ex;
81
	}
82
	
83
	public void setSecondExpression(SLDExpression ex) {
84
		expr_2 = ex;
85
	}
86
	
87
	public List<SLDExpression> getExpressions() {
88
		
89
		List<SLDExpression> resp = new ArrayList<SLDExpression>();
90
		if (expr_1 != null) {
91
			resp.add(expr_1);
92
		}
93
		if (expr_2 != null) {
94
			resp.add(expr_2);
95
		}
96
		return resp;
97
	}
98

  
99
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/operator/comparison/SLDIsLikeOperator.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.filter.operator.comparison;
27

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

  
31
import org.gvsig.sldsupport.sld.filter.expression.SLDExpression;
32
import org.gvsig.sldsupport.sld.filter.expression.operator.SLDPropertyName;
33
import org.gvsig.sldsupport.sld.filter.operator.SLDComparisonOperator;
34

  
35
public class SLDIsLikeOperator implements SLDComparisonOperator {
36
	
37
	protected String propertyName = null;
38
	protected String literal = null;
39
	protected String wildCard = null;
40
	protected String singleChar = null;
41
	protected String escapeChar = null;
42
	
43
	public SLDIsLikeOperator() {
44
	}
45
	
46
	public String getPropertyName() {
47
		return this.propertyName;
48
	}
49
	
50
	public String getLiteral() {
51
		return this.literal;
52
	}
53
	
54
	public String getWildCard() {
55
		return this.wildCard;
56
	}
57
	
58
	public String getSingleChar() {
59
		return this.singleChar;
60
	}
61
	
62
	public String getEscapeChar() {
63
		return this.escapeChar;
64
	}
65

  
66
	public void setPropertyName(String propertyName) {
67
		this.propertyName = propertyName;
68
	}
69

  
70
	public void setLiteral(String literal) {
71
		this.literal = literal;
72
	}
73

  
74
	public void setWildCard(String wildCard) {
75
		this.wildCard = wildCard;
76
	}
77

  
78
	public void setSingleChar(String singleChar) {
79
		this.singleChar = singleChar;
80
	}
81

  
82
	public void setEscapeChar(String escapeChar) {
83
		this.escapeChar = escapeChar;
84
	}
85
	
86
	public List<SLDExpression> getExpressions() {
87
		
88
		List<SLDExpression> resp = new ArrayList<SLDExpression>();
89
		if (propertyName != null) {
90
			resp.add(new SLDPropertyName(propertyName));
91
		}
92
		return resp;
93
	}	
94
	
95
	
96

  
97
}
org.gvsig.sld/tags/org.gvsig.sld-2.0.243/org.gvsig.sldsupport/org.gvsig.sldsupport.lib/org.gvsig.sldsupport.lib.api/src/main/java/org/gvsig/sldsupport/sld/filter/operator/SLDLogicOperator.java
1
/*******************************************************************************
2
 *
3
 *   gvSIG. Desktop Geographic Information System.
4
 *  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff