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

java.lang.Object
  extended by org.dspace.app.xmlui.wing.element.AbstractWingElement
      extended by org.dspace.app.xmlui.wing.element.Reference
All Implemented Interfaces:
StructuralElement, WingElement

public class Reference
extends AbstractWingElement
implements StructuralElement

Reference a repository object that is referenced in the ObjectMeta portion of the DRI document. These are internal references distinct from the xref element which is used for extrenal references.

Author:
Scott Phillips

Field Summary
static String A_REPOSITORY_ID
          The name of the repositoryIdentifier attribute
static String A_TYPE
          An optional type of the referenced object.
static String A_URL
          The name of the objectIdentifier attribute
static String E_REFERENCE
          The name of the reference element
 
Fields inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
context
 
Fields inherited from interface org.dspace.app.xmlui.wing.element.StructuralElement
A_ID, A_NAME, A_RENDER
 
Constructor Summary
protected Reference(WingContext context, Object object)
          Construct a new object reference.
 
Method Summary
 ReferenceSet addReferenceSet(String type)
          Add a nested include set
 ReferenceSet addReferenceSet(String type, String orderBy)
          Add a nested reference set
 ReferenceSet addReferenceSet(String type, String orderBy, String render)
          Add a nested reference set.
 void dispose()
          dispose
 void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
          Translate this metadata inclusion set to SAX
 
Methods inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
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
 

Field Detail

E_REFERENCE

public static final String E_REFERENCE
The name of the reference element

See Also:
Constant Field Values

A_REPOSITORY_ID

public static final String A_REPOSITORY_ID
The name of the repositoryIdentifier attribute

See Also:
Constant Field Values

A_TYPE

public static final String A_TYPE
An optional type of the referenced object.

See Also:
Constant Field Values

A_URL

public static final String A_URL
The name of the objectIdentifier attribute

See Also:
Constant Field Values
Constructor Detail

Reference

protected Reference(WingContext context,
                    Object object)
             throws WingException
Construct a new object reference.

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

addReferenceSet

public ReferenceSet addReferenceSet(String type,
                                    String orderBy,
                                    String render)
                             throws WingException
Add a nested reference set.

Parameters:
type - (required) The reference type, see referenceSet.TYPES
orderBy - (May be null) A statement of ordering for reference sets.
render - (May be null) a rendering hint used to override the default display of the element.
Throws:
WingException

addReferenceSet

public ReferenceSet addReferenceSet(String type,
                                    String orderBy)
                             throws WingException
Add a nested reference set

Parameters:
type - (required) The reference type, see referenceSet.TYPES
orderBy - (May be null) A statement of ordering for reference sets.
Throws:
WingException

addReferenceSet

public ReferenceSet addReferenceSet(String type)
                             throws WingException
Add a nested include set

Parameters:
type - (required) The include type, see includeSet.TYPES
Throws:
WingException

toSAX

public void toSAX(ContentHandler contentHandler,
                  LexicalHandler lexicalHandler,
                  NamespaceSupport namespaces)
           throws SAXException
Translate this metadata inclusion set to SAX

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

dispose

public void dispose()
dispose

Specified by:
dispose in interface WingElement
Overrides:
dispose in class AbstractWingElement


Copyright © 2012 DuraSpace. All Rights Reserved.