|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents an XML resource. You can use it to load and save XML files. This initial implementation of XML serialization and deserialization is incomplete but will be completed shortly.
Nested Class Summary | |
static interface |
XMLResource.XMLInfo
This interface is used with the XMLMap interface to describe how to serialize objects and features. |
static interface |
XMLResource.XMLMap
This interface represents a mapping from Ecore constructs to the XML representation of those constructs. |
Nested classes inherited from class org.eclipse.emf.ecore.resource.Resource |
Resource.Diagnostic, Resource.Factory, Resource.Internal, Resource.IOWrappedException |
Field Summary | |
static String |
HREF
|
static String |
NIL
|
static String |
NO_NAMESPACE_SCHEMA_LOCATION
|
static String |
OPTION_ANY_SIMPLE_TYPE
This option allows to specify an EClass for the implementation for anySimpleType. |
static String |
OPTION_ANY_TYPE
This option allows to specify an EClass for the implementation for anyType. |
static String |
OPTION_DECLARE_XML
Begin a save with this line: |
static String |
OPTION_DISABLE_NOTIFY
Disable notifications during load, and enable them at the end of a load. |
static String |
OPTION_ENCODING
Specify the XML encoding to be used during save. |
static String |
OPTION_EXTENDED_META_DATA
This option allows you to tailor the XML serialization of objects. |
static String |
OPTION_FLUSH_THRESHOLD
Flush the output stream whenever the number of characters/bytes pending exceeds the specified Integer value. |
static String |
OPTION_FORMATTED
Break lines and add indentation to produce a readable document. |
static String |
OPTION_LINE_WIDTH
Attribute formatting that exceeds the specified width will cause a line break so that formatting will continue indented on the next line. |
static String |
OPTION_PARSER_FEATURES
Specify parser features with their corresponding values, i.e., true or false using XMLResource.XMLMap . |
static String |
OPTION_PARSER_PROPERTIES
Specify parser properties with their corresponding values using a XMLResource.XMLMap . |
static String |
OPTION_PROCESS_DANGLING_HREF
This can be one of "THROW", "DISCARD", "RECORD", where "THROW" is the default. |
static String |
OPTION_PROCESS_DANGLING_HREF_DISCARD
|
static String |
OPTION_PROCESS_DANGLING_HREF_RECORD
|
static String |
OPTION_PROCESS_DANGLING_HREF_THROW
|
static String |
OPTION_RECORD_UNKNOWN_FEATURE
This options allows you to record unknown features.
|
static String |
OPTION_SAVE_DOCTYPE
Save a doctype declaration using systemId and publicId values specified on the resource |
static String |
OPTION_SAVE_TYPE_INFORMATION
Force type information (xsi:type/xmi:type) to be serialized for references in cases where the object type is different from the feature type |
static String |
OPTION_SCHEMA_LOCATION
Produce an xsi:schemaLocation/xsi:noNamespaceSchemaLocation in the saved result. |
static String |
OPTION_SCHEMA_LOCATION_IMPLEMENTATION
Produce an xsi:schemaLocation/xsi:noNamespaceSchemaLocation in the saved result to encode the name of the Java interface that declares the eINSTANCE of the EPackage implementation for those cases where OPTION_SCHEMA_LOCATION would not produce a physical location URI. |
static String |
OPTION_SKIP_ESCAPE
Skip processing for values that contain characters special to XML Faster for large computer-generated files |
static String |
OPTION_USE_ENCODED_ATTRIBUTE_STYLE
All EObject references will be uniformly encoded as one or more QName URI pairs, where the QName is optional depending on whether the referenced object's type is not identicle to that of the feature. |
static String |
OPTION_USE_FILE_BUFFER
Write the intermediate results of serialization to the file system rather to an in-memory buffer. |
static String |
OPTION_USE_LEXICAL_HANDLER
Determines whether comments and CDATA will be preserved in any mixed text processing. |
static String |
OPTION_USE_PARSER_POOL
Specify a parser pool to be used for loading XML documents. |
static String |
OPTION_USE_XML_NAME_TO_FEATURE_MAP
Specify a map XMLResource.XMLMap to be used during the subsequent loading of XML documents.
|
static String |
OPTION_XML_MAP
This save option allows you to tailor the XML serialization of objects. |
static String |
SCHEMA_LOCATION
|
static String |
TYPE
|
static String |
XML_NS
|
static String |
XML_SCHEMA_URI
|
static String |
XSI_NS
|
static String |
XSI_URI
|
Fields inherited from interface org.eclipse.emf.ecore.resource.Resource |
RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__URI, RESOURCE__WARNINGS |
Method Summary | |
Map |
getDefaultLoadOptions()
Returns the map of options that, in addition to the overriding options specified during load, are used to to control load behavior. |
Map |
getDefaultSaveOptions()
Returns the map of options that, in addition to the overriding options specified during save, are used to to control save behavior. |
String |
getEncoding()
Get the XML encoding for this resource. |
Map |
getEObjectToExtensionMap()
Returns the map with EObject as keys and corresponding AnyType s as the values.
|
Map |
getEObjectToIDMap()
Returns the Map of EObjects as keys and IDs as values. |
String |
getID(EObject eObject)
Returns the ID if there is one for the given object; if there is no ID, it returns null. |
Map |
getIDToEObjectMap()
Returns the Map with IDs as keys and EObjects as values. |
String |
getPublicId()
Returns public identifier specified on the doctype. |
String |
getSystemId()
Returns system identifier specified on the doctype. |
void |
setDoctypeInfo(String publicId,
String systemId)
Sets the values of system and public identifiers on this resource. |
void |
setEncoding(String encoding)
Set the XML encoding for this resource. |
void |
setID(EObject eObject,
String id)
Sets the ID for the given object. |
void |
setUseZip(boolean useZip)
Set whether the contents will be zipped. |
boolean |
useZip()
Returns whether the contents will be zipped. |
Methods inherited from interface org.eclipse.emf.ecore.resource.Resource |
getAllContents, getContents, getEObject, getErrors, getResourceSet, getURI, getURIFragment, getWarnings, isLoaded, isModified, isTrackingModification, load, load, save, save, setModified, setTrackingModification, setURI, unload |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
Field Detail |
public static final String OPTION_USE_PARSER_POOL
XMLParserPool
,
Constant Field Valuespublic static final String OPTION_USE_XML_NAME_TO_FEATURE_MAP
XMLResource.XMLMap
to be used during the subsequent loading of XML documents.
This is a mapping between XML name, namespace and an EClass to the corresponding EStructuralFeature.
EClass
,
EStructuralFeature
,
Constant Field Valuespublic static final String OPTION_SAVE_TYPE_INFORMATION
public static final String OPTION_PARSER_FEATURES
true
or false
using XMLResource.XMLMap
.
public static final String OPTION_PARSER_PROPERTIES
XMLResource.XMLMap
.
public static final String OPTION_USE_LEXICAL_HANDLER
public static final String OPTION_EXTENDED_META_DATA
public static final String OPTION_ANY_TYPE
OPTION_ANY_SIMPLE_TYPE
,
org.eclipse.emf.ecore.sdo.SDOPackage#getEDataObjectAnyType()
,
Constant Field Valuespublic static final String OPTION_ANY_SIMPLE_TYPE
OPTION_ANY_TYPE
,
org.eclipse.emf.ecore.sdo.SDOPackage#getEDataObjectSimpleAnyType()
,
Constant Field Valuespublic static final String OPTION_XML_MAP
public static final String OPTION_USE_ENCODED_ATTRIBUTE_STYLE
public static final String OPTION_FORMATTED
Boolean.TRUE
unless set to Boolean.FALSE
explicitly.
public static final String OPTION_LINE_WIDTH
public static final String OPTION_DECLARE_XML
public static final String OPTION_SAVE_DOCTYPE
getSystemId()
,
getPublicId()
,
setDoctypeInfo(String,String)
,
Constant Field Valuespublic static final String OPTION_SKIP_ESCAPE
public static final String OPTION_PROCESS_DANGLING_HREF
public static final String OPTION_PROCESS_DANGLING_HREF_THROW
public static final String OPTION_PROCESS_DANGLING_HREF_DISCARD
public static final String OPTION_PROCESS_DANGLING_HREF_RECORD
public static final String OPTION_RECORD_UNKNOWN_FEATURE
record
unknown features.
The default is Boolean.FALSE
unless set to Boolean.TRUE
explicitly.
public static final String OPTION_DISABLE_NOTIFY
public static final String OPTION_SCHEMA_LOCATION
public static final String OPTION_SCHEMA_LOCATION_IMPLEMENTATION
public static final String OPTION_ENCODING
public static final String OPTION_FLUSH_THRESHOLD
public static final String OPTION_USE_FILE_BUFFER
Boolean.FALSE
unless set to Boolean.TRUE
explicitly.
public static final String HREF
public static final String NIL
public static final String TYPE
public static final String SCHEMA_LOCATION
public static final String NO_NAMESPACE_SCHEMA_LOCATION
public static final String XML_NS
public static final String XSI_NS
public static final String XSI_URI
public static final String XML_SCHEMA_URI
Method Detail |
public boolean useZip()
public void setUseZip(boolean useZip)
public Map getDefaultSaveOptions()
public Map getDefaultLoadOptions()
public String getPublicId()
public String getSystemId()
public void setDoctypeInfo(String publicId, String systemId)
publicId
- systemId
- public String getEncoding()
public void setEncoding(String encoding)
public Map getIDToEObjectMap()
public Map getEObjectToIDMap()
public String getID(EObject eObject)
public void setID(EObject eObject, String id)
public Map getEObjectToExtensionMap()
EObject
as keys and corresponding AnyType
s as the values.
It's used to record unrecognized elements and attributes.
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |