Statistics
| Revision:

gvsig-sldtools / org.gvsig.sld / org.gvsig.sldsupport / org.gvsig.sldsupport.lib / org.gvsig.sldsupport.lib.api / src / main / java / org / gvsig / sldsupport / sld / graphic / SLDExternalGraphic.java @ 46

History | View | Annotate | Download (2.36 KB)

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
}