public class SetInfo
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable
RepositoryManager
to hold information about a set of metadata files.
Note that as of jOAI v3.x (Feb 2006), this class is no longer used to define OAI sets but is now only used
to define the files that are configured in the RepositoryManager
. OAI sets are now defined
separately.DirInfo
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
SetInfo.FormatComparator
Implements Comparator to enable sorting by format.
|
static class |
SetInfo.NameComparator
Implements Comparator to enable sorting by name.
|
static class |
SetInfo.NumDeletedComparator
Implements Comparator to enable sorting by numDeleted.
|
static class |
SetInfo.NumFilesComparator
Implements Comparator to enable sorting by numFiles.
|
static class |
SetInfo.NumIndexedComparator
Implements Comparator to enable sorting by numIndexed.
|
static class |
SetInfo.NumIndexingErrorsComparator
Implements Comparator to enable sorting by numIndexingErrors.
|
static class |
SetInfo.SetSpecComparator
Implements Comparator to enable sorting by setSpec.
|
static class |
SetInfo.StatusComparator
Implements Comparator to enable sorting by status.
|
Constructor and Description |
---|
SetInfo()
Constructor for the SetInfo object
|
SetInfo(java.lang.String name,
java.lang.String setSpec,
java.lang.String description,
java.lang.String enabled,
java.lang.String dir,
java.lang.String format,
java.lang.String id)
Constructor for the SetInfo object
|
Modifier and Type | Method and Description |
---|---|
void |
addDirInfo(java.lang.String format,
java.lang.String dir)
Adds a feature to the DirInfo attribute of the SetInfo object
|
int |
compareTo(java.lang.Object o)
Compares two SetInfos by the Set Name.
|
boolean |
containsDirectory(java.io.File directory)
Determines whether a directory is configured in this SetInfo.
|
boolean |
containsDirInfo(DirInfo dirInfo)
|
boolean |
equals(java.lang.Object o)
Checks equality of two SetInfo objects.
|
java.lang.String |
getAccessionStatus()
Gets the accession status of this Set.
|
java.lang.Object |
getAttribute(java.lang.String key)
Gets an attribute Object from this SetInfo.
|
static java.util.Comparator |
getComparator(java.lang.String type)
Gets the comparator attribute of the SetInfo class
|
java.lang.String |
getDescription()
Gets the XML description.
|
java.lang.String |
getDescriptionHtml()
Gets the descriptionHtml attribute of the SetInfo object
|
java.lang.String |
getDirectory()
Gets the primary directory path configured for this set, or an empty String if none is configured.
|
DirInfo |
getDirInfo(int i)
Gets the dirInfo attribute of the SetInfo object
|
java.util.ArrayList |
getDirInfos()
Gets the dirInfos attribute of the SetInfo object
|
java.lang.String |
getEnabled()
Gets the enabled status String [true | false].
|
java.lang.String |
getFormat()
Gets the metadata format of the files in the primary directory configured for this set, or an empty
String if none is configured.
|
java.lang.String |
getId()
Gets the record ID for this SetInfo.
|
java.lang.String |
getName()
Gets the name attribute of the SetInfo object
|
java.lang.String |
getNameEncoded()
Gets the name attribute of the SetInfo object, encoded for use in a URL.
|
java.lang.String |
getNumDeleted()
Gets the number of items deleted for this collection.
|
int |
getNumDeletedInt()
Gets the number of items deleted for this collection.
|
java.lang.String |
getNumFiles()
Gets the number of files for this collection.
|
int |
getNumFilesInt()
Gets the numFiles attribute of the SetInfo object
|
java.lang.String |
getNumIndexed()
Gets the number of items indexed for this collection.
|
int |
getNumIndexedInt()
Gets the number of items indexed for this collection.
|
java.lang.String |
getNumIndexingErrors()
Gets the number of indexing errors that were found for this collection.
|
int |
getNumIndexingErrorsInt()
Gets the number of indexing errors that were found for this collection.
|
java.lang.String |
getSetSpec()
Gets the setSpec attribute of the SetInfo object
|
java.lang.String |
getUniqueID()
Gets the unique ID for this SetInfo.
|
long |
getUniqueIDLong()
Gets the unique ID for this SetInfo.
|
boolean |
isEnabled()
Gets the enabled status boolean [true | false].
|
void |
removeDirInfo(int i)
DESCRIPTION
|
void |
setAccessionStatus(java.lang.String val)
Sets the accession status for this Set.
|
void |
setAttribute(java.lang.String key,
java.lang.Object attribute)
Sets an attribute Object that will be available for access using the given key.
|
void |
setDescription(java.lang.String val)
Sets the description, which must be in XML form.
|
void |
setDirInfo(int i,
DirInfo dirInfo)
Sets the dirInfo attribute of the SetInfo object
|
void |
setDirInfo(int i,
java.lang.String dir,
java.lang.String format)
Sets the dirInfo attribute of the SetInfo object
|
void |
setEnabled(java.lang.String val)
Sets the enabled status [true | false].
|
void |
setId(java.lang.String id)
Sets the record ID for this SetInfo.
|
void |
setName(java.lang.String val)
Sets the name attribute of the SetInfo object
|
void |
setSetInfoData(RepositoryManager rm)
Sets data in the SetInfo for display in the UI.
|
void |
setSetSpec(java.lang.String val)
Sets the setSpec attribute of the SetInfo object
|
java.lang.String |
toString()
Provides a String representataion for this SetInfo.
|
public SetInfo()
public SetInfo(java.lang.String name, java.lang.String setSpec, java.lang.String description, java.lang.String enabled, java.lang.String dir, java.lang.String format, java.lang.String id)
name
- The human-readable name of the setsetSpec
- The oai setSpec that will be used to reference this setdir
- A directory where files for this set are locatedformat
- The native metadata format for the files in the above directorydescription
- A description for this set, in XML form.enabled
- [true | false]id
- DESCRIPTIONpublic java.lang.String getName()
public java.lang.String getId()
public void setId(java.lang.String id)
id
- The record ID.public java.lang.String getUniqueID()
public long getUniqueIDLong()
public java.lang.String getNameEncoded()
public void setName(java.lang.String val)
val
- The new name valuepublic java.lang.String getSetSpec()
public void setSetSpec(java.lang.String val)
val
- The new setSpec valuepublic java.lang.String getDescription()
public java.lang.String getFormat()
public java.lang.String getDirectory()
public java.lang.String getDescriptionHtml()
public void setDescription(java.lang.String val)
val
- The new description valuepublic java.lang.String getEnabled()
public boolean isEnabled()
public void setEnabled(java.lang.String val)
val
- The String 'true' or 'false'.public java.util.ArrayList getDirInfos()
public DirInfo getDirInfo(int i)
i
- DESCRIPTIONpublic void setDirInfo(int i, DirInfo dirInfo)
i
- The new dirInfo valuedirInfo
- The new dirInfo valuepublic void setDirInfo(int i, java.lang.String dir, java.lang.String format)
i
- The new dirInfo valuedir
- The new dirInfo valueformat
- The new dirInfo valuepublic boolean containsDirInfo(DirInfo dirInfo)
public java.lang.String getNumFiles()
public int getNumFilesInt()
public void setSetInfoData(RepositoryManager rm)
rm
- The RepositoryManager whoes index contains the collections configured by this SetSpec.public java.lang.String getAccessionStatus()
public void setAccessionStatus(java.lang.String val)
val
- The accession status.public java.lang.String getNumIndexed()
public int getNumIndexedInt()
public java.lang.String getNumDeleted()
public int getNumDeletedInt()
public java.lang.String getNumIndexingErrors()
public int getNumIndexingErrorsInt()
public boolean containsDirectory(java.io.File directory)
directory
- A file directory.public void removeDirInfo(int i)
i
- DESCRIPTIONpublic void addDirInfo(java.lang.String format, java.lang.String dir)
format
- The feature to be added to the DirInfo attributedir
- The feature to be added to the DirInfo attributepublic void setAttribute(java.lang.String key, java.lang.Object attribute)
key
- The key used to reference the attribute.attribute
- Any Java Object that is Serializable.public java.lang.Object getAttribute(java.lang.String key)
key
- The key used to reference the attribute.public java.lang.String toString()
equals(Object)
method.toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The SetInfo to compare to thispublic int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- The SetInfo to comparejava.lang.ClassCastException
- If the object passed in is not a SetInfo.public static java.util.Comparator getComparator(java.lang.String type)
type
- The comparator type, for example 'key'