|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.upb.swt.epctools.plugin.editor.EpctoolsXmlFile
public class EpctoolsXmlFile
This class reads an epml2.0 file and creates the corresponding EPC instance. After loading an epml file, the EpctoolsXmlFile instance should not be discarded because it is needed to save the xml after the content has been edited (because the xml loading function remembers the structure of the xml file (e.g. comments) and preserves the information when writing the new file).
| Field Summary | |
|---|---|
protected static java.lang.String |
EPML_ELEMENT_NS
|
protected static java.lang.String |
EPML_NAMESPACE_URI
|
private org.w3c.dom.Document |
m_dom
|
private EPC |
m_epc
|
private org.w3c.dom.Node |
m_epc_dom
|
protected static java.lang.String |
SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema). |
| Constructor Summary | |
|---|---|
EpctoolsXmlFile()
This is the default constructor |
|
EpctoolsXmlFile(org.eclipse.core.resources.IFile file)
Initialization |
|
| Method Summary | |
|---|---|
static java.util.Vector |
addNodeListToVector(java.util.Vector v,
org.w3c.dom.NodeList list)
This function adds all elements from list to v. |
private void |
createArcs(org.w3c.dom.Document dom,
float scaling_factor)
|
private org.w3c.dom.Document |
createEmptyDocument()
This function returns an empty epml document. |
private void |
createModel(org.w3c.dom.Document dom)
|
static java.lang.String |
getEmptyXmlFile()
|
EPC |
getEPC()
This function returns the computed EPC model instance after initialization. |
static java.util.Vector |
getVectorFromNodeList(org.w3c.dom.NodeList list)
This function converts a NodeList to a Vector. |
java.io.ByteArrayOutputStream |
save(EPC epc)
This function saves an EPC model to hard disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
protected static final java.lang.String EPML_NAMESPACE_URI
protected static final java.lang.String EPML_ELEMENT_NS
private EPC m_epc
private org.w3c.dom.Node m_epc_dom
private org.w3c.dom.Document m_dom
| Constructor Detail |
|---|
public EpctoolsXmlFile(org.eclipse.core.resources.IFile file)
file - The input filepublic EpctoolsXmlFile()
| Method Detail |
|---|
private org.w3c.dom.Document createEmptyDocument()
private void createModel(org.w3c.dom.Document dom)
private void createArcs(org.w3c.dom.Document dom,
float scaling_factor)
public EPC getEPC()
public java.io.ByteArrayOutputStream save(EPC epc)
epc - public static java.util.Vector getVectorFromNodeList(org.w3c.dom.NodeList list)
public static java.util.Vector addNodeListToVector(java.util.Vector v,
org.w3c.dom.NodeList list)
public static java.lang.String getEmptyXmlFile()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||