Search in sources :

Example 6 with MCRVFSContent

use of org.mycore.common.content.MCRVFSContent in project mycore by MyCoRe-Org.

the class MCRBase method setFromURI.

/**
 * This method read the XML input stream from an URI to build up the
 * MyCoRe-Object.
 *
 * @param uri
 *            an URI
 * @exception MCRException
 *                general Exception of MyCoRe
 */
protected final void setFromURI(URI uri) throws MCRException, SAXParseException, IOException {
    Document jdom = MCRXMLParserFactory.getParser().parseXML(new MCRVFSContent(uri));
    setFromJDOM(jdom);
}
Also used : Document(org.jdom2.Document) MCRVFSContent(org.mycore.common.content.MCRVFSContent)

Example 7 with MCRVFSContent

use of org.mycore.common.content.MCRVFSContent in project mycore by MyCoRe-Org.

the class MCRNode method doGetContent.

private MCRVFSContent doGetContent() throws IOException {
    MCRVFSContent content = new MCRVFSContent(fo);
    content.setName(getName());
    return content;
}
Also used : MCRVFSContent(org.mycore.common.content.MCRVFSContent)

Aggregations

MCRVFSContent (org.mycore.common.content.MCRVFSContent)7 Document (org.jdom2.Document)5 URL (java.net.URL)3 FileObject (org.apache.commons.vfs2.FileObject)2 IOException (java.io.IOException)1 Element (org.jdom2.Element)1 JDOMException (org.jdom2.JDOMException)1 SAXException (org.xml.sax.SAXException)1