Package org.dspace.administer
Class StructBuilder
java.lang.Object
org.dspace.administer.StructBuilder
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
FieldsModifier and TypeFieldDescriptionprotected static final CollectionServiceprotected static final CommunityServiceprotected static final EPersonServiceprotected static final HandleService -
Method Summary
-
Field Details
-
communityService
-
collectionService
-
ePersonService
-
handleService
-
-
Method Details
-
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
-