|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectskrueger.AttributeMetadata
public class AttributeMetadata
This class holds meta information about an attribute/column. This information
is used by StyledLayerInterface
and many others.
Field Summary | |
---|---|
protected Translation |
desc
Translation of the attribute's description |
protected Double |
functionA
For numerical attributes the value can be transformed by VALUE*X+A when presented on screen. |
protected Double |
functionX
For numerical attributes the value can be transformed by VALUE*X+A when presented on screen. |
protected HashSet<Object> |
nodataValues
Allows to define general NODATA values for an attribute. e.g. -9999 can be set and will always be interpreted as NULL internally and will usually be ignored. |
protected Translation |
title
Translation of the attribute's title |
protected String |
unit
The unit append to all visualizations of values of this attribute (is not null) |
protected boolean |
visible
Is the attribute visible to the user or ignored where possible |
protected int |
weight
When listed, the attributes are listed according to their weight
(heavier => further down) |
Constructor Summary | |
---|---|
AttributeMetadata(AttributeDescriptor attDesc,
int weight,
List<String> langs)
|
|
AttributeMetadata(AttributeDescriptor attDesc,
List<String> langs)
|
|
AttributeMetadata(Name name,
Boolean visible,
String unit)
Creates an AttributeMetadata object with the following
information |
|
AttributeMetadata(Name name,
Boolean visible,
Translation title,
Translation desc,
String unit)
Creates an AttributeMetadata object with the following
information |
|
AttributeMetadata(Name name,
List<String> langs)
Creates a new visible AttributeMetadata |
|
AttributeMetadata(Name name,
String defaultTitle,
List<String> langs)
Creates a new visible AttributeMetadata |
Method Summary | |
---|---|
void |
addNodataValue(Object nodataValue)
|
int |
compareTo(AttributeMetadata atm2)
Orders the attributes according to their weight . |
AttributeMetadata |
copy()
Creates a new instance of T and copies all values. |
AttributeMetadata |
copyTo(AttributeMetadata amd)
Deep copy this object to the target object. |
Object |
fiterNodata(Object value)
Takes any value object and checks it against the NODATA values. |
static String |
formatNoDataValues(Set<Object> list)
|
Translation |
getDesc()
|
Double |
getFunctionA()
|
Double |
getFunctionX()
|
String |
getLocalName()
The local name. |
Name |
getName()
The fully qualified Name of the attribute, e.g. |
HashSet<Object> |
getNodataValues()
|
String |
getNoDataValuesFormatted()
|
double |
getQuality(List<String> languages)
|
Translation |
getTitle()
|
String |
getUnit()
|
int |
getWeight()
|
boolean |
isVisible()
Will the end-user see this attribute? |
void |
removeNodataValue(Object nodataValue)
|
void |
setDesc(Translation desc)
|
void |
setFunctionA(Double functionA)
|
void |
setFunctionX(Double functionX)
|
void |
setLocalName(String localName)
The fully qualified Name of the attribute, e.g. org.bla.plo:blub |
void |
setName(Name name)
The fully qualified Name of the attribute, e.g. |
void |
setTitle(Translation title)
|
void |
setUnit(String unit)
|
void |
setVisible(boolean visible)
|
void |
setVisible(Boolean visible)
Shall the end-user see this attribute? |
void |
setWeight(int weight)
|
String |
toString()
For nicer debugging |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Translation desc
protected Double functionA
protected Double functionX
protected HashSet<Object> nodataValues
protected Translation title
protected String unit
protected boolean visible
protected int weight
weight
(heavier => further down)
compareTo(AttributeMetadata)
Constructor Detail |
---|
public AttributeMetadata(AttributeDescriptor attDesc, int weight, List<String> langs)
public AttributeMetadata(AttributeDescriptor attDesc, List<String> langs)
public AttributeMetadata(Name name, Boolean visible, Translation title, Translation desc, String unit)
AttributeMetadata
object with the following
information
colIdx
- The column index of this attribute in the underlying
table/dbf/etc...visible
- Shall this attribute be displayed or hidden from the user?title
- Translation
for Namedesc
- Translation
for an attribute descriptionunit
- String
of the unit that the information is inpublic AttributeMetadata(Name name, Boolean visible, String unit)
AttributeMetadata
object with the following
information
colIdx
- The column index of this attribute in the underlying
table/dbf/etc...visible
- Shall this attribute be displayed or hidden from the user?unit
- String
of the unit that the information is inpublic AttributeMetadata(Name name, List<String> langs)
AttributeMetadata
public AttributeMetadata(Name name, String defaultTitle, List<String> langs)
AttributeMetadata
Method Detail |
---|
public int compareTo(AttributeMetadata atm2)
weight
. Heavier =>
further down.
compareTo
in interface Comparable<AttributeMetadata>
public AttributeMetadata copy()
Copyable
copy
in interface Copyable<AttributeMetadata>
inferface
public AttributeMetadata copyTo(AttributeMetadata amd)
Copyable
copyTo
in interface Copyable<AttributeMetadata>
inferface
public Translation getDesc()
public Double getFunctionA()
public Double getFunctionX()
public String getLocalName()
String
public Name getName()
Name
of the attribute, e.g.
org.bla.plo:blub
public HashSet<Object> getNodataValues()
public double getQuality(List<String> languages)
visible
, it will return 1.public Translation getTitle()
public String getUnit()
public int getWeight()
public boolean isVisible()
public void setDesc(Translation desc)
public void setFunctionA(Double functionA)
public void setFunctionX(Double functionX)
public void setLocalName(String localName)
public void setName(Name name)
Name
of the attribute, e.g.
org.bla.plo:blub
public void addNodataValue(Object nodataValue)
public void removeNodataValue(Object nodataValue)
public void setTitle(Translation title)
public void setUnit(String unit)
public void setVisible(boolean visible)
public void setVisible(Boolean visible)
visible
- public void setWeight(int weight)
public String toString()
toString
in class Object
public Object fiterNodata(Object value)
null
is returned. Otherwise the
same object is returned.
Note: This method is called often.
public String getNoDataValuesFormatted()
public static String formatNoDataValues(Set<Object> list)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |