org.ceryle.ui
Class MetadataPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.ceryle.ui.MetadataPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class MetadataPanel
extends JPanel

Extends JPanel providing a panel for displaying and editing document metadata. This is embedded as a tab in the EditorPanel.

Note: the implementation currently is not finished, in that the grouped metadata fields that are subclasses of AbstractMetaField (CreatorField and ContributorField) are not yet fully functional, and only support one value of each, ignoring any additional values.

Version:
$Id: MetadataPanel.java,v 3.38 2007-06-20 01:28:18 altheim Exp $
Author:
Murray Altheim
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static boolean biblioVisible
          Ceryle property value determining the default visibility of bibliographic metadata.
protected  Color COLOR_MOD
           
protected  Color COLOR_NONMOD
           
static int CREATOR_MAX_COUNT
          The maximum number of creator fields permitted.
static String helpNid
          The node ID for the properties help.
static boolean metadataUtilVisible
          Ceryle property value determining the default visibility of the metadata utility.
static String PROPERTY_biblioVisible
          Ceryle property name determining the default visibility of bibliographic metadata.
static String PROPERTY_metadataUtilVisible
          Ceryle property name determining the default visibility of the metadata utility.
protected  int textColLen
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MetadataPanel(EditorPanel editor)
          Constructor for a metadata panel, provided a parent EditorPanel.
 
Method Summary
 void addReference(boolean isNewReference)
          Add a bibliographic reference as a URI to this document.
protected  void addToRefList(URI uri)
          Adds the URI to the bibliographic reference list.
 void clear()
          Clears all metadata fields and stored values.
 void forceRedraw()
          Force redraw of all MetadataPanel components.
 String getBiblioCID()
          Returns the ID of the current bibliographic reference Collection.
 String getCID()
          This returns the content of the Collection ID field, which may not be harmonized with the current selection in the DocumentView's Collection list.
 String getContributor()
          Returns the metadata contributor of the currently-displayed Node as a String.
 String getCreated()
          Returns the creation date of the currently-displayed Node as a String, null if no value is available.
 String getCreator()
          Returns the creator (author) information of the currently-displayed Node as a String.
 String getDescription()
          Returns the metadata description of the currently-displayed Node as a String.
 String getFormat()
          Returns the metadata format ("Content-Type", Internet Media Type, or MIME type) of the currently-displayed Node as a String.
 String getHarmonizedNid()
          Harmonizes the value of the Node ID field with the Node ID list, then checks to be sure that the result is a valid XML Name.
 String getIsMetadataReference()
          Returns the reference system identifier (location of the referenced document) of the currently-displayed Node as a String.
 String getModified()
          Returns the last modified date of the currently-displayed Node as a String, null if no value is available.
 String getNID()
          Returns the content of the Node ID field, checking to be sure that the result is a valid XML Name.
 String getReferences()
          Returns the DCTERMS.references (as XNode metadata properties) as a WS-delimited String of URIs, null if none are set.
 String getRevision()
          Returns the revision information of the currently-displayed Node as a String.
 String getSource()
          Returns the source system identifier (location of the document origin) of the currently-displayed Node as a String.
 String getSubject()
          Returns the subject (a list of subject keywords or phrases) of the currently-displayed Node as a String.
 String getSystemId()
          Returns the system identifier of the currently-displayed content as a String.
 int getTextLength()
          Returns the size of the editor's document text.
 String getTitle()
          Returns the title of the currently-displayed document as a String.
 TitlePanel getTitlePanel()
          Return the title panel.
 JPanel getTitlePanelWrapper()
          Return the title panel's wrapper (used to control visibility).
 boolean isInitialized()
          Returns true if the panel has been initialized.
 boolean isTitleVisible()
          Returns the current visibility of the title panel.
 boolean isValidateRoot()
          Overrides JPanel's method, returning true.
 void preloadStarterDocument()
          Preloads an empty document for the current MIME type if there is no existing content in the editor.
 String queryNodeId(String cid, String nid)
          Returns a valid Node ID value by querying the user with a dialog box, using the provided String nid as the default.
 String[] queryNodeId(String cid, String nid, boolean canSelectCID)
          Returns valid Collection and Node ID values by querying the user with a dialog box, using the provided String nid as the default.
 void referenceDoubleClicked(int index)
          Called when the reference list is double-clicked upon on index.
 void removeReference()
          Remove the selected bibliographic reference from this document.
 void setCID(String cid, boolean strict)
          Sets the content of the Collection ID field, checking to be sure that it is a valid XML Name if strict is true.
 void setContributor(String contributor)
          Sets the metadata contributor for the currently-displayed Node to the String contributor.
 void setCreated(String date)
          Sets the creation date for the currently-displayed Node to the String date.
 void setCreator(String creator)
          Sets the metadata creator for the currently-displayed Node to the String creator.
 void setDescription(String description)
          Sets the metadata description for the currently-displayed document to the String description.
