|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.ui.MetadataUtils
public class MetadataUtils
A class containing static methods used for processing and displaying
document metadata. This class is designed to work particularly with
the EditorPanel.
| Field Summary | |
|---|---|
static String |
CLASS_BIBREF
The default class attribute value indicating the bibliographic reference field. |
static String[] |
DCMI_NAMES
An array of Strings containing the DCMI element type names in the order in which they will appear in auto-generated metadata renditions. |
static boolean |
isDCMES11
Determines which RDF (DCMES) markup is produced. |
static String[] |
META_FORMATS
An array of metadata format identifiers: XHTML, HTML, RDF, XML (DCDot), RSS 1.0, Atom Feed, and Atom Entry. |
static boolean |
useSemicolonDelimiter
When true, semicolons within metadata values force separation into separate fields. |
| Constructor Summary | |
|---|---|
MetadataUtils()
|
|
| Method Summary | |
|---|---|
static void |
displayMetadata(EditorPanel editor,
String cid,
XNode xnode)
Updates the editor display of XNode metadata, such as ID, creation and modification date, etc., provided with the Collection ID cid and the XNode. |
void |
generateAtomEntry()
Generate an Atom <entry> from the available metadata. |
void |
generateAtomFeed()
Generate an Atom <feed> from the available metadata. |
static String |
generateMetadata(Map metadata,
int format,
String langcode)
Generates metadata according to the format (HTML, XHTML, RDF or XML (DCDot)), with to the format and language popups. |
void |
generateRSS1()
Generate RSS 1.0 from the available metadata. |
static String[] |
getLanguageCodes()
Returns a String array containing the natural language codes supported by the metadata utility. |
static String[] |
getLanguageNames()
Returns a String array containing the names of the natural languages supported by the metadata utility. |
static Map |
getMetadata(EditorPanel editor)
Returns a Map containing name-value pairs for various Dublin Core-based editor metadata. |
static Map |
getMetadata(EditorPanel editor,
boolean all)
Returns a Map containing name-value pairs for various Dublin-Core based editor metadata. |
static String |
parseBibRef(String creator,
String date)
Parses the supplied creator and date Strings to return a bibliographic reference String. |
static String[] |
scanFormMetadata(Element elt)
Scans the provided Element (which is expected to be an XHTML-based form), returning a three element String array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean isDCMES11
generateMetadata(Map,int,String) method
will produce XML markup (when called upon to deliver "RDF") conformant with
the non-standard DCMES 1.1 DTD, which allows for DC element refinement values.
If false, the markup is DCMES 1.0 compliant, with the refinement values
included as XML comments.
public static boolean useSemicolonDelimiter
public static final String[] META_FORMATS
public static String CLASS_BIBREF
public static final String[] DCMI_NAMES
| Constructor Detail |
|---|
public MetadataUtils()
| Method Detail |
|---|
public static void displayMetadata(EditorPanel editor,
String cid,
XNode xnode)
throws ProcessException
If xnode is null, will clear all node metadata fields. If cid is null, clears the Collection ID field.
ProcessExceptionpublic static Map getMetadata(EditorPanel editor)
getMetadata(EditorPanel,boolean) with a
false value for all (the default).
public static Map getMetadata(EditorPanel editor,
boolean all)
DCMI class, e.g., DCMI.DC_title.
This includes:
public static String[] getLanguageNames()
getMetadata(EditorPanel,boolean).
This array is lazily created from a property.
public static String[] getLanguageCodes()
getLanguageNames(). This array is lazily created from a property.
public static String generateMetadata(Map metadata,
int format,
String langcode)
META_FORMATS array: {XHTML,HTML,RDF,XML}. If the format is
RDF, the Map must contain a value for DC.Identifier, otherwise the
rdf:about attribute will be an empty string. This method will
silently produce such markup, but something RDF downwind will probably barf.
public void generateRSS1()
public void generateAtomFeed()
public void generateAtomEntry()
public static String[] scanFormMetadata(Element elt)
Subsequent instances of the queried attributes overwrite earlier ones, except in the case of DC.Creator (author), which creates a comma-separated list.
Note: this does not return the Dublin Core metadata from the document's <meta> content in <head>, it returns a scan of the contents of the XHTML form data.
public static String parseBibRef(String creator,
String date)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||