public final class EDOCBuilder extends Object
New EDOC objects as well as existing EDOC objects can be obtained using this class.
| Modifier and Type | Class and Description |
|---|---|
static interface |
EDOCBuilder.EDOCBuilderCallback
EDOCBuilderCallback class is used to get user input during EDOC loading.
|
static interface |
EDOCBuilder.EDOCLoadParameter
A marker interface for EDOC load parameters.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getFormatVersionDefault()
Returns the current EDoc format version used by EDOCBuilder.
|
static EDOCTemplate |
newDefaultTemplate()
Creates a new default EDOCTemplate object.
|
static EDOC |
newEDOC()
Deprecated.
obsolete as of EDOC 2.0 document format.
|
static EDOC |
newEDOC(EDOCTemplate edocTemplate)
Deprecated.
obsolete as of EDOC 2.0 document format.
|
static EDOC |
newEDOC(File templateFile)
Deprecated.
obsolete as of EDOC 2.0 document format.
|
static EDOC |
newEDOC(String formatVersion)
Deprecated.
obsolete as of EDOC 2.0 document format.
|
static EDOC |
newEDOC(URL templateURL)
Deprecated.
obsolete as of EDOC 2.0 document format.
|
static EDOCTemplate |
newTemplate(File templateFile)
Creates a new EDOCTemplate object using the given file.
|
static EDOCTemplate |
newTemplate(URL templateURL)
Creates a new EDOCTemplate object using the given URL.
|
static EDoc2 |
openAsEDoc2(File file,
String name)
Supports EDOC 1.0 format documents using the EDOC 2.0 API.
|
static EDOC |
openEDOC(File edocFile,
EDOCBuilder.EDOCLoadParameter edocLoadParameter)
Reads the contents from the given file,
and creates a new EDOC object.
|
static EDOC |
openEDOC(InputStream edocInputStream,
String edocName,
EDOCBuilder.EDOCLoadParameter edocLoadParameter)
Reads the contents from the given InputStream,
and creates a new EDOC object.
|
static EDOC |
openEDOC(URL edocURL,
EDOCBuilder.EDOCLoadParameter edocLoadParameter)
Reads the contents from the given URL,
and creates a new EDOC object.
|
static void |
setFormatVersionDefault(String formatVersion)
Sets the current EDoc format version to be used by EDOCBuilder.
|
public static String getFormatVersionDefault() throws EDOCException
EDOCExceptionpublic static void setFormatVersionDefault(String formatVersion) throws EDOCException
formatVersion - EDoc format version, e.g. 1.02.EDOCException - if the given EDoc format is invalid.public static EDOCTemplate newDefaultTemplate() throws EDOCException
EDOCException - if the default EDOC template cannot be loaded.public static EDOCTemplate newTemplate(File templateFile) throws EDOCException
templateFile - the File object from which to read template contents.EDOCException - if the given EDOC template cannot be loaded.public static EDOCTemplate newTemplate(URL templateURL) throws EDOCException
templateURL - the URL object from which to read template contents.EDOCException - EDOCException if the given EDOC template cannot be loaded.@Deprecated public static EDOC newEDOC() throws EDOCException
EDOCException - if the default EDOC template cannot be loaded.@Deprecated public static EDOC newEDOC(String formatVersion) throws EDOCException
formatVersion - EDoc format version, e.g. 1.02.EDOCException - if the default EDOC template cannot be loaded.@Deprecated public static EDOC newEDOC(File templateFile) throws EDOCException
templateFile - the File object from which to read EDOC template contents.EDOCException - if the given EDOC template cannot be loaded.@Deprecated public static EDOC newEDOC(URL templateURL) throws EDOCException
templateURL - the URL object from which to read EDOC template contents.EDOCException - if the given EDOC template cannot be loaded.@Deprecated public static EDOC newEDOC(EDOCTemplate edocTemplate) throws EDOCException
edocTemplate - EDOC template.EDOCException - if the given EDOC template cannot be loaded.public static EDOC openEDOC(File edocFile, EDOCBuilder.EDOCLoadParameter edocLoadParameter) throws EDOCException
edocFile - the File object from which to read EDOC contents.edocLoadParameter - the LoadParameter that specifies how to load the EDOC, which may be null.EDOCException - if EDOC cannot be created.public static EDOC openEDOC(URL edocURL, EDOCBuilder.EDOCLoadParameter edocLoadParameter) throws EDOCException
edocURL - the URL object from which to read EDOC contents.edocLoadParameter - the LoadParameter that specifies how to load the EDOC, which may be null.EDOCException - if EDOC cannot be created.public static EDOC openEDOC(InputStream edocInputStream, String edocName, EDOCBuilder.EDOCLoadParameter edocLoadParameter) throws EDOCException
edocInputStream - the InputStream object from which to read EDOC contents.edocName - the name of the EDOC file, or null if the name is unknown.edocLoadParameter - the LoadParameter that specifies how to load the EDOC, which may be null.EDOCException - if EDOC cannot be created.public static EDoc2 openAsEDoc2(File file, String name) throws EDoc2Exception
EDoc2ExceptionEDoc2Builder.openEDoc(File)