Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.mapcontext / org.gvsig.fmap.mapcontext.api / src / main / java / org / gvsig / fmap / mapcontext / layers / ExtendedPropertiesSupport.java @ 41350

History | View | Annotate | Download (2.17 KB)

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

    
26
import java.util.Map;
27

    
28
public interface ExtendedPropertiesSupport {
29

    
30
    /**
31
     * <p>
32
     * Returns a reference to an object (property) associated to this layer.</p>
33
     *
34
     * <p>
35
     * For example, you can attach a network definition to key "network" and
36
     * check
37
     * if a layer has a network loaded using
38
     * <i>getAssociatedObject("network")</i> and
39
     * that it's not null.</p>
40
     *
41
     * @param key the key associated to the property
42
     *
43
     * @return <code>null</code> if key is not found
44
     *
45
     * @see #getExtendedProperties()
46
     * @see #setProperty(Object, Object)
47
     */
48
    public Object getProperty(Object key);
49

    
50
    /**
51
     * Inserts an object as a property to this layer.
52
     *
53
     * @param key the key associated to the property
54
     * @param obj the property
55
     *
56
     * @see #getProperty(Object)
57
     * @see #getExtendedProperties()
58
     */
59
    public void setProperty(Object key, Object obj);
60

    
61
    /**
62
     * Returns a hash map with all new properties associated to this layer.
63
     *
64
     * @return hash table with the added properties
65
     *
66
     * @see #getProperty(Object)
67
     * @see #setProperty(Object, Object)
68
     */
69
    public Map getExtendedProperties();
70
}