public class Sort extends Object implements Serializable, Cloneable
The cf:sort
element is intended to inform the client that the property to which it
refers
is one that is “sortable” – that is, that the client should provide a user interface that allows
the
user to sort on that property.
The cf:sort
element can also be used to provide a label for the default sort that
appears
in the list (in this case, only the label attribute should be included).
The cf:sort
element contains the following attributes:
cf:sort
element
refers to the default sort order.cf:sort
element refers. If it is omitted, the client should use the value of the
"element" attribute as the human-readable name. The "label" attribute is required if the
"element" attribute is omitted.cf:sort
element refers.. It contains one of the following values: date,
number, text. If it is omitted, the default value is text.cf:sort
element refers is the default sort order in the list. The allowed values are
"true" and "false". If omitted, the default value is "false". The items in the list must
be already be sorted by the element – this is, the client should not expect to have to resort by
this field if it displaying content directly from the list. The client should respect only the
first instance of default="true" that it encounters.Modifier and Type | Field and Description |
---|---|
static String |
DATE_TYPE
dataType value for Date information.
|
static String |
NUMBER_TYPE
DataType value for Number information.
|
static String |
TEXT_TYPE
dataType value for Text information
|
Constructor and Description |
---|
Sort(org.jdom2.Namespace namespace,
String element,
String dataType,
String label,
boolean defaultOrder) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
equals(Object o) |
String |
getDataType()
Returns the dataType of the sort
|
boolean |
getDefaultOrder()
Indicates this is the natural order of the feed.
|
String |
getElement()
Name of the element.
|
String |
getLabel()
User label for sorting.
|
org.jdom2.Namespace |
getNamespace()
Namespace of the element
|
int |
hashCode() |
String |
toString() |
public static final String DATE_TYPE
public static final String TEXT_TYPE
public static final String NUMBER_TYPE
public Sort(org.jdom2.Namespace namespace, String element, String dataType, String label, boolean defaultOrder)
namespace
- Namespace of the elementelement
- Name of the elementdataType
- data-type of the elementlabel
- Label for the sortdefaultOrder
- indicates if this is the defaul order of the feed.public String getDataType()
public boolean getDefaultOrder()
public String getElement()
public String getLabel()
public org.jdom2.Namespace getNamespace()
Copyright © 2020. All rights reserved.