public class Property extends BaseEntity implements Comparable<Property>
values should be used and what they mean.
Some properties are not mandatory and may not always contain values.
For example: information concerning features of a television may not be
applicable to a mobile phone. The isMandatory data member should be
checked before assuming a value will be returned.
Properties can return none, one or many values. The isList data
member should be referred to to determine the number of values to expect.
Properties where IsList is false will only return up to one value.
The property also provides metadata about the intended use of the property.
The description can be used by UI developers to provide more information
about the intended use of the property and it's values.
The getCategory() method can be used to group together related
properties in configuration UIs.
The Value results are returned as a set of Values that
provide various utility methods.
Objects of this class should not be created directly as they are part of the
internal logic. Use the relevant Dataset method to access these
objects.
For more information see: 51Degrees pattern data model.
| Modifier and Type | Class and Description |
|---|---|
static class |
Property.PropertyValueType
Enumeration of strongly typed property values which could be returned.
|
| Modifier and Type | Field and Description |
|---|---|
byte |
displayOrder
The order in which the property should appear in relation to others with
a position value set when used to create a display string for the profile
it is contained within.
|
boolean |
isList
True if the property might have more than one value.
|
boolean |
isMandatory
True if the property must contain values.
|
boolean |
isObsolete
True if the property is marked as obsolete and will be removed from a
future version of the data set.
|
boolean |
show
True if the property is relevant to be shown in a configuration user
interface where the property may appear in a list of options.
|
boolean |
showValues
True if the values the property returns are relevant to configuration
user interfaces and are suitable to be selected from a list of table of
options.
|
Property.PropertyValueType |
valueType
The strongly type data type the property returns.
|
dataSet, index| Constructor and Description |
|---|
Property(Dataset dataSet,
int index,
BinaryReader reader)
Constructs a new instance of Property
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Property other)
Compares this property to another using the index field if they're in the
same list, otherwise the name field.
|
String |
getCategory()
The category the property relates to within the data set.
|
Component |
getComponent()
The component the property relates to.
|
Value |
getDefaultValue()
The value the property returns if a strongly type value is not available.
|
String |
getDescription()
A description of the property suitable to be displayed to end users via a
user interface.
|
String |
getJavaScriptName()
The name of the property to use when adding to Javascript as a property
name.
|
int |
getLastIndexValue() |
String[] |
getMaps() |
String |
getName()
The name of the property.
|
URL |
getUrl()
A URL to more information about the property.
|
Values |
getValues()
An array of values the property has available.
|
void |
init()
Initialises the often used lists and references if storing of object
references is enabled.
|
String |
toString()
A string representation of the property.
|
compareTo, compareTo, getDataSet, getIndex, getIsNumeric, getNumber, readIntegerArraypublic final boolean isList
public final boolean isMandatory
public final boolean showValues
public final boolean show
public final boolean isObsolete
public final byte displayOrder
public final Property.PropertyValueType valueType
public Property(Dataset dataSet, int index, BinaryReader reader) throws IOException
dataSet - Dataset to construct from.index - property index.reader - BinaryReader to be used.IOException - if there was a problem accessing data file.public String[] getMaps() throws IOException
IOException - if there was a problem accessing data file.public String getJavaScriptName() throws IOException
IOException - if there was a problem accessing data file.public String getName() throws IOException
IOException - if there was a problem accessing data file.public Value getDefaultValue() throws IOException
Value the property returns if a strongly type value is
not available.IOException - if there was a problem accessing data file.public Component getComponent() throws IOException
IOException - if there was a problem accessing data file.public Values getValues() throws IOException
values the property has available.IOException - if there was a problem accessing data file.public String getDescription() throws IOException
IOException - if there was a problem accessing data file.public String getCategory() throws IOException
IOException - if there was a problem accessing data file.public URL getUrl() throws IOException
IOException - if there was a problem accessing data file.public int getLastIndexValue()
public void init()
throws IOException
This method should not be called as it is part of the internal logic.
IOException - if there was a problem accessing data file.public int compareTo(Property other)
compareTo in interface Comparable<Property>other - Property to be compared against.Copyright © 2015 51Degrees. All rights reserved.