/[schmitzm]/trunk/src/skrueger/geotools/AttributeMetadataImplMap.java
ViewVC logotype

Contents of /trunk/src/skrueger/geotools/AttributeMetadataImplMap.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 769 - (show annotations)
Sun Mar 21 11:02:34 2010 UTC (14 years, 11 months ago) by alfonx
File MIME type: text/plain
File size: 1165 byte(s)
Made an interface and a Abstract class for AttributeMetaData
1 package skrueger.geotools;
2
3 import java.util.List;
4
5 import org.opengis.feature.type.Name;
6
7 import skrueger.AttributeMetadataImpl;
8
9 public class AttributeMetadataImplMap extends AttributeMetadataMap<AttributeMetadataImpl> {
10
11 public AttributeMetadataImplMap(List<String> langs) {
12 super(langs);
13 }
14
15 public AttributeMetadataImplMap() {
16 super();
17 }
18
19 /**
20 * Returns a deep-copy. @see {@link Copyable} interface
21 */
22 @Override
23 public AttributeMetadataImplMap copy() {
24 final AttributeMetadataImplMap copy = new AttributeMetadataImplMap(langs);
25 return (AttributeMetadataImplMap) copyTo(copy);
26 }
27
28
29 /**
30 * Returns the {@link AttributeMetadataImpl} for a given {@link Name}. Never returns
31 * <code>null</code>, but rather creates a default {@link AttributeMetadataImpl} on the
32 * fly.
33 */
34 @Override
35 public AttributeMetadataImpl get(final Name name) {
36 final AttributeMetadataImpl AttributeMetadataImpl = super.get(name);
37 if (AttributeMetadataImpl == null && name != null
38 && !name.getLocalPart().trim().isEmpty()) {
39
40 put(name, new AttributeMetadataImpl(name, langs));
41
42 return super.get(name);
43 }
44 return AttributeMetadataImpl;
45 }
46
47
48 }

Properties

Name Value
svn:eol-style native
svn:keywords Id URL
svn:mime-type text/plain

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26