|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lenya.cms.publication.DublinCoreImpl
public class DublinCoreImpl
Access dublin core meta data in documents. This class uses the dublin core specification from 2003-03-04.
Field Summary | |
---|---|
static java.lang.String[] |
ELEMENTS
|
static java.lang.String[] |
TERMS
|
Constructor Summary | |
---|---|
protected |
DublinCoreImpl(Document aDocument)
Creates a new instance of Dublin Core |
Method Summary | |
---|---|
void |
addValue(java.lang.String key,
java.lang.String value)
|
void |
addValues(java.lang.String key,
java.lang.String[] values)
|
protected java.lang.String[] |
getElementOrTerm(java.lang.String key)
Returns the element or term values, resp., for a certain key. |
java.lang.String |
getFirstValue(java.lang.String key)
Returns the first value for a certain key. |
protected org.w3c.dom.Element |
getMetaElement(org.w3c.dom.Document doc)
Returns the Lenya meta data element. |
java.lang.String[] |
getValues(java.lang.String key)
|
protected void |
loadValues()
Loads the dublin core values from the XML file. |
void |
removeAllValues(java.lang.String key)
|
void |
removeValue(java.lang.String key,
java.lang.String value)
|
void |
replaceBy(DublinCore other)
|
void |
save()
Save the meta data. |
void |
setValue(java.lang.String key,
java.lang.String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] ELEMENTS
public static final java.lang.String[] TERMS
Constructor Detail |
---|
protected DublinCoreImpl(Document aDocument) throws DocumentException
aDocument
- the document for which the Dublin Core instance is created.
DocumentException
- if an error occursMethod Detail |
---|
protected void loadValues() throws DocumentException
DocumentException
- when something went wrong.public void save() throws DocumentException
DocumentException
- if the meta data could not be made persistent.protected org.w3c.dom.Element getMetaElement(org.w3c.dom.Document doc) throws DocumentException
doc
- The XML document.
DocumentException
public java.lang.String getFirstValue(java.lang.String key) throws DocumentException
key
- The key.
DocumentException
protected java.lang.String[] getElementOrTerm(java.lang.String key) throws DocumentException
key
- The key.
DocumentException
public java.lang.String[] getValues(java.lang.String key) throws DocumentException
DocumentException
DublinCore.getValues(java.lang.String)
public void addValue(java.lang.String key, java.lang.String value) throws DocumentException
DocumentException
DublinCore.addValue(java.lang.String, java.lang.String)
public void setValue(java.lang.String key, java.lang.String value) throws DocumentException
DocumentException
DublinCore.setValue(java.lang.String, java.lang.String)
public void addValues(java.lang.String key, java.lang.String[] values) throws DocumentException
DocumentException
DublinCore.addValues(java.lang.String, java.lang.String[])
public void removeValue(java.lang.String key, java.lang.String value) throws DocumentException
DocumentException
DublinCore.removeValue(java.lang.String, java.lang.String)
public void removeAllValues(java.lang.String key) throws DocumentException
DocumentException
DublinCore.removeAllValues(java.lang.String)
public void replaceBy(DublinCore other) throws DocumentException
DocumentException
DublinCore.replaceBy(org.apache.lenya.cms.publication.DublinCore)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |