edu.harvard.hul.ois.mets
Class SmLink

java.lang.Object
  extended byedu.harvard.hul.ois.mets.helper.MetsElement
      extended byedu.harvard.hul.ois.mets.helper.MetsVElement
          extended byedu.harvard.hul.ois.mets.helper.MetsIDElement
              extended byedu.harvard.hul.ois.mets.SmLink
All Implemented Interfaces:
MetsIdentifiable, MetsSerializable, MetsValidatable

public class SmLink
extends MetsIDElement

This class encapsulates the <smLink> element. See <http://www.loc.gov/standards/mets/>.


Field Summary
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsIDElement
_ID
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsVElement
_valid
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsElement
_attrs, _content, _localName, _namespace, _qName, _schema
 
Constructor Summary
SmLink()
          Instantiate a new <smLink> object.
 
Method Summary
 java.util.Map getFrom()
          Return map of IDREF of "from" attribute.
 java.util.Map getTo()
          Return map of IDREF of "to" attribute.
 Actuate getXlinkActuate()
          Return pre-defined XLink actuate attribute.
 java.lang.String getXlinkArcrole()
          Return XLink arcrole attribute.
 java.lang.String getXlinkFrom()
          Return pre-defined XLink from attribute.
 Show getXlinkShow()
          Return pre-defined XLink show attribute.
 java.lang.String getXlinkTitle()
          Return XLink title attribute.
 java.lang.String getXlinkTo()
          Return pre-defined XLink to attribute.
 void read(MetsReader r)
          De-serialize the content of the file into this element using the given reader.
static SmLink reader(MetsReader r)
          Instantiate a SmLink object de-serialized from the input stream.
 void setFrom(java.lang.String from)
          Set IDREF of "from" attribute StructMap element.
 void setFrom(java.lang.String from, MetsIDElement element)
          Set IDREF of StructMap element, with referenced element.
 void setTo(java.lang.String to)
          Set IDREF of "to" attribute StructMap element.
 void setTo(java.lang.String to, MetsIDElement element)
          Set IDREF of StructMap element, with referenced element.
 void setXlinkActuate(Actuate actuate)
          Set pre-defined Xlink actuate behavior.
 void setXlinkArcrole(java.lang.String arcrole)
          Set Xlink arcrole attribute.
 void setXlinkFrom(java.lang.String from)
          Set pre-defined Xlink from attribute.
 void setXlinkShow(Show show)
          Set pre-defined Xlink show behavior.
 void setXlinkTitle(java.lang.String title)
          Set Xlink title attribute
 void setXlinkTo(java.lang.String to)
          Set pre-defined Xlink to attribute.
 void validateThis(MetsValidator v)
          Validate this element and its content model using the given validator.
 void validateThisIDREFs(MetsValidator v)
          Validate ID/IDREF consistency with the given validator.
 void write(MetsWriter w)
          Serialize the content model of this element using the given writer
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsIDElement
getID, setID
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsVElement
isValid, validate, validateIDREFs
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsElement
getContent, getLocalName, getNamespace, getQName, getSchemas, init, setSchema, setSchema, writeSchemas
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmLink

public SmLink()
Instantiate a new <smLink> object.

Method Detail

getFrom

public java.util.Map getFrom()
Return map of IDREF of "from" attribute.

Returns:
From attribute

getTo

public java.util.Map getTo()
Return map of IDREF of "to" attribute.

Returns:
Map

getXlinkActuate

public Actuate getXlinkActuate()
Return pre-defined XLink actuate attribute.

Returns:
Actuate

getXlinkArcrole

public java.lang.String getXlinkArcrole()
Return XLink arcrole attribute.

Returns:
Arcrole

getXlinkShow

public Show getXlinkShow()
Return pre-defined XLink show attribute.

Returns:
Show

getXlinkFrom

public java.lang.String getXlinkFrom()
Return pre-defined XLink from attribute.

Returns:
From

getXlinkTitle

public java.lang.String getXlinkTitle()
Return XLink title attribute.

Returns:
Title

getXlinkTo

public java.lang.String getXlinkTo()
Return pre-defined XLink to attribute.

Returns:
To

setFrom

public void setFrom(java.lang.String from)
Set IDREF of "from" attribute StructMap element.

Parameters:
from - IDREF of element

setFrom

public void setFrom(java.lang.String from,
                    MetsIDElement element)
Set IDREF of StructMap element, with referenced element. The map is clear'ed first to ensure a single ID/IDREF pair.

Parameters:
from - IDREF of element
element - Element (or NULL)

setTo

public void setTo(java.lang.String to)
Set IDREF of "to" attribute StructMap element.

Parameters:
to - IDREF of element

setTo

public void setTo(java.lang.String to,
                  MetsIDElement element)
Set IDREF of StructMap element, with referenced element. The map is clear'ed first to ensure a single ID/IDREF pair.

Parameters:
to - IDREF of element
element - Element (or NULL)

setXlinkActuate

public void setXlinkActuate(Actuate actuate)
Set pre-defined Xlink actuate behavior.

Parameters:
actuate - Actuate behavior

setXlinkArcrole

public void setXlinkArcrole(java.lang.String arcrole)
Set Xlink arcrole attribute.

Parameters:
arcrole - Arcrole

setXlinkFrom

public void setXlinkFrom(java.lang.String from)
Set pre-defined Xlink from attribute.

Parameters:
from - From

setXlinkShow

public void setXlinkShow(Show show)
Set pre-defined Xlink show behavior.

Parameters:
show - Show behavior

setXlinkTitle

public void setXlinkTitle(java.lang.String title)
Set Xlink title attribute

Parameters:
title - Title

setXlinkTo

public void setXlinkTo(java.lang.String to)
Set pre-defined Xlink to attribute.

Parameters:
to - To

reader

public static SmLink reader(MetsReader r)
                     throws MetsException
Instantiate a SmLink object de-serialized from the input stream.

Parameters:
r - Reader
Returns:
SmLink object
Throws:
MetsException - De-serializing exception

read

public void read(MetsReader r)
          throws MetsException
De-serialize the content of the file into this element using the given reader.

Specified by:
read in interface MetsSerializable
Specified by:
read in class MetsElement
Parameters:
r - Reader
Throws:
MetsException

write

public void write(MetsWriter w)
           throws MetsException
Serialize the content model of this element using the given writer

Specified by:
write in interface MetsSerializable
Specified by:
write in class MetsElement
Parameters:
w - Writer
Throws:
MetsException

validateThis

public void validateThis(MetsValidator v)
                  throws MetsException
Validate this element and its content model using the given validator.

Specified by:
validateThis in interface MetsValidatable
Overrides:
validateThis in class MetsVElement
Parameters:
v - Validator
Throws:
MetsException - Validation exception

validateThisIDREFs

public void validateThisIDREFs(MetsValidator v)
                        throws MetsException
Validate ID/IDREF consistency with the given validator.

Overrides:
validateThisIDREFs in class MetsVElement
Parameters:
v - Validator
Throws:
MetsException - Validation exception