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; |
|
import org.opengis.feature.type.Name; |
|
38 |
|
|
39 |
import skrueger.geotools.Copyable; |
import skrueger.geotools.Copyable; |
40 |
import skrueger.geotools.StyledLayerInterface; |
import skrueger.geotools.StyledLayerInterface; |
71 |
|
|
72 |
public AttributeMetadataImpl(final AttributeDescriptor attDesc, |
public AttributeMetadataImpl(final AttributeDescriptor attDesc, |
73 |
final int weight, final List<String> langs) { |
final int weight, final List<String> langs) { |
74 |
this(attDesc.getName(), langs); |
this( new NameImpl(attDesc.getName().getNamespaceURI(), attDesc.getName().getLocalPart()), langs); |
75 |
setWeight(weight); |
setWeight(weight); |
76 |
} |
} |
77 |
|
|
78 |
public AttributeMetadataImpl(final AttributeDescriptor attDesc, |
public AttributeMetadataImpl(final AttributeDescriptor attDesc, |
79 |
final List<String> langs) { |
final List<String> langs) { |
80 |
this(attDesc.getName(), langs); |
this(new NameImpl(attDesc.getName().getNamespaceURI(), attDesc.getName().getLocalPart()), langs); |
81 |
} |
} |
82 |
|
|
83 |
/** |
/** |
96 |
* @param unit |
* @param unit |
97 |
* {@link String} of the unit that the information is in |
* {@link String} of the unit that the information is in |
98 |
*/ |
*/ |
99 |
public AttributeMetadataImpl(final Name name, final Boolean visible, |
public AttributeMetadataImpl(final NameImpl name, final Boolean visible, |
100 |
final Translation title, final Translation desc, final String unit) { |
final Translation title, final Translation desc, final String unit) { |
101 |
|
|
102 |
this.setName(name); |
this.setName(name); |
118 |
* @param unit |
* @param unit |
119 |
* {@link String} of the unit that the information is in |
* {@link String} of the unit that the information is in |
120 |
*/ |
*/ |
121 |
public AttributeMetadataImpl(final Name name, final Boolean visible, |
public AttributeMetadataImpl(final NameImpl name, final Boolean visible, |
122 |
final String unit) { |
final String unit) { |
123 |
this.setName(name); |
this.setName(name); |
124 |
this.visible = visible; |
this.visible = visible; |
128 |
/** |
/** |
129 |
* Creates a new visible {@link AttributeMetadataImpl} |
* Creates a new visible {@link AttributeMetadataImpl} |
130 |
*/ |
*/ |
131 |
public AttributeMetadataImpl(final Name name, final List<String> langs) { |
public AttributeMetadataImpl(final NameImpl name, final List<String> langs) { |
132 |
this(name, true, new Translation(langs, name.getLocalPart()), |
this(name, true, new Translation(langs, name.getLocalPart()), |
133 |
new Translation(), ""); |
new Translation(), ""); |
134 |
} |
} |
136 |
/** |
/** |
137 |
* Creates a new visible {@link AttributeMetadataImpl} |
* Creates a new visible {@link AttributeMetadataImpl} |
138 |
*/ |
*/ |
139 |
public AttributeMetadataImpl(final Name name, final String defaultTitle, |
public AttributeMetadataImpl(final NameImpl name, final String defaultTitle, |
140 |
final List<String> langs) { |
final List<String> langs) { |
141 |
this(name, true, new Translation(langs, defaultTitle), |
this(name, true, new Translation(langs, defaultTitle), |
142 |
new Translation(), ""); |
new Translation(), ""); |