|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.ceryle.ui.MetadataPanel
public class MetadataPanel
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.
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static String helpNid
public static final String PROPERTY_metadataUtilVisible
public static boolean metadataUtilVisible
public static final String PROPERTY_biblioVisible
public static boolean biblioVisible
public static int CREATOR_MAX_COUNT
protected Color COLOR_NONMOD
protected Color COLOR_MOD
protected final int textColLen
| Constructor Detail |
|---|
public MetadataPanel(EditorPanel editor)
| Method Detail |
|---|
public boolean isInitialized()
public boolean isTitleVisible()
public void setTitleVisible(boolean visible)
public JPanel getTitlePanelWrapper()
public TitlePanel getTitlePanel()
protected void setDirty()
public void forceRedraw()
public boolean isValidateRoot()
isValidateRoot in class JComponentpublic void clear()
public void referenceDoubleClicked(int index)
public String getBiblioCID()
public void addReference(boolean isNewReference)
This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References.
protected void addToRefList(URI uri)
This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References.
public void removeReference()
This corresponds to Dublin Core Terms DCTERMS.references, previously Relation.References.
public String getReferences()
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.
protected void setReferences(String s)
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.
public void setXID(XNodeID xid,
boolean strict)
throws ProcessException
setCID(String,boolean) and
setNID(String,boolean) for details (this method calls
them both).
ProcessException - if strict is true and the provided Strings are not both XML Names.
public void setCID(String cid,
boolean strict)
throws ProcessException
ProcessException - if strict is true and the provided String is not an XML Name.public String getCID()
public void setNID(String nid,
boolean strict)
throws ProcessException
ProcessException - if strict is true and the provided String is not an XML Name.public String getNID()
public String getHarmonizedNid()
throws ProcessException
ProcessException - if strict is true and the content is not an XML Name.
public String queryNodeId(String cid,
String nid)
queryNodeId(String,String) except the Collection
ID is read-only.
public String[] queryNodeId(String cid,
String nid,
boolean canSelectCID)
public void setTitle(String title)
public String getTitle()
public void setCreated(String date)
public String getCreated()
public void setModified(String date)
public String getModified()
public void setRevision(String rev)
public String getRevision()
public void setCreator(String creator)
for details on processingpublic String getCreator()
for details on processingpublic void setContributor(String contributor)
This corresponds to Dublin Core Element Set 1.1 contributor.
for details on processingpublic String getContributor()
This corresponds to Dublin Core Element Set 1.1 contributor.
for details on processingpublic void setFormat()
public void setFormat(String format)