protected  void setDirty()
          If the EditorPanel is available and is not already dirty, sets its dirty bit true.
 void setFormat()
          Forceably set the format to a user-selected value.
 void setFormat(String format)
          Sets the metadata format ("Content-Type") for the currently-displayed Node to the String format.
 void setIsMetadataReference(String systemId)
          Sets the reference system identifier (location of the referenced document) for the currently-displayed Node to the String systemId.
 void setModified(String date)
          Sets the last modified date for the currently-displayed Node to the String date.
 void setNID(String nid, boolean strict)
          Sets the content of the Node ID field, checking to be sure that it is a valid XML Name if strict is true.
protected  void setReferences(String s)
          Sets the DCTERMS.references (as XNode metadata properties) from the provided WS-delimited String.
 void setRevision(String rev)
          Sets the revision information for the currently-displayed Node to the String rev.
 void setRevisionEnabled(boolean enabled)
          Set the visibility of the revision popup button and the enabled state of the revision popup menu to the parameter.
 void setSource(String systemId)
          Sets the source system identifier (location of the document origin) for the currently-displayed Node to the String systemId.
 void setSubject(String subject)
          Sets the subject (a list of subject keywords or phrases) for the currently-displayed Node to the String subject.
 void setSystemId(String systemId)
          Sets the system identifier for the currently-displayed Node to the String systemId.
 void setTitle(String title)
          Sets the title for the currently-displayed document to the String title.
 void setTitleVisible(boolean visible)
          Sets the visibility of the title panel to the boolean visible.
 void setXID(XNodeID xid, boolean strict)
          Sets the content of the Collection and Node ID fields, checking to be sure that they are valid XML Names if strict is true.
 void sniff()
          Sets the media type, DC-based metadata, and the document title based on a sniff of the document contents.
 Sniffer sniffDCMI(Sniffer sniffer)
          Sets the metadata fields based on a sniff of this node's contents.
 Sniffer sniffMIME(Sniffer sniffer)
          Sets the media type (variously IMT or MIME) popup based on a sniff of this node's contents.
protected  Sniffer sniffTitle(Sniffer sniffer)
          Sniffs the document title with the optional Sniffer (will create and parse the document if not provided).
 void syncMetadata()
          If the document is XHTML, syncs up the metadata stored internally with the <meta> elements in the document.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

helpNid

public static String helpNid
The node ID for the properties help. Default is "properties".


PROPERTY_metadataUtilVisible

public static final String PROPERTY_metadataUtilVisible
Ceryle property name determining the default visibility of the metadata utility.

See Also:
Constant Field Values

metadataUtilVisible

public static boolean metadataUtilVisible
Ceryle property value determining the default visibility of the metadata utility.


PROPERTY_biblioVisible

public static final String PROPERTY_biblioVisible
Ceryle property name determining the default visibility of bibliographic metadata.

