Package org.dspace.administer
Class StructBuilder
- java.lang.Object
-
- org.dspace.administer.StructBuilder
-
public class StructBuilder extends Object
This class deals with importing community and collection structures from an XML file. The XML file structure needs to be:<import_structure> <community> <name>....</name> <community>...</community> <collection> <name>....</name> </collection> </community> </import_structure>It can be arbitrarily deep, and supports all the metadata elements that make up the community and collection metadata. See the system documentation for more details.
- Author:
- Richard Jones
-
-
Field Summary
Fields Modifier and Type Field Description protected static CollectionServicecollectionServiceprotected static CommunityServicecommunityServiceprotected static EPersonServiceePersonServiceprotected static HandleServicehandleService
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] argv)Main method to be run from the command line to import a structure into DSpacee or export existing structure to a file.The command is of the form:
-
-
-
Field Detail
-
communityService
protected static final CommunityService communityService
-
collectionService
protected static final CollectionService collectionService
-
ePersonService
protected static final EPersonService ePersonService
-
handleService
protected static final HandleService handleService
-
-
Method Detail
-
main
public static void main(String[] argv) throws ParserConfigurationException, SQLException, IOException, TransformerException, XPathExpressionException
Main method to be run from the command line to import a structure into DSpacee or export existing structure to a file.The command is of the form:StructBuilder -f [XML source] -e [administrator email] -o [output file]to import, or
StructBuilder -x -e [administrator email] -o [output file]to export. The output will contain exactly the same as the source XML document, but with the Handle for each imported item added as an attribute.
- Parameters:
argv- command line arguments.- Throws:
ParserConfigurationException- passed through.SQLException- passed through.FileNotFoundException- if input or output could not be opened.TransformerException- if the input document is invalid.XPathExpressionException- passed through.IOException
-
-