org.ceryle.xml
Class MetadataSynchronizer
java.lang.Object
org.ceryle.xml.MetadataSynchronizer
public class MetadataSynchronizer
- extends Object
Provided with a DOM Document representing an XHTML document, synchronizes
with a set of supplied DCMI metadata, returning the modified Document.
- Since:
- JDK1.4
- Version:
- $Id: MetadataSynchronizer.java,v 3.8 2007-06-15 12:10:29 altheim Exp $
- Author:
- Murray Altheim
|
Method Summary |
boolean |
resolve(Map metadata,
String name,
String value1,
String value2)
Resolve the conflict between the first and second values for the given
DC term name, modifying the provided Map accordingly. |
Document |
sync(Document doc,
Map metadata)
Processes the supplied DOM Document, returning the same Document following successful
processing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTR_DC_Date_created
public static final String ATTR_DC_Date_created
ATTR_DC_Date_modified
public static final String ATTR_DC_Date_modified
ATTR_DC_Identifier_version
public static final String ATTR_DC_Identifier_version
MetadataSynchronizer
public MetadataSynchronizer()
- Default constructor.
sync
public Document sync(Document doc,
Map metadata)
throws DocumentException
- Processes the supplied DOM Document, returning the same Document following successful
processing. If no changes are made, returns null. Any error will result in throwing
a DocumentException.
- Throws:
DocumentException
resolve
public boolean resolve(Map metadata,
String name,
String value1,
String value2)
- Resolve the conflict between the first and second values for the given
DC term name, modifying the provided Map accordingly.
This is based on the following policies:
| DC Term | Policy |
| DC.Title | TBD |
| DC.Creator | TBD |
| DC.Subject | TBD |
| DC.Description | TBD |
- Returns:
- true if any change to the provided Map occurs
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.