See Also:
Constant Field Values

biblioVisible

public static boolean biblioVisible
Ceryle property value determining the default visibility of bibliographic metadata.


CREATOR_MAX_COUNT

public static int CREATOR_MAX_COUNT
The maximum number of creator fields permitted.


COLOR_NONMOD

protected Color COLOR_NONMOD

COLOR_MOD

protected Color COLOR_MOD

textColLen

protected final int textColLen
See Also:
Constant Field Values
Constructor Detail

MetadataPanel

public MetadataPanel(EditorPanel editor)
Constructor for a metadata panel, provided a parent EditorPanel.

Method Detail

isInitialized

public boolean isInitialized()
Returns true if the panel has been initialized.


isTitleVisible

public boolean isTitleVisible()
Returns the current visibility of the title panel.


setTitleVisible

public void setTitleVisible(boolean visible)
Sets the visibility of the title panel to the boolean visible.


getTitlePanelWrapper

public JPanel getTitlePanelWrapper()
Return the title panel's wrapper (used to control visibility).


getTitlePanel

public TitlePanel getTitlePanel()
Return the title panel.


setDirty

protected void setDirty()
If the EditorPanel is available and is not already dirty, sets its dirty bit true. This should be used responsibly, generally only by embedded widgets.


forceRedraw

public void forceRedraw()
Force redraw of all MetadataPanel components.


isValidateRoot

public boolean isValidateRoot()
Overrides JPanel's method, returning true.

Overrides:
isValidateRoot in class JComponent

clear

public void clear()
Clears all metadata fields and stored values.


referenceDoubleClicked

public void referenceDoubleClicked(int index)
Called when the reference list is double-clicked upon on index.


getBiblioCID

public String getBiblioCID()
Returns the ID of the current bibliographic reference Collection.


addReference

public void addReference(boolean isNewReference)
Add a bibliographic reference as a URI to this document.

This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References.


addToRefList

protected void addToRefList(URI uri)
Adds the URI to the bibliographic reference list.

This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References.


removeReference

public void removeReference()
Remove the selected bibliographic reference from this document.

This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References.


getReferences

public String getReferences()
Returns the DCTERMS.references (as XNode metadata properties) as a WS-delimited String of URIs, null if none are set.

This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References. Note that the 's' in the term name is an indication of an active verb, not a plural noun.


setReferences

protected void setReferences(String s)
Sets the DCTERMS.references (as XNode metadata properties) from the provided WS-delimited String.

This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References. Note that the 's' in the term name is an indication of an active verb, not a plural noun.


setXID

public void setXID(XNodeID xid,
                   boolean strict)
            throws ProcessException
Sets the content of the Collection and Node ID fields, checking to be sure that they are valid XML Names if strict is true. See the notes for setCID(String,boolean) and setNID(String,boolean) for details (this method calls them both).

Throws:
ProcessException - if strict is true and the provided Strings are not both XML Names.

setCID

public void setCID(String cid,
                   boolean strict)
            throws ProcessException
Sets the content of the Collection ID field, checking to be sure that it is a valid XML Name if strict is true. If the String cid is null and strict is false, the field is set to an empty string.

Throws:
ProcessException - if strict is true and the provided String is not an XML Name.

getCID

public String getCID()
This returns the content of the Collection ID field, which may not be harmonized with the current selection in the DocumentView's Collection list. Returns null if the field is empty or the current value is not an XML Name.

Returns:
the content of the Collection ID field, null if empty.

setNID

public void setNID(String nid,
                   boolean strict)
            throws ProcessException
Sets the content of the Node ID field, checking to be sure that it is a valid XML Name if strict is true. If the String nid is null and strict is false, the field is set to an empty string.

Throws:
ProcessException - if strict is true and the provided String is not an XML Name.

getNID

public String getNID()
Returns the content of the Node ID field, checking to be sure that the result is a valid XML Name. If there is no selected node or the node name is invalid, returns null. Unlike getHarmonizedNid(), this does not harmonize the Node ID field with the Node list, and should only be used when the field value is desired (eg., when creating a new node).

Returns:
the content of the Node ID field.

getHarmonizedNid

public String getHarmonizedNid()
                        throws ProcessException
Harmonizes the value of the Node ID field with the Node ID list, then checks to be sure that the result is a valid XML Name. If there is no selected node or the node name is invalid, throws a ProcessException.

Returns:
the content of the Node ID field.
Throws:
ProcessException - if strict is true and the content is not an XML Name.

queryNodeId

public String queryNodeId(String cid,
                          String nid)
Returns a valid Node ID value by querying the user with a dialog box, using the provided String nid as the default. This method is identical to queryNodeId(String,String) except the Collection ID is read-only.


queryNodeId

public String[] queryNodeId(String cid,
                            String nid,
                            boolean canSelectCID)
Returns valid Collection and Node ID values by querying the user with a dialog box, using the provided String nid as the default. The Collection ID is provided for user context, and is editable when canSelectCID is true. If the Collection ID is not provided, the value from the current MetadataPanel will be used. Returns null if the user cancels or does not provide a valid ID value (an XML Name). The Collection ID is array index 0, the Node ID index 1.


setTitle

public void setTitle(String title)
Sets the title for the currently-displayed document to the String title. This is the "metadata" title of the document, not its system id. If title is null, the field is cleared. This is protected, as it should be set by its parent view, not directly.


getTitle

public String getTitle()
Returns the title of the currently-displayed document as a String. This will be whitespace-trimmed.


setCreated

public void setCreated(String date)
Sets the creation date for the currently-displayed Node to the String date. Setting to null clears the field.


getCreated

public String getCreated()
Returns the creation date of the currently-displayed Node as a String, null if no value is available.


setModified

public void setModified(String date)
Sets the last modified date for the currently-displayed Node to the String date. Setting to null clears the field.


getModified

public String getModified()
Returns the last modified date of the currently-displayed Node as a String, null if no value is available.


setRevision

public void setRevision(String rev)
Sets the revision information for the currently-displayed Node to the String rev. This is generally an int value that increments upon each save action. If a null value is supplied, writes "n/a".


getRevision

public String getRevision()
Returns the revision information of the currently-displayed Node as a String. If no revision information is available, returns null.


setCreator

public void setCreator(String creator)
Sets the metadata creator for the currently-displayed Node to the String creator. Clears the field if a null value is supplied.

See Also:
for details on processing

getCreator

public String getCreator()
Returns the creator (author) information of the currently-displayed Node as a String. If no creator information is available, returns null.

See Also:
for details on processing

setContributor

public void setContributor(String contributor)
Sets the metadata contributor for the currently-displayed Node to the String contributor. Clears the field if a null value is supplied.

This corresponds to Dublin Core Element Set 1.1 contributor.

See Also:
for details on processing

getContributor

public String getContributor()
Returns the metadata contributor of the currently-displayed Node as a String. Note that this method returns null if empty or composed of only whitepace.

This corresponds to Dublin Core Element Set 1.1 contributor.

See Also:
for details on processing

setFormat

public void setFormat()
Forceably set the format to a user-selected value. This displays a multiple selection dialog box.


setFormat

public void setFormat(String format)
Sets the metadata format ("Content-Type") for the currently-displayed Node to the String format. Setting to null clears the field.

This corresponds to Dublin Core Element Set 1.1 format.


preloadStarterDocument

public void preloadStarterDocument()
Preloads an empty document for the current MIME type if there is no existing content in the editor.

This isn't very sophisticated, just writing hardwired strings.


getFormat

public String getFormat()
Returns the metadata format ("Content-Type", Internet Media Type, or MIME type) of the currently-displayed Node as a String. Note that this method returns null if empty or composed of only whitepace.

