public class XMCDAParser extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
readXMCDAInputStreamMaxSize
The maximum size of the stream that can be read by
readXMCDA(XMCDA, InputStream, Set, String...) |
static String |
XMCDAv3_VERSION |
| Constructor and Description |
|---|
XMCDAParser() |
| Modifier and Type | Method and Description |
|---|---|
static Version |
getDefaultXMCDAv3Version() |
static void |
main(String[] args) |
protected XMCDA |
readXMCDA_noValidation(XMCDA xmcda,
InputStream inputStream,
Set<String> parsedRootElements,
String... tagsOnly)
Parses an input stream and populate the supplied XMCDA objects with the elements found in the stream.
Parameters: see readXMCDA(XMCDA, InputStream, Set, String...). |
XMCDA |
readXMCDA(XMCDA xmcda,
File file) |
XMCDA |
readXMCDA(XMCDA xmcda,
File file,
Set<String> parsedRootElements,
String... tagsOnly)
Reads a XMCDA file and adds its content to an XMCDA object.
|
XMCDA |
readXMCDA(XMCDA xmcda,
File file,
String... tagsOnly) |
protected XMCDA |
readXMCDA(XMCDA xmcda,
InputStream inputStream,
Set<String> parsedRootElements,
String... tagsOnly)
Validates and parses an inputStream to build a XMCDA object.
|
XMCDA |
readXMCDA(XMCDA xmcda,
String filename) |
XMCDA |
readXMCDA(XMCDA xmcda,
String filename,
String... tags) |
static void |
setDefaultXMCDAv3Version(Version version) |
static boolean |
validate(File file) |
protected static boolean |
validate(InputStream inputStream) |
protected static boolean |
validate(StreamSource streamSource) |
void |
writeXMCDA(XMCDA xmcda,
File contextFile) |
void |
writeXMCDA(XMCDA xmcda,
File contextFile,
String... tagsOnly) |
void |
writeXMCDA(XMCDA xmcda,
OutputStream stream,
String... tagsOnly) |
void |
writeXMCDA(XMCDA xmcda,
OutputStream stream,
Version version,
String... tagsOnly) |
void |
writeXMCDA(XMCDA xmcda,
String contextFileName) |
void |
writeXMCDA(XMCDA xmcda,
String contextFileName,
String... tagsOnly) |
protected int readXMCDAInputStreamMaxSize
readXMCDA(XMCDA, InputStream, Set, String...)public static final String XMCDAv3_VERSION
public static boolean validate(File file) throws IOException, SAXException
IOExceptionSAXExceptionprotected static boolean validate(InputStream inputStream) throws IOException, SAXException
IOExceptionSAXExceptionprotected static boolean validate(StreamSource streamSource) throws IOException, SAXException
IOExceptionSAXExceptionpublic XMCDA readXMCDA(XMCDA xmcda, String filename) throws IOException, XMLStreamException, SAXException
public XMCDA readXMCDA(XMCDA xmcda, String filename, String... tags) throws IOException, XMLStreamException, SAXException
public XMCDA readXMCDA(XMCDA xmcda, File file) throws IOException, XMLStreamException, SAXException
public XMCDA readXMCDA(XMCDA xmcda, File file, String... tagsOnly) throws IOException, XMLStreamException, SAXException
public XMCDA readXMCDA(XMCDA xmcda, File file, Set<String> parsedRootElements, String... tagsOnly) throws IOException, XMLStreamException, SAXException
xmcda - the XMCDA object on which the parsed elements will be put intofile - the files containing the XMCDA to be readparsedRootElements - if non-null, the parsed root elements are appended to this listtagsOnly - the list of root tags to read. If empty, everything is readxmcdaIOExceptionXMLStreamExceptionSAXExceptionprotected XMCDA readXMCDA(XMCDA xmcda, InputStream inputStream, Set<String> parsedRootElements, String... tagsOnly) throws IOException, XMLStreamException, SAXException
readXMCDAInputStreamMaxSize.xmcda - the XMCDA object in which the read elements should be put.inputStream - the stream to readparsedRootElements - a set in which the method puts the elements it parses. It mayu be null.tagsOnly - the XMCDA root tags to be read in the stream. If null or empty,IOExceptionXMLStreamExceptionSAXExceptionprotected XMCDA readXMCDA_noValidation(XMCDA xmcda, InputStream inputStream, Set<String> parsedRootElements, String... tagsOnly) throws IOException, XMLStreamException, SAXException
readXMCDA(XMCDA, InputStream, Set, String...).public static Version getDefaultXMCDAv3Version()
public static void setDefaultXMCDAv3Version(Version version)
public void writeXMCDA(XMCDA xmcda, String contextFileName) throws FileNotFoundException, XMLStreamException
public void writeXMCDA(XMCDA xmcda, String contextFileName, String... tagsOnly) throws FileNotFoundException, XMLStreamException
public void writeXMCDA(XMCDA xmcda, File contextFile) throws FileNotFoundException, XMLStreamException
public void writeXMCDA(XMCDA xmcda, File contextFile, String... tagsOnly) throws FileNotFoundException, XMLStreamException
public void writeXMCDA(XMCDA xmcda, OutputStream stream, String... tagsOnly) throws FileNotFoundException, XMLStreamException
public void writeXMCDA(XMCDA xmcda, OutputStream stream, Version version, String... tagsOnly) throws FileNotFoundException, XMLStreamException
Copyright © 2013–2021 Sébastien Bigaret, Patrick Meyer. All rights reserved.