src/main/java/edu/iupui/ulib/dspace/ctask/MinimumMetadata.java
/**
     * Load the XML document which describes the required fields.
     *
     * @return the semantic analysis of the document.
     * @throws JAXBException passed through.
     * @throws SAXException passed through.
     */
Load the XML document which describes the required fields.
@return the semantic analysis of the document.
@throws JAXBException passed through.
@throws SAXException passed through.
Load the XML document which describes the required fields . @return the semantic analysis of the document . @throws JAXBException passed through . @throws SAXException passed through .
private RequiredMetadata loadRequiredFields()
            throws JAXBException, SAXException
    {
        ConfigurationService cfg = new DSpace().getConfigurationService();
        Path configPath = Paths.get(
                cfg.getProperty("dspace.dir"),
                "config",
                taskProperty("configDocument"));
        URL schemaDocument = MinimumMetadata.class.getResource("xsd/MinimumMetadata.xsd");
        Schema schema = SchemaFactory.newInstance(null).newSchema(schemaDocument);
        JAXBContext jctx = JAXBContext.newInstance(RequiredMetadata.class);
        Unmarshaller unmarshaller = jctx.createUnmarshaller();
        unmarshaller.setSchema(schema);
        return (RequiredMetadata) unmarshaller.unmarshal(configPath.toFile());
    }
private RequiredMetadata loadRequiredFields ( ) throws JAXBException , SAXException { ConfigurationService cfg = new DSpace ( ) . getConfigurationService ( ) ; Path configPath = Paths . get ( cfg . getProperty ( "dspace.dir" ) , "config" , taskProperty ( "configDocument" ) ) ; URL schemaDocument = MinimumMetadata . class . getResource ( "xsd/MinimumMetadata.xsd" ) ; Schema schema = SchemaFactory . newInstance ( null ) . newSchema ( schemaDocument ) ; JAXBContext jctx = JAXBContext . newInstance ( RequiredMetadata . class ) ; Unmarshaller unmarshaller = jctx . createUnmarshaller ( ) ; unmarshaller . setSchema ( schema ) ; return ( RequiredMetadata ) unmarshaller . unmarshal ( configPath . toFile ( ) ) ; }
Load the XML document which describes the required fields.
Load the XML document which describes the required fields .