/[schmitzm]/trunk/src/skrueger/AttributeMetadataImpl.java
ViewVC logotype

Diff of /trunk/src/skrueger/AttributeMetadataImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 770 by alfonx, Sun Mar 21 11:36:11 2010 UTC revision 797 by alfonx, Sat Apr 10 16:12:40 2010 UTC
# Line 35  import java.util.List; Line 35  import java.util.List;
35  import org.apache.log4j.Logger;  import org.apache.log4j.Logger;
36  import org.geotools.feature.NameImpl;  import org.geotools.feature.NameImpl;
37  import org.opengis.feature.type.AttributeDescriptor;  import org.opengis.feature.type.AttributeDescriptor;
38    import org.opengis.feature.type.Name;
39    
40  import skrueger.geotools.Copyable;  import skrueger.geotools.Copyable;
41  import skrueger.geotools.StyledLayerInterface;  import skrueger.geotools.StyledLayerInterface;
# Line 96  public class AttributeMetadataImpl exten Line 97  public class AttributeMetadataImpl exten
97           * @param unit           * @param unit
98           *            {@link String} of the unit that the information is in           *            {@link String} of the unit that the information is in
99           */           */
100          public AttributeMetadataImpl(final NameImpl name, final Boolean visible,          public AttributeMetadataImpl(final Name name, final Boolean visible,
101                          final Translation title, final Translation desc, final String unit) {                          final Translation title, final Translation desc, final String unit) {
102    
103                  this.setName(name);                  this.setName(name);
# Line 118  public class AttributeMetadataImpl exten Line 119  public class AttributeMetadataImpl exten
119           * @param unit           * @param unit
120           *            {@link String} of the unit that the information is in           *            {@link String} of the unit that the information is in
121           */           */
122          public AttributeMetadataImpl(final NameImpl name, final Boolean visible,          public AttributeMetadataImpl(final Name name, final Boolean visible,
123                          final String unit) {                          final String unit) {
124                  this.setName(name);                  this.setName(name);
125                  this.visible = visible;                  this.visible = visible;
# Line 128  public class AttributeMetadataImpl exten Line 129  public class AttributeMetadataImpl exten
129          /**          /**
130           * Creates a new visible {@link AttributeMetadataImpl}           * Creates a new visible {@link AttributeMetadataImpl}
131           */           */
132          public AttributeMetadataImpl(final NameImpl name, final List<String> langs) {          public AttributeMetadataImpl(final Name name, final List<String> langs) {
133                  this(name, true, new Translation(langs, name.getLocalPart()),                  this(name, true, new Translation(langs, name.getLocalPart()),
134                                  new Translation(), "");                                  new Translation(), "");
135          }          }
# Line 136  public class AttributeMetadataImpl exten Line 137  public class AttributeMetadataImpl exten
137          /**          /**
138           * Creates a new visible {@link AttributeMetadataImpl}           * Creates a new visible {@link AttributeMetadataImpl}
139           */           */
140          public AttributeMetadataImpl(final NameImpl name, final String defaultTitle,          public AttributeMetadataImpl(final Name name, final String defaultTitle,
141                          final List<String> langs) {                          final List<String> langs) {
142                  this(name, true, new Translation(langs, defaultTitle),                  this(name, true, new Translation(langs, defaultTitle),
143                                  new Translation(), "");                                  new Translation(), "");
# Line 184  public class AttributeMetadataImpl exten Line 185  public class AttributeMetadataImpl exten
185           * further down.           * further down.
186           */           */
187          @Override          @Override
188          public int compareTo(final AttributeMetadata atm2) {          public int compareTo(final AttributeMetadataInterface atm2) {
189                  return new Integer(weight).compareTo(new Double(atm2.getWeight())                  return new Integer(weight).compareTo(new Double(atm2.getWeight())
190                                  .intValue());                                  .intValue());
191          }          }
# Line 193  public class AttributeMetadataImpl exten Line 194  public class AttributeMetadataImpl exten
194           * @see Copyable inferface           * @see Copyable inferface
195           */           */
196          @Override          @Override
197          public AttributeMetadata copy() {          public AttributeMetadataInterface copy() {
198                  return copyTo(new AttributeMetadataImpl());                  return copyTo(new AttributeMetadataImpl());
199          }          }
200    
# Line 201  public class AttributeMetadataImpl exten Line 202  public class AttributeMetadataImpl exten
202           * @see Copyable inferface           * @see Copyable inferface
203           */           */
204          @Override          @Override
205          public AttributeMetadata copyTo(final AttributeMetadata amd) {          public AttributeMetadataInterface copyTo(final AttributeMetadataInterface amd) {
206                  getTitle().copyTo(amd.getTitle());                  getTitle().copyTo(amd.getTitle());
207                  getDesc().copyTo(amd.getDesc());                  getDesc().copyTo(amd.getDesc());
208                  amd.setUnit(getUnit());                  amd.setUnit(getUnit());

Legend:
Removed from v.770  
changed lines
  Added in v.797

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26