public class Sort
extends java.lang.Object
implements java.io.Serializable, java.lang.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 java.lang.String |
DATE_TYPE
dataType value for Date information.
|
static java.lang.String |
NUMBER_TYPE
DataType value for Number information.
|
static java.lang.String |
TEXT_TYPE
dataType value for Text information
|
| Constructor and Description |
|---|
Sort(org.jdom2.Namespace namespace,
java.lang.String element,
java.lang.String dataType,
java.lang.String label,
boolean defaultOrder) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDataType()
Returns the dataType of the sort
|
boolean |
getDefaultOrder()
Indicates this is the natural order of the feed.
|
java.lang.String |
getElement()
Name of the element.
|
java.lang.String |
getLabel()
User label for sorting.
|
org.jdom2.Namespace |
getNamespace()
Namespace of the element
|
int |
hashCode() |
java.lang.String |
toString() |
public static final java.lang.String DATE_TYPE
public static final java.lang.String TEXT_TYPE
public static final java.lang.String NUMBER_TYPE
public Sort(org.jdom2.Namespace namespace,
java.lang.String element,
java.lang.String dataType,
java.lang.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 java.lang.String getDataType()
public boolean getDefaultOrder()
public java.lang.String getElement()
public java.lang.String getLabel()
public org.jdom2.Namespace getNamespace()
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2025. All rights reserved.