|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfiftyone.mobile.detection.entities.BaseEntity
fiftyone.mobile.detection.entities.Property
public class Property
Encapsulates all the information about a property including how it's 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 property should be checked before assuming a value will be returned.
Properties can return none, one or many values. The IsList property 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 other information 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 Category property can be used to group together related properties in configuration UIs.
Values are returned in the type Values which includes utility methods to easily extract strongly typed values.
For more information see http://51degrees.mobi/Support/Documentation/Java
| Nested Class Summary | |
|---|---|
static class |
Property.PropertyValueType
Enumeration of strongly typed property values which could be returned. |
| Field Summary | |
|---|---|
private String |
category
|
private int |
categoryOffset
|
private Component |
component
|
private int |
componentIndex
|
private Value |
defaultValue
|
private int |
defaultValueIndex
|
private String |
description
|
private int |
descriptionOffset
|
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. |
int |
FirstMapIndex
|
(package private) int |
firstValueIndex
The index of the first value related to the property. |
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. |
private int |
lastValueIndex
|
int |
MapCount
|
private String |
name
|
private int |
nameOffset
|
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. |
private URL |
url
|
private int |
urlOffset
|
private Values |
values
|
Property.PropertyValueType |
valueType
The strongly type data type the property returns. |
| Constructor Summary | |
|---|---|
Property(Dataset dataSet,
int index,
BinaryReader reader)
Constructs a new instance of Property |
|
| Method Summary | |
|---|---|
int |
compareTo(Property other)
Compares this property to another using the index field if they're in the same list, otherwise the name field. |
private Values |
doGetValues()
Returns the values which reference the property by starting at the first value index and moving forward until a new property is found. |
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 |
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. |
| Methods inherited from class fiftyone.mobile.detection.entities.BaseEntity |
|---|
binarySearch, getDataSet, getIndex, readIntegerArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final boolean isList
public final boolean isMandatory
public final boolean showValues
public final boolean show
public final boolean isObsolete
public final byte displayOrder
final int firstValueIndex
private String name
private final int nameOffset
public final Property.PropertyValueType valueType
private Value defaultValue
private final int defaultValueIndex
private Component component
private final int componentIndex
private Values values
private String description
private final int descriptionOffset
private String category
private final int categoryOffset
private URL url
private final int urlOffset
private int lastValueIndex
public final int MapCount
public final int FirstMapIndex
| Constructor Detail |
|---|
public Property(Dataset dataSet,
int index,
BinaryReader reader)
throws IOException
dataSet - index - reader -
IOException| Method Detail |
|---|
public String getName()
throws IOException
IOException
public Value getDefaultValue()
throws IOException
IOException
public Component getComponent()
throws IOException
IOException
public Values getValues()
throws IOException
IOException
public String getDescription()
throws IOException
IOException
public String getCategory()
throws IOException
IOException
public URL getUrl()
throws IOException
IOException
public void init()
throws IOException
IOException
private Values doGetValues()
throws IOException
IOExceptionpublic int compareTo(Property other)
compareTo in interface Comparable<Property>other - The property to be compared against
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||