/[schmitzm]/branches/2.3.KECK/src/skrueger/AttributeMetadataImpl.java
ViewVC logotype

Diff of /branches/2.3.KECK/src/skrueger/AttributeMetadataImpl.java

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

trunk/src/skrueger/AttributeMetadataImpl.java revision 769 by alfonx, Sun Mar 21 11:02:34 2010 UTC branches/2.3-KECK/src/skrueger/AttributeMetadataImpl.java revision 1102 by alfonx, Thu Oct 14 09:44:10 2010 UTC
# Line 25  Line 25 
25   *   *
26   * Contributors:   * Contributors:
27   *     Martin O. J. Schmitz - initial API and implementation   *     Martin O. J. Schmitz - initial API and implementation
28   *     Stefan A. Krüger - additional utility classes   *     Stefan A. Tzeggai - additional utility classes
29   ******************************************************************************/   ******************************************************************************/
30  package skrueger;  package skrueger;
31    
# Line 46  import skrueger.i8n.Translation; Line 46  import skrueger.i8n.Translation;
46   * This class holds meta information about an attribute/column. This information   * This class holds meta information about an attribute/column. This information
47   * is used by {@link StyledLayerInterface} and many others.<br/>   * is used by {@link StyledLayerInterface} and many others.<br/>
48   *   *
49   * @author <a href="mailto:[email protected]">Stefan Alfons Kr&uuml;ger</a>   * @author <a href="mailto:[email protected]">Stefan Alfons Tzeggai</a>
50   */   */
51  public class AttributeMetadataImpl extends AbstractAttributeMetadata implements  public class AttributeMetadataImpl extends AbstractAttributeMetadata implements
52                  QualityQuantizable {                  QualityQuantizable {
# Line 72  public class AttributeMetadataImpl exten Line 72  public class AttributeMetadataImpl exten
72    
73          public AttributeMetadataImpl(final AttributeDescriptor attDesc,          public AttributeMetadataImpl(final AttributeDescriptor attDesc,
74                          final int weight, final List<String> langs) {                          final int weight, final List<String> langs) {
75                  this(attDesc.getName(), langs);                  this( new NameImpl(attDesc.getName().getNamespaceURI(), attDesc.getName().getLocalPart()), langs);
76                  setWeight(weight);                  setWeight(weight);
77          }          }
78    
79          public AttributeMetadataImpl(final AttributeDescriptor attDesc,          public AttributeMetadataImpl(final AttributeDescriptor attDesc,
80                          final List<String> langs) {                          final List<String> langs) {
81                  this(attDesc.getName(), langs);                  this(new NameImpl(attDesc.getName().getNamespaceURI(), attDesc.getName().getLocalPart()), langs);
82          }          }
83    
84          /**          /**
# Line 185  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 194  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 202  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.769  
changed lines
  Added in v.1102

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26