|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.frontend.cli.MCRAbstractCommands
org.mycore.frontend.cli.MCRObjectCommands
public class MCRObjectCommands
Provides static methods that implement commands for the MyCoRe command line interface.
| Field Summary | |
|---|---|
static String |
DEFAULT_TRANSFORMER
Default transformer script |
| Fields inherited from class org.mycore.frontend.cli.MCRAbstractCommands |
|---|
command, CONFIG |
| Constructor Summary | |
|---|---|
MCRObjectCommands()
The empty constructor. |
|
| Method Summary | |
|---|---|
static void |
checkMetadataSearch(String type)
Checks existence of MCRObjectID type {0} in search index and rapairs missing ones in search index. |
static void |
checkSelected()
The method checks the existence of selected MCRObjects in SQL store. |
static boolean |
checkXMLFile(String fileName)
The method parse and check an XML file. |
static void |
delete(String ID)
Delete a MCRObject from the datastore. |
static List<String> |
deleteAllObjects(String type)
Delete all MCRObject from the datastore for a given type. |
static void |
deleteFromTo(String IDfrom,
String IDto)
Delete MCRObject's form ID to ID from the datastore. |
static void |
deleteSelected()
Delete all selected MCRObjects from the datastore. |
static void |
export(String ID,
String dirname,
String style)
Export an MCRObject to a file named MCRObjectID .xml in a directory. |
static void |
export(String fromID,
String toID,
String dirname,
String style)
Save any MCRObject's to files named MCRObjectID .xml in a directory. |
static List<String> |
exportAllObjects(String type,
String dirname,
String style)
Save all MCRObject's to files named MCRObjectID .xml in a dirnamedirectory for the data type type. |
static List<String> |
exportSelected(String dirname,
String style)
|
static void |
getLastID(String base)
Get the last used MCRObjectID for the given MCRObjectID base. |
static void |
getNextID(String base)
Get the next free MCRObjectID for the given MCRObjectID base. |
static List<String> |
getSelectedObjectIDs()
|
static List<String> |
loadFromDirectory(String directory)
Load MCRObject's from all XML files in a directory. |
static boolean |
loadFromFile(String file)
Load a MCRObjects from an XML file. |
static boolean |
loadFromFile(String file,
boolean importMode)
Load a MCRObjects from an XML file. |
static void |
notifySearcher(String mode,
String index)
Inform Searcher what is going on. |
static void |
removeFromSearchindex(String index)
The method removes all selected entries from search index. |
static List<String> |
repairMetadataSearch(String type)
The method start the repair of the metadata search for a given MCRObjectID type. |
static void |
repairMetadataSearchForID(String id)
The method start the repair of the metadata search for a given MCRObjectID as String. |
static void |
selectObjectsWithQuery(String querystring)
Builds a resulset with a query. |
static void |
setSelectedObjectIDs(List<String> selected)
|
static void |
showLastID(String base)
Shows the last used MCRObjectIDs. |
static void |
showNextID(String base)
Shows the next free MCRObjectIDs. |
static List<String> |
updateFromDirectory(String directory)
Update MCRObject's from all XML files in a directory. |
static boolean |
updateFromFile(String file)
Update a MCRObject's from an XML file. |
static boolean |
updateFromFile(String file,
boolean importMode)
Update a MCRObject's from an XML file. |
| Methods inherited from class org.mycore.frontend.cli.MCRAbstractCommands |
|---|
getPossibleCommands |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_TRANSFORMER
| Constructor Detail |
|---|
public MCRObjectCommands()
| Method Detail |
|---|
public static void setSelectedObjectIDs(List<String> selected)
public static List<String> getSelectedObjectIDs()
public static final List<String> deleteAllObjects(String type)
throws MCRActiveLinkException
type - the type of the MCRObjects that should be deleted
MCRActiveLinkException
public static final void delete(String ID)
throws MCRActiveLinkException
ID - the ID of the MCRObject that should be deleted
MCRActiveLinkException
public static final void deleteFromTo(String IDfrom,
String IDto)
throws MCRActiveLinkException
IDfrom - the start ID for deleting the MCRObjectsIDto - the stop ID for deleting the MCRObjects
MCRActiveLinkException
public static final List<String> loadFromDirectory(String directory)
throws MCRActiveLinkException
directory - the directory containing the XML files
MCRActiveLinkException
public static final List<String> updateFromDirectory(String directory)
throws MCRActiveLinkException
directory - the directory containing the XML files
MCRActiveLinkException
public static final boolean loadFromFile(String file)
throws MCRActiveLinkException
file - the location of the xml file
MCRActiveLinkException
public static final boolean loadFromFile(String file,
boolean importMode)
throws MCRActiveLinkException
file - the location of the xml fileimportMode - if true, servdates are taken from xml file
MCRActiveLinkException
public static final boolean updateFromFile(String file)
throws MCRActiveLinkException
file - the location of the xml file
MCRActiveLinkException
public static final boolean updateFromFile(String file,
boolean importMode)
throws MCRActiveLinkException
file - the location of the xml fileimportMode - if true, servdates are taken from xml file
MCRActiveLinkExceptionpublic static final void showNextID(String base)
base - the base String of the MCRObjectIDpublic static final void showLastID(String base)
base - the base String of the MCRObjectID
public static final void export(String ID,
String dirname,
String style)
ID - the ID of the MCRObject to be save.dirname - the dirname to store the objectstyle - the type of the stylesheet
public static final void export(String fromID,
String toID,
String dirname,
String style)
fromID - the ID of the MCRObject from be save.toID - the ID of the MCRObject to be save.dirname - the filename to store the objectstyle - the type of the stylesheet
public static final List<String> exportAllObjects(String type,
String dirname,
String style)
fromID - the ID of the MCRObject from be save.toID - the ID of the MCRObject to be save.dirname - the filename to store the objectstyle - the type of the stylesheetpublic static final void getNextID(String base)
base - the MCRObjectID base stringpublic static final void getLastID(String base)
base - the MCRObjectID base stringpublic static final boolean checkXMLFile(String fileName)
fileName - the location of the xml filepublic static final List<String> repairMetadataSearch(String type)
type - the MCRObjectID typepublic static final void repairMetadataSearchForID(String id)
id - the MCRObjectID as Stringpublic static final void selectObjectsWithQuery(String querystring)
querystring - MCRQuery as String
public static final void deleteSelected()
throws MCRActiveLinkException
MCRActiveLinkException
public static final List<String> exportSelected(String dirname,
String style)
public static final void removeFromSearchindex(String index)
index - index of searcherpublic static final void checkSelected()
public static final void checkMetadataSearch(String type)
type - the MCRObjectID type
public static final void notifySearcher(String mode,
String index)
mode - what is going on, for example rebuild insert ... finishindex - of searcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||