|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.classifications2.utils.MCRCategoryTransformer
public class MCRCategoryTransformer
| Constructor Summary | |
|---|---|
MCRCategoryTransformer()
|
|
| Method Summary | |
|---|---|
static Element |
getEditorItems(MCRCategory cl,
boolean sort,
boolean emptyLeaves)
transforms a Classification into a MCR Editor definition (
<items>). |
static Element |
getEditorItems(MCRCategory cl,
String labelFormat,
boolean sort,
boolean emptyLeaves)
transforms a Classification into a MCR Editor definition (<items>). |
static Document |
getMetaDataDocument(MCRCategory cl,
boolean withCounter)
transforms a MCRCategory into a JDOM Document. |
static Element |
getMetaDataElement(MCRCategory category,
boolean withCounter)
transforms a MCRCategory into a JDOM Element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MCRCategoryTransformer()
| Method Detail |
|---|
public static Document getMetaDataDocument(MCRCategory cl,
boolean withCounter)
MCRCategory into a JDOM Document.
The Document will have a root tag with name "mycoreclass".
cl - Classification
public static Element getMetaDataElement(MCRCategory category,
boolean withCounter)
MCRCategory into a JDOM Element.
The element will have the tag name "category".
category - a category of a classification
public static Element getEditorItems(MCRCategory cl,
boolean sort,
boolean emptyLeaves)
Classification into a MCR Editor definition (
<items>).
cl - Classificationsort - if true, sort itemsemptyLeaves - if true, also include empty leaves
public static Element getEditorItems(MCRCategory cl,
String labelFormat,
boolean sort,
boolean emptyLeaves)
Classification into a MCR Editor definition (<items>).
This method allows you to specify how the labels will look like.
labelFormat is simply a String that is parsed for a few
key words, that will be replaced by a dynamic value. The following
keywords can be used at the moment:
cl - ClassificationlabelFormat - format String as specified abovesort - if true, sort itemsemptyLeaves - if true, also include empty leaves
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||