|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.sort.SortOption
public class SortOption
Class to mediate with the sort configuration
| Field Summary | |
|---|---|
static String |
ASCENDING
|
static String |
DESCENDING
|
| Constructor Summary | |
|---|---|
SortOption(int number,
String definition)
Construct a new SortOption object using the definition from the configuration |
|
SortOption(int number,
String name,
String md,
String type)
Construct a new SortOption object with the given parameters |
|
| Method Summary | |
|---|---|
static SortOption |
getDefaultSortOption()
Get the default sort option - initially, just the first one defined. |
String[] |
getMdBits()
|
String |
getMetadata()
|
String |
getName()
|
int |
getNumber()
|
static SortOption |
getSortOption(int number)
Get the defined sort option by number (.1, .2, etc). |
static Set<SortOption> |
getSortOptions()
Return all the configured sort options. |
String |
getType()
|
String[] |
interpretField(String mfield,
String init)
Take a string representation of a metadata field, and return it as an array. |
boolean |
isDate()
Is this a date field? |
boolean |
isDefault()
Is the default sort option? |
boolean |
isVisible()
Should this sort option be made visible in the UI |
void |
setMetadata(String metadata)
|
void |
setName(String name)
|
void |
setNumber(int number)
|
void |
setType(String type)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ASCENDING
public static final String DESCENDING
| Constructor Detail |
|---|
public SortOption(int number,
String name,
String md,
String type)
throws SortException
number - name - md - type -
SortException
public SortOption(int number,
String definition)
throws SortException
number - definition -
SortException| Method Detail |
|---|
public String getMetadata()
public void setMetadata(String metadata)
metadata - The metadata to set.public String getName()
public void setName(String name)
name - The name to set.public String getType()
public void setType(String type)
type - The type to set.public int getNumber()
public void setNumber(int number)
number - The number to set.public boolean isVisible()
public String[] getMdBits()
public final String[] interpretField(String mfield,
String init)
throws IOException
mfield - the string representation of the metadatainit - the default value of the array elements
IOExceptionpublic boolean isDate()
public boolean isDefault()
public static Set<SortOption> getSortOptions()
throws SortException
SortException
public static SortOption getSortOption(int number)
throws SortException
number -
SortException
public static SortOption getDefaultSortOption()
throws SortException
SortException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||