|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.purl.sword.base.XmlElement
org.purl.sword.base.Collection
public class Collection
A representation of a SWORD Collection.
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_HREF
Label for the Href attribute. |
static String |
ELEMENT_NAME
Deprecated. |
| Fields inherited from class org.purl.sword.base.XmlElement |
|---|
DATE_FORMAT, DATE_FORMATS, xmlName |
| Constructor Summary | |
|---|---|
Collection()
Create a new instance. |
|
Collection(String location)
Create a new instance and set the initial location for the collection. |
|
| Method Summary | |
|---|---|
void |
addAcceptPackaging(String acceptPackaging)
Add an acceptPackaging format. |
void |
addAcceptPackaging(String acceptPackaging,
float qualityValue)
Add an acceptPackaging format. |
void |
addAccepts(String accepts)
Add an accepts entry. |
void |
clearAcceptPackaging()
Remove all of the accepted packaging formats associated with this Collection. |
void |
clearAccepts()
Remove all of the accepts associated with this Collection. |
static XmlName |
elementName()
|
String |
getAbstract()
Get the DC Term abstract. |
List<Accept> |
getAcceptList()
|
List<SwordAcceptPackaging> |
getAcceptPackaging()
Retrieve a hashtable that holds all the acceptsPackaging details. |
String[] |
getAccepts()
Retrieve an array that holds all of the Accept details. |
List<String> |
getAcceptsList()
Deprecated. |
String |
getCollectionPolicy()
Get the collection policy. |
String |
getLocation()
Get the location. |
boolean |
getMediation()
Get the mediation value. |
String |
getService()
Get the sword service. |
String |
getTitle()
Get the title. |
String |
getTreatment()
Get the treatment value. |
protected void |
initialise()
|
boolean |
isMediationSet()
|
nu.xom.Element |
marshall()
Marshall the data in this object to an Element object. |
void |
setAbstract(String abstractString)
Set the abstract. |
void |
setCollectionPolicy(String collectionPolicy)
Set the collection policy. |
void |
setLocation(String location)
Set the location. |
void |
setMediation(boolean mediation)
Set the mediation value. |
void |
setService(String serviceString)
Set the sword service. |
void |
setTitle(String title)
Set the title. |
void |
setTreatment(String treatment)
Set the treatment. |
String |
toString()
Get a string representation of this object. |
void |
unmarshall(nu.xom.Element collection)
Unmarshall the content element into the data in this object. |
SwordValidationInfo |
unmarshall(nu.xom.Element collection,
Properties validationProperties)
|
protected SwordValidationInfo |
validate(ArrayList<SwordValidationInfo> existing,
ArrayList<SwordValidationInfo> attributes,
Properties validationContext)
|
SwordValidationInfo |
validate(Properties validationContext)
|
| Methods inherited from class org.purl.sword.base.XmlElement |
|---|
createValidAttributeInfo, getQualifiedName, getQualifiedName, getQualifiedNameWithPrefix, getXmlName, handleIncorrectElement, isInstanceOf, isInstanceOf, processUnexpectedAttributes, processUnexpectedAttributes, unmarshallBoolean, unmarshallInteger, unmarshallString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTRIBUTE_HREF
@Deprecated public static final String ELEMENT_NAME
| Constructor Detail |
|---|
public Collection()
public Collection(String location)
location - The initial location, expressed as a URL.| Method Detail |
|---|
public static XmlName elementName()
protected void initialise()
public String[] getAccepts()
@Deprecated public List<String> getAcceptsList()
public List<Accept> getAcceptList()
public void addAccepts(String accepts)
accepts - The accepts value.public void clearAccepts()
public List<SwordAcceptPackaging> getAcceptPackaging()
public void addAcceptPackaging(String acceptPackaging,
float qualityValue)
acceptPackaging - the packaging format.qualityValue - the quality value of accepted packaging format.public void addAcceptPackaging(String acceptPackaging)
acceptPackaging - the packaging format.public void clearAcceptPackaging()
public String getCollectionPolicy()
public void setCollectionPolicy(String collectionPolicy)
collectionPolicy - The collection policy.public String getLocation()
public void setLocation(String location)
location - The location.public boolean getMediation()
public boolean isMediationSet()
public void setMediation(boolean mediation)
mediation - The mediation value.public String getAbstract()
public void setAbstract(String abstractString)
abstractString - The abstract.public String getService()
public void setService(String serviceString)
serviceString - The service.public void setTitle(String title)
title - The title.public String getTitle()
null if no title has been set.public String getTreatment()
public void setTreatment(String treatment)
treatment - The treatment.public String toString()
toString in class Objectpublic nu.xom.Element marshall()
marshall in interface SwordElementInterface
public void unmarshall(nu.xom.Element collection)
throws UnmarshallException
unmarshall in interface SwordElementInterfacecollection - The data to unmarshall.
UnmarshallException - If the element does not contain a
content element or if there are problems
accessing the data.
public SwordValidationInfo unmarshall(nu.xom.Element collection,
Properties validationProperties)
throws UnmarshallException
UnmarshallExceptionpublic SwordValidationInfo validate(Properties validationContext)
validate in class XmlElement
protected SwordValidationInfo validate(ArrayList<SwordValidationInfo> existing,
ArrayList<SwordValidationInfo> attributes,
Properties validationContext)
existing -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||