|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.zuercher.gpx2map.source.MapSourcePropertyDescriptor
public class MapSourcePropertyDescriptor
MapSourcePropertyDescriptor describes a map source property.
Map source property names may only contain the letters, digits, and "-", "_", or ".".
Field Summary | |
---|---|
private List<MapSourcePropertyChoice> |
choices
Choices for this property. |
private String |
description
Property's description. |
private String |
displayName
Property's display name. |
private String |
name
Property name. |
private boolean |
required
Flag indicating whether property is required or not. |
Constructor Summary | |
---|---|
MapSourcePropertyDescriptor(String name,
String displayName,
String description,
boolean required)
Constructs a new MapSourcePropertyDescriptor without choices. |
|
MapSourcePropertyDescriptor(String name,
String displayName,
String description,
boolean required,
MapSourcePropertyChoice... choices)
Constructs a new MapSourcePropertyDescriptor without choices. |
Method Summary | |
---|---|
List<MapSourcePropertyChoice> |
getPropertyChoices()
Returns the property's choices. |
String |
getPropertyDescription()
Returns the property's description. |
String |
getPropertyDisplayName()
Returns the property's display name. |
String |
getPropertyName()
Returns the property name. |
boolean |
hasPropertyChoices()
Indicates whether this property has fixed choices or not. |
boolean |
isRequired()
Indicates whether this property is required or not. |
void |
set(MapSource mapSource,
String value)
Sets this property on the given map source with the given value. |
private void |
validateName(String name)
Validates that the given name is a legal property name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final String name
validateName(String)
.
private final String displayName
private final String description
private final boolean required
private final List<MapSourcePropertyChoice> choices
Constructor Detail |
---|
public MapSourcePropertyDescriptor(String name, String displayName, String description, boolean required) throws IllegalMapSourcePropertyNameException
name
- the property name.displayName
- the property's display namedescription
- the property's descriptionrequired
- flag indicating whether the property is required or not
IllegalMapSourcePropertyNameException
- if the property name
is illegalvalidateName(String)
public MapSourcePropertyDescriptor(String name, String displayName, String description, boolean required, MapSourcePropertyChoice... choices) throws IllegalMapSourcePropertyNameException
name
- the property name.displayName
- the property's display namedescription
- the property's descriptionrequired
- flag indicating whether the property is required or notchoices
- list of available choices for the value of this property
IllegalMapSourcePropertyNameException
- if the property name
is illegalvalidateName(String)
Method Detail |
---|
public String getPropertyName()
public String getPropertyDisplayName()
public String getPropertyDescription()
public boolean isRequired()
public boolean hasPropertyChoices()
getPropertyChoices()
will return a
non-null, non-empty list of choices.
public List<MapSourcePropertyChoice> getPropertyChoices()
hasPropertyChoices()
returns false, this method may return null or an empty list.
public void set(MapSource mapSource, String value)
mapSource
- the map source to set the value onvalue
- the property value to set
NullPointerException
- if value is nullprivate void validateName(String name) throws IllegalMapSourcePropertyNameException
Character.isLetterOrDigit(char)
.
name
- property name
IllegalMapSourcePropertyNameException
- if the name is not legal
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |