Class MetadataBean


  • @Named
    @RequestScoped
    public class MetadataBean
    extends Object
    Provides the metadata for the current structure and event elements.
    • Constructor Detail

      • MetadataBean

        public MetadataBean()
        Empty constructor.
    • Method Detail

      • setActiveDocumentBean

        public void setActiveDocumentBean​(ActiveDocumentBean activeDocumentBean)
        Required setter for ManagedProperty injection
        Parameters:
        activeDocumentBean - the activeDocumentBean to set
      • getMetadataElementList

        public List<MetadataElement> getMetadataElementList​(int index)

        Getter for the field metadataElementList.

        Parameters:
        index -
        Returns:
        the metadataElementList
      • getAllMetadataElementsForPage

        @Deprecated
        public List<MetadataElement> getAllMetadataElementsForPage​(int index,
                                                                   int order)
                                                            throws IndexUnreachableException,
                                                                   DAOException
        Deprecated.
        Returns a list of MetadataElements for all structure elements contained on the given page (as opposed to just the immediate hierarchy down to the first element that BEGINS on the current page, such as returned by getMetadataElementList.
        Parameters:
        index - Metadata view index
        order - Page number
        Returns:
        List of MetadataElements for all structure elements contained on the given page
        Throws:
        IndexUnreachableException
        DAOException
      • getTopMetadataElement

        public MetadataElement getTopMetadataElement​(int index)

        getTopMetadataElement.

        Parameters:
        index - Metadata view index
        Returns:
        a MetadataElement object.
      • getBottomMetadataElement

        public MetadataElement getBottomMetadataElement​(int index)
        Returns the last element in metadataElementList, which is the bottom element in the hierarchy. If the element contains no side bar metadata, the next higher element is checked until an element with sidebar metadata is found. TODO for some reason this method is called 6-15 times per page
        Parameters:
        index - Metadata view index
        Returns:
        a MetadataElement object.
      • getDefaultMetadataLabel

        public String getDefaultMetadataLabel()
        Convenience method for the metadata page/link label key, depending on the document type.
        Returns:
        Message key for the label
      • getDefaultSidebarMetadataLabel

        public String getDefaultSidebarMetadataLabel()
        Convenience method for the sidebar metadata widget label key, depending on the document type.
        Returns:
        Message key for the label
      • getEvents

        public List<EventElement> getEvents()

        Getter for the field events.

        Returns:
        the events
      • setEvents

        public void setEvents​(List<EventElement> events)

        Setter for the field events.

        Parameters:
        events - the events to set
      • displayChildStructs

        public boolean displayChildStructs()

        displayChildStructs.

        Returns:
        a boolean.
      • setSelectedRecordLanguage

        public void setSelectedRecordLanguage​(String selectedRecordLanguage)

        setSelectedRecordLanguage.

        Parameters:
        selectedRecordLanguage - a String object.
      • getMetadataViews

        public List<MetadataView> getMetadataViews()
        Returns:
        List of available MetadataViews
      • getMetadataViewUrl

        public String getMetadataViewUrl()
        Returns:
        the metadataViewUrl
      • setMetadataViewUrl

        public void setMetadataViewUrl​(String metadataViewUrl)
        Parameters:
        metadataViewUrl - the metadataViewUrl to set
      • getActiveMetadataView

        public MetadataView getActiveMetadataView()
        Returns:
        the activeMetadataView
      • setActiveMetadataView

        public void setActiveMetadataView​(MetadataView activeMetadataView)
        Parameters:
        activeMetadataView - the activeMetadataView to set