This corresponds to Dublin Core Element Set 1.1 format.


setSubject

public void setSubject(String subject)
Sets the subject (a list of subject keywords or phrases) for the currently-displayed Node to the String subject. Setting to null clears the field.

This corresponds to Dublin Core Element Set 1.1 subject.


getSubject

public String getSubject()
Returns the subject (a list of subject keywords or phrases) of the currently-displayed Node as a String. Note that this method returns null if empty or composed of only whitepace.

This corresponds to Dublin Core Element Set 1.1 subject.


setDescription

public void setDescription(String description)
Sets the metadata description for the currently-displayed document to the String description. Setting to null clears the field.

This corresponds to Dublin Core Element Set 1.1 description.


getDescription

public String getDescription()
Returns the metadata description of the currently-displayed Node as a String. Note that this method returns null if empty or composed of only whitepace.

This corresponds to Dublin Core Element Set 1.1 description.


setSystemId

public void setSystemId(String systemId)
Sets the system identifier for the currently-displayed Node to the String systemId. Setting to null clears the field.

This corresponds to Dublin Core Element Set 1.1 Identifier.


getTextLength

public int getTextLength()
Returns the size of the editor's document text. This is a convenience method.


getSystemId

public String getSystemId()
Returns the system identifier of the currently-displayed content as a String. Note that this method returns null if empty or composed of only whitepace.

This corresponds to Dublin Core Element Set 1.1 Identifier.


setSource

public void setSource(String systemId)
Sets the source system identifier (location of the document origin) for the currently-displayed Node to the String systemId. Setting to null clears the field.

This corresponds to Dublin Core Element Set 1.1 Source.


getSource

public String getSource()
Returns the source system identifier (location of the document origin) of the currently-displayed Node as a String. Note that this method returns null if empty or composed of only whitepace.

This corresponds to Dublin Core Element Set 1.1 Source.


setIsMetadataReference

public void setIsMetadataReference(String systemId)
Sets the reference system identifier (location of the referenced document) for the currently-displayed Node to the String systemId. Setting to null clears the field.

This is a reference to a resource for which this is a metadata record.


getIsMetadataReference

public String getIsMetadataReference()
Returns the reference system identifier (location of the referenced document) of the currently-displayed Node as a String. Note that this method returns null if empty or composed of only whitepace.

This corresponds to Dublin Core Term References, previously Relation.References.


sniff

public void sniff()
Sets the media type, DC-based metadata, and the document title based on a sniff of the document contents.


sniffMIME

public Sniffer sniffMIME(Sniffer sniffer)
Sets the media type (variously IMT or MIME) popup based on a sniff of this node's contents.

Parameters:
sniffer - the optional Sniffer used to do the work
Returns:
the Sniffer used, which provides access to the sniffed document if XHTML

syncMetadata

public void syncMetadata()
If the document is XHTML, syncs up the metadata stored internally with the <meta> elements in the document.


sniffDCMI

public Sniffer sniffDCMI(Sniffer sniffer)
Sets the metadata fields based on a sniff of this node's contents. If the content type is XHTML, will also fill in various DC-based fields if they're empty, as well as the title if available (the <title> element overrides any DC.title value). This method encapsulates sniffMIME(Sniffer), so there's no point in calling both.

Parameters:
sniffer - the optional Sniffer used to do the work
Returns:
the Sniffer used, which provides access to the sniffed document if XHTML

sniffTitle

protected Sniffer sniffTitle(Sniffer sniffer)
Sniffs the document title with the optional Sniffer (will create and parse the document if not provided).

Parameters:
sniffer - the optional Sniffer used to do the work
Returns:
the Sniffer used, which provides access to the sniffed document if XHTML

setRevisionEnabled

public void setRevisionEnabled(boolean enabled)
Set the visibility of the revision popup button and the enabled state of the revision popup menu to the parameter.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.