|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.frontend.redundancy.cli.MCRRedundancyCleanUpCommand
public class MCRRedundancyCleanUpCommand
Processes a redundancy xml-file to relink and delete duplicate mcr objects in the database.
Commandprocess:
(cleanUp [(process redundancy object[(replace links)* -> (delete mcrobject) -> (delete redundancy object xml entry)])*] -> [update xml document])
| Nested Class Summary | |
|---|---|
protected static class |
MCRRedundancyCleanUpCommand.AttributeValueFilter
A jdom-filter which compares attribute values. |
| Constructor Summary | |
|---|---|
MCRRedundancyCleanUpCommand()
|
|
| Method Summary | |
|---|---|
static List<String> |
cleanUp(String type)
The start method. |
static void |
deleteRedundancyElementEntry(String id)
Deletes an processed redundancy element entry in the xml document. |
protected static Element |
getRedunElementOfId(String id)
Returns an redundancy object by the specified id. |
protected static boolean |
isElementAlreadyExists(Element element)
Checks if the element is equal to an element from the same parent. |
static List<String> |
processRedundancyObject(String id)
Creates the commands of an redundancy Object. |
static void |
replaceLinks(String sourceId,
String oldLink,
String newLink)
Replaces all links which are found in the source mcrobject xml-tree. |
static void |
updateXMLDocument(String fileName)
Updates the specified file with the static document xml-structure. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MCRRedundancyCleanUpCommand()
| Method Detail |
|---|
public static List<String> cleanUp(String type)
throws Exception
type - The type.
Exception
public static List<String> processRedundancyObject(String id)
throws Exception
id - The id of the redundancyObjects element.
Exceptionpublic static void deleteRedundancyElementEntry(String id)
id - The id of the element.protected static Element getRedunElementOfId(String id)
id - The id.
public static void replaceLinks(String sourceId,
String oldLink,
String newLink)
throws Exception
source - The source Id as String.oldLink - The link which to replaced.newLink - The new link.
Exceptionprotected static boolean isElementAlreadyExists(Element element)
element - The element to check.
public static void updateXMLDocument(String fileName)
throws Exception
fileName -
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||