org.dspace.app.xmlui.wing.element
Class RepositoryMeta

java.lang.Object
  extended by org.dspace.app.xmlui.wing.element.AbstractWingElement
      extended by org.dspace.app.xmlui.wing.element.RepositoryMeta
All Implemented Interfaces:
MetadataElement, WingElement, WingMergeableElement

public class RepositoryMeta
extends AbstractWingElement
implements WingMergeableElement, MetadataElement

A class representing a set of all referenced repositories in the DRI document.

Author:
Scott Phillips

Field Summary
static String A_REPOSITORY_ID
          The name of this repository identifier attribute
static String A_REPOSITORY_URL
          The unique url of this repository
static String E_REPOSITORY
          The name of the repository element
static String E_REPOSITORY_META
          The name of the ObjectMeta element
 
Fields inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
context
 
Fields inherited from interface org.dspace.app.xmlui.wing.element.MetadataElement
A_REPOSITORY_IDENTIFIER
 
Constructor Summary
protected RepositoryMeta(WingContext context)
          Construct a new RepositoryMeta
 
Method Summary
 Attributes merge(Attributes attributes)
          Inform this element that it is being merged with an existing element.
 WingMergeableElement mergeChild(String namespace, String localName, String qName, Attributes attributes)
          Since we will only add to the object set and never modify an existing object we do not merge any child elements.
 boolean mergeEqual(String namespace, String localName, String qName, Attributes attributes)
          Determine if the given SAX event is a ObjectMeta element.
 void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
          Translate this element into SAX events.
 
Methods inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
dispose, endElement, endElement, getWingContext, greater, lesser, require, require, requireFalse, requireTrue, restrict, sendCharacters, setWingContext, startElement, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.dspace.app.xmlui.wing.element.WingElement
dispose
 

Field Detail

E_REPOSITORY_META

public static final String E_REPOSITORY_META
The name of the ObjectMeta element

See Also:
Constant Field Values

E_REPOSITORY

public static final String E_REPOSITORY
The name of the repository element

See Also:
Constant Field Values

A_REPOSITORY_ID

public static final String A_REPOSITORY_ID
The name of this repository identifier attribute

See Also:
Constant Field Values

A_REPOSITORY_URL

public static final String A_REPOSITORY_URL
The unique url of this repository

See Also:
Constant Field Values
Constructor Detail

RepositoryMeta

protected RepositoryMeta(WingContext context)
                  throws WingException
Construct a new RepositoryMeta

Parameters:
context - (Required) The context this element is contained in, such as where to route SAX events and what i18n catalogue to use.
Throws:
WingException
Method Detail

mergeEqual

public boolean mergeEqual(String namespace,
                          String localName,
                          String qName,
                          Attributes attributes)
                   throws SAXException,
                          WingException
Determine if the given SAX event is a ObjectMeta element.

Specified by:
mergeEqual in interface WingMergeableElement
Parameters:
namespace - The element's name space
localName - The local, unqualified, name for this element
qName - The qualified name for this element
attributes - The element's attributes
Returns:
True if this WingElement is equivalent to the given SAX Event.
Throws:
SAXException
WingException

mergeChild

public WingMergeableElement mergeChild(String namespace,
                                       String localName,
                                       String qName,
                                       Attributes attributes)
                                throws SAXException,
                                       WingException
Since we will only add to the object set and never modify an existing object we do not merge any child elements. However we will notify the object manager of each identifier we encounter.

Specified by:
mergeChild in interface WingMergeableElement
Parameters:
namespace - The element's name space
localName - The local, unqualified, name for this element *
qName - The qualified name for this element
attributes - The element's attributes
Returns:
The child element
Throws:
SAXException
WingException

merge

public Attributes merge(Attributes attributes)
                 throws SAXException,
                        WingException
Inform this element that it is being merged with an existing element.

Specified by:
merge in interface WingMergeableElement
Returns:
The attributes for this merged element
Throws:
SAXException
WingException

toSAX

public void toSAX(ContentHandler contentHandler,
                  LexicalHandler lexicalHandler,
                  NamespaceSupport namespaces)
           throws SAXException
Translate this element into SAX events.

Specified by:
toSAX in interface WingElement
Parameters:
contentHandler - (Required) The registered contentHandler where SAX events should be routed too.
lexicalHandler - (Required) The registered lexicalHandler where lexical events (such as CDATA, DTD, etc) should be routed too.
namespaces - (Required) SAX Helper class to keep track of namespaces able to determine the correct prefix for a given namespace URI.
Throws:
SAXException


Copyright © 2012 DuraSpace. All Rights Reserved.