Package com._1c.g5.modeling.xml.parser
Class AbstractStaxXmlParser
- java.lang.Object
-
- com._1c.g5.modeling.xml.parser.XmlParserAdapter
-
- com._1c.g5.modeling.xml.parser.AbstractStaxXmlParser
-
- All Implemented Interfaces:
IXmlParser
,org.eclipse.emf.ecore.xmi.XMLLoad
- Direct Known Subclasses:
AbstractStaxXmiParser
,StaxXmlParser
public abstract class AbstractStaxXmlParser extends XmlParserAdapter
Абстрактная реализация парсера xml документа. Поддерживает резолвинг символических ссылок, построение parse-tree и резолвинг абстрактных типов соглассно аннотациям mapping модели
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractStaxXmlParser.Attributes
Служебный класс для хранения информации об атрибутахprotected static class
AbstractStaxXmlParser.ManyReference
protected static class
AbstractStaxXmlParser.MyEObjectStack
protected static class
AbstractStaxXmlParser.MyStack<E>
protected static class
AbstractStaxXmlParser.SingleReference
For unresolved forward references, the line number where the incorrect id appeared in an XML resource is needed, so the Value for the forward reference and the line number where the forward reference occurred must be saved until the end of the XML resource is encountered.
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.emf.ecore.EClass
anySimpleType
protected org.eclipse.emf.ecore.EClass
anyType
protected static int
ARRAY_SIZE
protected AbstractStaxXmlParser.Attributes
attribs
protected int
capacity
protected org.eclipse.emf.ecore.EStructuralFeature
contextFeature
protected static boolean
DEBUG_DEMANDED_PACKAGES
protected boolean
deferIDREFResolution
protected List<org.eclipse.emf.ecore.EObject>
deferredExtent
protected boolean
disableNotify
protected static String
DOCUMENT_ROOT_TYPE
protected org.eclipse.emf.ecore.EObject
documentRoot
protected DocumentRoot
documentRootNode
protected org.eclipse.emf.ecore.xmi.EcoreBuilder
ecoreBuilder
protected AbstractStaxXmlParser.MyStack<QName>
elements
protected Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.xml.type.AnyType>
eObjectToExtensionMap
protected static String
ERROR_TYPE
protected org.eclipse.emf.ecore.util.ExtendedMetaData
extendedMetaData
protected org.eclipse.emf.ecore.util.InternalEList<org.eclipse.emf.ecore.EObject>
extent
protected Map<String,org.eclipse.emf.common.util.URI>
externalURIToLocations
protected List<AbstractStaxXmlParser.ManyReference>
forwardManyReferences
protected List<AbstractStaxXmlParser.SingleReference>
forwardSingleReferences
protected org.eclipse.emf.ecore.xmi.XMLHelper
helper
protected String
hrefAttribute
protected static String
ID_ATTRIB
protected String
idAttribute
protected Object[]
identifiers
protected boolean
isIDREF
protected boolean
isNamespaceAware
protected boolean
isRoot
protected boolean
isSimpleFeature
protected boolean
keepAttributeLocation
protected boolean
laxWildcardProcessing
protected AbstractStaxXmlParser.MyStack<org.eclipse.emf.ecore.util.FeatureMap>
mixedTargets
protected AbstractStaxXmlParser.Attributes
namespaces
protected static String
NAMESPACES_PREFIX_MAP
protected boolean
needsPushContext
protected static String
NIL_ATTRIB
protected static String
NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB
protected AbstractStaxXmlParser.MyStack<INode>
nodes
protected Set<String>
notFeatures
protected static String
OBJECT_TYPE
protected AbstractStaxXmlParser.MyEObjectStack
objects
protected boolean
oldStyleProxyURIs
protected org.eclipse.emf.ecore.EPackage.Registry
packageRegistry
protected ParseResult
parseResult
protected int[]
positions
protected Map<String,org.eclipse.emf.ecore.EFactory>
prefixesToFactories
protected boolean
processAnyXML
protected boolean
processSchemaLocations
protected XMLStreamReader
reader
protected boolean
recordAnyTypeNSDecls
protected boolean
recordUnknownFeature
protected static int
REFERENCE_THRESHOLD
protected boolean
resolve
protected org.eclipse.emf.ecore.xmi.XMLResource.ResourceEntityHandler
resourceEntityHandler
protected org.eclipse.emf.ecore.resource.ResourceSet
resourceSet
protected org.eclipse.emf.common.util.URI
resourceURI
protected ContainmentReferenceNode
rootNode
protected List<org.eclipse.emf.ecore.InternalEObject>
sameDocumentProxies
protected static String
SCHEMA_LOCATION_ATTRIB
protected boolean
suppressDocumentRoot
protected StringBuilder
text
protected static String
TYPE_ATTRIB
protected AbstractStaxXmlParser.MyStack<Object>
types
protected static String
UNKNOWN_FEATURE_TYPE
protected org.eclipse.emf.ecore.xmi.XMLResource.URIHandler
uriHandler
protected Map<String,org.eclipse.emf.common.util.URI>
urisToLocations
protected boolean
useConfigurationCache
protected boolean
usedNullNamespacePackage
protected boolean
useSymlink
protected static String
UUID_ATTRIB
protected static String
VERSION_ATTRIB
protected static String
XMI_ELEMENT_NAME
protected static String
XMI_ELEMENT_TYPE
protected static String
XMI_EXTENSION
protected static String
XMI_TYPE_ATTRIB
protected static String
XMI_UUID
protected org.eclipse.emf.ecore.xmi.XMLResource.XMLMap
xmlMap
protected org.eclipse.emf.ecore.xmi.XMLResource
xmlResource
protected org.eclipse.emf.ecore.EPackage
xmlSchemaTypePackage
-
Fields inherited from interface com._1c.g5.modeling.xml.parser.IXmlParser
OPTION_USE_SYMLINK
-
-
Constructor Summary
Constructors Constructor Description AbstractStaxXmlParser()
AbstractStaxXmlParser(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
characters()
Обработка символов (whitespaces и прочее)protected void
comment()
Обработка комментариевprotected void
createAttributeNodeForProxy(org.eclipse.emf.ecore.EReference eReference, int attrIndex, String id)
protected org.eclipse.emf.ecore.EObject
createDocumentRoot(String prefix, String uri, String name, org.eclipse.emf.ecore.EFactory eFactory, boolean top)
protected org.eclipse.emf.ecore.xmi.EcoreBuilder
createEcoreBuilder(Map<?,?> options, org.eclipse.emf.ecore.util.ExtendedMetaData extendedMetaData)
protected org.eclipse.emf.ecore.EObject
createObject(org.eclipse.emf.ecore.EFactory eFactory, org.eclipse.emf.ecore.EClassifier type, boolean documentRoot)
protected void
createObject(org.eclipse.emf.ecore.EObject peekObject, org.eclipse.emf.ecore.EStructuralFeature feature, String xsiType)
Create an object based on the given feature and attributes.protected org.eclipse.emf.ecore.EObject
createObjectByType(String prefix, String name, boolean top)
Create an object based on the prefix and type name.protected org.eclipse.emf.ecore.EObject
createObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName)
Deprecated.since 2.2 Create an object given a content helper, a factory, and a type name, and process the XML attributes.protected org.eclipse.emf.ecore.EObject
createObjectFromFeatureType(org.eclipse.emf.ecore.EObject peekObject, org.eclipse.emf.ecore.EStructuralFeature feature)
Create an object based on the type of the given feature.protected org.eclipse.emf.ecore.EObject
createObjectFromTypeName(org.eclipse.emf.ecore.EObject peekObject, String typeQName, org.eclipse.emf.ecore.EStructuralFeature feature)
Create an object from the given qualified type name.protected void
createTopObject(String prefix, String name)
protected void
endDocument()
Обработка конца документаprotected void
endElement()
Обработка конца элементаvoid
error(org.eclipse.emf.ecore.xmi.XMIException e)
void
fatalError(org.eclipse.emf.ecore.xmi.XMIException e)
protected String
findAppropriateQName(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference eReference)
protected org.eclipse.emf.ecore.EClass
findInstantiableCompatible(org.eclipse.emf.ecore.EClass eType)
protected org.eclipse.emf.ecore.EClass
findSubTypeInEPackage(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.ecore.EClass superType)
protected int
getColumnNumber()
protected org.eclipse.emf.ecore.EStructuralFeature
getContentFeature(org.eclipse.emf.ecore.EObject object)
protected Location
getCurrentLocation()
protected org.eclipse.emf.ecore.xml.type.AnyType
getExtension(org.eclipse.emf.ecore.EObject peekObject)
protected org.eclipse.emf.ecore.EFactory
getFactoryForPrefix(String prefix)
protected org.eclipse.emf.ecore.EStructuralFeature
getFeature(org.eclipse.emf.ecore.EObject object, String prefix, String name)
protected org.eclipse.emf.ecore.EStructuralFeature
getFeature(org.eclipse.emf.ecore.EObject object, String prefix, String name, boolean isElement)
Get the EStructuralFeature from the metaObject for the given object and feature name.protected int
getLineNumber()
protected String
getLocation()
protected org.eclipse.emf.ecore.EPackage
getPackageForURI(String uriString)
Attempt to get the namespace for the given prefix, then return ERegister.getPackage() or null.ParseResult
getParseResult()
org.eclipse.emf.ecore.EPackage.Registry
getRegistry()
protected Location
getStartLocation()
Метод для получения текущего положения курсора в текстеprotected org.eclipse.emf.ecore.resource.URIConverter
getURIConverter()
protected abstract String
getXsiType()
Returns the xsi type attribute's value.protected org.eclipse.emf.ecore.EClass
globalFindInstantiableCompatible(org.eclipse.emf.ecore.EClass eType)
protected void
growArrays()
protected void
handleComment(String comment)
protected void
handleFeature(String prefix, String name)
The XML element represents a feature.protected void
handleForwardReferences()
protected void
handleForwardReferences(boolean isEndDocument)
Check if the values of the forward references have been set (they may have been set due to a bidirectional reference being set).protected org.eclipse.emf.ecore.EPackage
handleMissingPackage(String uriString)
protected void
handleMixedText()
protected void
handleObjectAttribs(org.eclipse.emf.ecore.EObject obj)
Process the XML attributes for the newly created object.protected void
handleProxy(org.eclipse.emf.ecore.InternalEObject proxy, String uriLiteral, int index)
protected void
handleSchemaLocation()
protected void
handleTopLocations(String prefix, String name)
protected void
handleUnknownFeature(String prefix, String name, boolean isElement, org.eclipse.emf.ecore.EObject peekObject, String value)
protected void
handleXSINoNamespaceSchemaLocation(String noNamespaceSchemaLocation)
protected void
handleXSISchemaLocation(String schemaLocations)
void
init(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)
protected void
initReader(InputStream inputStream)
protected boolean
isError()
Returns true if there was an error in the last XML element; false otherwise.protected boolean
isNull()
Returns true if the xsi:nil attribute is in the list of attributes.protected boolean
isTextFeatureValue(Object type)
ParseResult
parse(InputStream inputStream)
Метод для разбора xml документа.protected void
process(String name, String prefix, String localName)
protected void
processElement(String name, String prefix, String localName)
protected void
processFeature(org.eclipse.emf.ecore.EObject peekObject, org.eclipse.emf.ecore.EStructuralFeature feature, String xsiType)
protected void
processObject(org.eclipse.emf.ecore.EObject object)
Add object to appropriate stacks.protected void
processSchemaLocations(String prefix, String name)
protected void
processTopObject(org.eclipse.emf.ecore.EObject object)
Add object to extent and call processObject.protected void
recordHeaderInformation()
protected org.eclipse.emf.common.util.EMap<String,String>
recordNamespacesSchemaLocations(org.eclipse.emf.ecore.EObject root)
protected void
recordUnknownFeature(String prefix, String name, boolean isElement, org.eclipse.emf.ecore.EObject peekObject, String value)
protected void
reportUnknownFeature(String prefix, String name, boolean isElement, org.eclipse.emf.ecore.EObject peekObject, String value)
protected boolean
resolveObjectWithoutXsiType(String name, org.eclipse.emf.ecore.EObject peekObject)
protected AbstractStaxXmlParser.Attributes
setAttributes(Object attributes)
Sets the current attributes and returns the old ones.protected void
setAttribValue(org.eclipse.emf.ecore.EObject object, String name, String value, int index)
Create a feature with the given name for the given object with the given values.protected void
setExtendedMetaDataOption(Object extendedMetaDataOption)
protected void
setFeatureValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Object value)
protected void
setFeatureValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Object value, int position)
Set the given feature of the given object to the given value.protected void
setFeatureValues(AbstractStaxXmlParser.ManyReference reference)
Set the values for the given multi-valued forward reference.protected AbstractStaxXmlParser.Attributes
setNamespaces(Object namespaces)
Sets the current namespaces and returns the old ones.protected void
setNamespaceValue(String name, String value, int index)
protected void
setNodeEndLocation(INode node)
Обновляет для узлаnode
конечные координатыprotected void
setValueFromId(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference eReference, String ids)
protected void
setValueFromId(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference eReference, String ids, int attrIndex)
protected void
setXMIAttribValue(String name, String value, int index)
protected void
startDocument()
обработка начала документаprotected void
startElement()
Обработка начала элементаprotected void
storeAttributeNodeLocationInfo(org.eclipse.emf.ecore.EStructuralFeature feature, int index)
protected void
storeWhitespacesInformation(com.ctc.wstx.sr.BasicStreamReader2 reader2, AbstractFormattedNode attributeNode, int index)
protected void
validateCreateObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName, org.eclipse.emf.ecore.EObject newObject)
protected org.eclipse.emf.ecore.EObject
validateCreateObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName, org.eclipse.emf.ecore.EObject newObject, boolean top)
protected org.eclipse.emf.ecore.EObject
validateCreateObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName, org.eclipse.emf.ecore.EObject newObject, org.eclipse.emf.ecore.EStructuralFeature feature)
void
warning(org.eclipse.emf.ecore.xmi.XMIException e)
-
Methods inherited from class com._1c.g5.modeling.xml.parser.XmlParserAdapter
createDefaultHandler, load, load, load
-
-
-
-
Field Detail
-
ERROR_TYPE
protected static final String ERROR_TYPE
- See Also:
- Constant Field Values
-
OBJECT_TYPE
protected static final String OBJECT_TYPE
- See Also:
- Constant Field Values
-
UNKNOWN_FEATURE_TYPE
protected static final String UNKNOWN_FEATURE_TYPE
- See Also:
- Constant Field Values
-
DOCUMENT_ROOT_TYPE
protected static final String DOCUMENT_ROOT_TYPE
- See Also:
- Constant Field Values
-
NAMESPACES_PREFIX_MAP
protected static final String NAMESPACES_PREFIX_MAP
- See Also:
- Constant Field Values
-
DEBUG_DEMANDED_PACKAGES
protected static final boolean DEBUG_DEMANDED_PACKAGES
- See Also:
- Constant Field Values
-
TYPE_ATTRIB
protected static final String TYPE_ATTRIB
- See Also:
- Constant Field Values
-
NIL_ATTRIB
protected static final String NIL_ATTRIB
- See Also:
- Constant Field Values
-
SCHEMA_LOCATION_ATTRIB
protected static final String SCHEMA_LOCATION_ATTRIB
- See Also:
- Constant Field Values
-
NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB
protected static final String NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB
- See Also:
- Constant Field Values
-
XMI_ELEMENT_TYPE
protected static final String XMI_ELEMENT_TYPE
- See Also:
- Constant Field Values
-
XMI_UUID
protected static final String XMI_UUID
- See Also:
- Constant Field Values
-
XMI_EXTENSION
protected static final String XMI_EXTENSION
- See Also:
- Constant Field Values
-
XMI_TYPE_ATTRIB
protected static final String XMI_TYPE_ATTRIB
- See Also:
- Constant Field Values
-
ID_ATTRIB
protected static final String ID_ATTRIB
- See Also:
- Constant Field Values
-
VERSION_ATTRIB
protected static final String VERSION_ATTRIB
- See Also:
- Constant Field Values
-
UUID_ATTRIB
protected static final String UUID_ATTRIB
- See Also:
- Constant Field Values
-
XMI_ELEMENT_NAME
protected static final String XMI_ELEMENT_NAME
- See Also:
- Constant Field Values
-
ARRAY_SIZE
protected static final int ARRAY_SIZE
- See Also:
- Constant Field Values
-
REFERENCE_THRESHOLD
protected static final int REFERENCE_THRESHOLD
- See Also:
- Constant Field Values
-
parseResult
protected ParseResult parseResult
-
isRoot
protected boolean isRoot
-
needsPushContext
protected boolean needsPushContext
-
documentRoot
protected org.eclipse.emf.ecore.EObject documentRoot
-
documentRootNode
protected DocumentRoot documentRootNode
-
rootNode
protected ContainmentReferenceNode rootNode
-
nodes
protected AbstractStaxXmlParser.MyStack<INode> nodes
-
xmlResource
protected org.eclipse.emf.ecore.xmi.XMLResource xmlResource
-
helper
protected org.eclipse.emf.ecore.xmi.XMLHelper helper
-
elements
protected AbstractStaxXmlParser.MyStack<QName> elements
-
types
protected AbstractStaxXmlParser.MyStack<Object> types
-
objects
protected AbstractStaxXmlParser.MyEObjectStack objects
-
mixedTargets
protected AbstractStaxXmlParser.MyStack<org.eclipse.emf.ecore.util.FeatureMap> mixedTargets
-
resourceSet
protected org.eclipse.emf.ecore.resource.ResourceSet resourceSet
-
resourceURI
protected org.eclipse.emf.common.util.URI resourceURI
-
extent
protected org.eclipse.emf.ecore.util.InternalEList<org.eclipse.emf.ecore.EObject> extent
-
deferredExtent
protected List<org.eclipse.emf.ecore.EObject> deferredExtent
-
sameDocumentProxies
protected List<org.eclipse.emf.ecore.InternalEObject> sameDocumentProxies
-
packageRegistry
protected org.eclipse.emf.ecore.EPackage.Registry packageRegistry
-
oldStyleProxyURIs
protected boolean oldStyleProxyURIs
-
xmlSchemaTypePackage
protected org.eclipse.emf.ecore.EPackage xmlSchemaTypePackage
-
anyType
protected org.eclipse.emf.ecore.EClass anyType
-
anySimpleType
protected org.eclipse.emf.ecore.EClass anySimpleType
-
contextFeature
protected org.eclipse.emf.ecore.EStructuralFeature contextFeature
-
hrefAttribute
protected String hrefAttribute
-
processAnyXML
protected boolean processAnyXML
-
processSchemaLocations
protected boolean processSchemaLocations
-
externalURIToLocations
protected Map<String,org.eclipse.emf.common.util.URI> externalURIToLocations
-
identifiers
protected Object[] identifiers
-
positions
protected int[] positions
-
forwardSingleReferences
protected List<AbstractStaxXmlParser.SingleReference> forwardSingleReferences
-
forwardManyReferences
protected List<AbstractStaxXmlParser.ManyReference> forwardManyReferences
-
capacity
protected int capacity
-
eObjectToExtensionMap
protected Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.xml.type.AnyType> eObjectToExtensionMap
-
deferIDREFResolution
protected boolean deferIDREFResolution
-
text
protected StringBuilder text
-
isIDREF
protected boolean isIDREF
-
isSimpleFeature
protected boolean isSimpleFeature
-
idAttribute
protected String idAttribute
-
isNamespaceAware
protected boolean isNamespaceAware
-
xmlMap
protected org.eclipse.emf.ecore.xmi.XMLResource.XMLMap xmlMap
-
extendedMetaData
protected org.eclipse.emf.ecore.util.ExtendedMetaData extendedMetaData
-
ecoreBuilder
protected org.eclipse.emf.ecore.xmi.EcoreBuilder ecoreBuilder
-
laxWildcardProcessing
protected boolean laxWildcardProcessing
-
resourceEntityHandler
protected org.eclipse.emf.ecore.xmi.XMLResource.ResourceEntityHandler resourceEntityHandler
-
recordUnknownFeature
protected boolean recordUnknownFeature
-
recordAnyTypeNSDecls
protected boolean recordAnyTypeNSDecls
-
usedNullNamespacePackage
protected boolean usedNullNamespacePackage
-
resolve
protected boolean resolve
-
useConfigurationCache
protected boolean useConfigurationCache
-
uriHandler
protected org.eclipse.emf.ecore.xmi.XMLResource.URIHandler uriHandler
-
disableNotify
protected boolean disableNotify
-
suppressDocumentRoot
protected boolean suppressDocumentRoot
-
useSymlink
protected boolean useSymlink
-
attribs
protected AbstractStaxXmlParser.Attributes attribs
-
namespaces
protected AbstractStaxXmlParser.Attributes namespaces
-
reader
protected XMLStreamReader reader
-
keepAttributeLocation
protected boolean keepAttributeLocation
-
-
Constructor Detail
-
AbstractStaxXmlParser
public AbstractStaxXmlParser()
-
AbstractStaxXmlParser
public AbstractStaxXmlParser(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)
-
-
Method Detail
-
init
public void init(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)
- Specified by:
init
in classXmlParserAdapter
-
getParseResult
public ParseResult getParseResult()
-
parse
public ParseResult parse(InputStream inputStream)
Метод для разбора xml документа.- Specified by:
parse
in interfaceIXmlParser
- Overrides:
parse
in classXmlParserAdapter
- Parameters:
inputStream
-useSymLinks
-options
-- Returns:
- экземпляр
ParseResult
-
error
public void error(org.eclipse.emf.ecore.xmi.XMIException e)
-
warning
public void warning(org.eclipse.emf.ecore.xmi.XMIException e)
-
fatalError
public void fatalError(org.eclipse.emf.ecore.xmi.XMIException e)
-
getRegistry
public org.eclipse.emf.ecore.EPackage.Registry getRegistry()
-
findInstantiableCompatible
protected org.eclipse.emf.ecore.EClass findInstantiableCompatible(org.eclipse.emf.ecore.EClass eType)
-
findSubTypeInEPackage
protected org.eclipse.emf.ecore.EClass findSubTypeInEPackage(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.ecore.EClass superType)
-
globalFindInstantiableCompatible
protected org.eclipse.emf.ecore.EClass globalFindInstantiableCompatible(org.eclipse.emf.ecore.EClass eType)
-
getStartLocation
protected final Location getStartLocation()
Метод для получения текущего положения курсора в тексте- Returns:
- координаты текущего положения курсора в тексте
-
setNodeEndLocation
protected final void setNodeEndLocation(INode node)
Обновляет для узлаnode
конечные координаты- Parameters:
node
- узел
-
createEcoreBuilder
protected org.eclipse.emf.ecore.xmi.EcoreBuilder createEcoreBuilder(Map<?,?> options, org.eclipse.emf.ecore.util.ExtendedMetaData extendedMetaData)
-
setExtendedMetaDataOption
protected void setExtendedMetaDataOption(Object extendedMetaDataOption)
-
initReader
protected void initReader(InputStream inputStream) throws FactoryConfigurationError
- Throws:
FactoryConfigurationError
-
endDocument
protected void endDocument()
Обработка конца документа
-
endElement
protected void endElement()
Обработка конца элемента
-
characters
protected void characters()
Обработка символов (whitespaces и прочее)
-
comment
protected void comment()
Обработка комментариев
-
startElement
protected void startElement()
Обработка начала элемента
-
startDocument
protected void startDocument()
обработка начала документа
-
handleMixedText
protected void handleMixedText()
-
handleComment
protected void handleComment(String comment)
-
isTextFeatureValue
protected boolean isTextFeatureValue(Object type)
-
setFeatureValue
protected void setFeatureValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Object value)
-
setFeatureValue
protected void setFeatureValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Object value, int position)
Set the given feature of the given object to the given value.
-
setFeatureValues
protected void setFeatureValues(AbstractStaxXmlParser.ManyReference reference)
Set the values for the given multi-valued forward reference.
-
createObjectFromTypeName
protected org.eclipse.emf.ecore.EObject createObjectFromTypeName(org.eclipse.emf.ecore.EObject peekObject, String typeQName, org.eclipse.emf.ecore.EStructuralFeature feature)
Create an object from the given qualified type name.
-
createObjectFromFeatureType
protected org.eclipse.emf.ecore.EObject createObjectFromFeatureType(org.eclipse.emf.ecore.EObject peekObject, org.eclipse.emf.ecore.EStructuralFeature feature)
Create an object based on the type of the given feature.
-
createObject
protected void createObject(org.eclipse.emf.ecore.EObject peekObject, org.eclipse.emf.ecore.EStructuralFeature feature, String xsiType)
Create an object based on the given feature and attributes.
-
createObjectFromFactory
@Deprecated protected org.eclipse.emf.ecore.EObject createObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName)
Deprecated.since 2.2 Create an object given a content helper, a factory, and a type name, and process the XML attributes.
-
handleUnknownFeature
protected void handleUnknownFeature(String prefix, String name, boolean isElement, org.eclipse.emf.ecore.EObject peekObject, String value)
-
resolveObjectWithoutXsiType
protected boolean resolveObjectWithoutXsiType(String name, org.eclipse.emf.ecore.EObject peekObject)
-
recordUnknownFeature
protected void recordUnknownFeature(String prefix, String name, boolean isElement, org.eclipse.emf.ecore.EObject peekObject, String value)
-
setAttribValue
protected void setAttribValue(org.eclipse.emf.ecore.EObject object, String name, String value, int index)
Create a feature with the given name for the given object with the given values.
-
storeAttributeNodeLocationInfo
protected void storeAttributeNodeLocationInfo(org.eclipse.emf.ecore.EStructuralFeature feature, int index)
-
storeWhitespacesInformation
protected void storeWhitespacesInformation(com.ctc.wstx.sr.BasicStreamReader2 reader2, AbstractFormattedNode attributeNode, int index)
-
handleProxy
protected void handleProxy(org.eclipse.emf.ecore.InternalEObject proxy, String uriLiteral, int index)
-
setAttributes
protected AbstractStaxXmlParser.Attributes setAttributes(Object attributes)
Sets the current attributes and returns the old ones.
-
setNamespaces
protected AbstractStaxXmlParser.Attributes setNamespaces(Object namespaces)
Sets the current namespaces and returns the old ones.
-
setValueFromId
protected void setValueFromId(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference eReference, String ids)
-
setValueFromId
protected void setValueFromId(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference eReference, String ids, int attrIndex)
-
findAppropriateQName
protected String findAppropriateQName(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference eReference)
-
createAttributeNodeForProxy
protected void createAttributeNodeForProxy(org.eclipse.emf.ecore.EReference eReference, int attrIndex, String id)
-
growArrays
protected void growArrays()
-
reportUnknownFeature
protected void reportUnknownFeature(String prefix, String name, boolean isElement, org.eclipse.emf.ecore.EObject peekObject, String value)
-
recordNamespacesSchemaLocations
protected org.eclipse.emf.common.util.EMap<String,String> recordNamespacesSchemaLocations(org.eclipse.emf.ecore.EObject root)
-
handleFeature
protected void handleFeature(String prefix, String name)
The XML element represents a feature. There are two cases to handle: 1. The feature has a type that is a datatype. 2. The feature has a type that is a class.
-
processFeature
protected void processFeature(org.eclipse.emf.ecore.EObject peekObject, org.eclipse.emf.ecore.EStructuralFeature feature, String xsiType)
-
getFeature
protected org.eclipse.emf.ecore.EStructuralFeature getFeature(org.eclipse.emf.ecore.EObject object, String prefix, String name, boolean isElement)
Get the EStructuralFeature from the metaObject for the given object and feature name.
-
getFeature
protected org.eclipse.emf.ecore.EStructuralFeature getFeature(org.eclipse.emf.ecore.EObject object, String prefix, String name)
-
getFactoryForPrefix
protected org.eclipse.emf.ecore.EFactory getFactoryForPrefix(String prefix)
-
handleObjectAttribs
protected void handleObjectAttribs(org.eclipse.emf.ecore.EObject obj)
Process the XML attributes for the newly created object.
-
getXsiType
protected abstract String getXsiType()
Returns the xsi type attribute's value.
-
createObject
protected org.eclipse.emf.ecore.EObject createObject(org.eclipse.emf.ecore.EFactory eFactory, org.eclipse.emf.ecore.EClassifier type, boolean documentRoot)
-
getExtension
protected org.eclipse.emf.ecore.xml.type.AnyType getExtension(org.eclipse.emf.ecore.EObject peekObject)
-
validateCreateObjectFromFactory
protected org.eclipse.emf.ecore.EObject validateCreateObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName, org.eclipse.emf.ecore.EObject newObject, org.eclipse.emf.ecore.EStructuralFeature feature)
-
validateCreateObjectFromFactory
protected org.eclipse.emf.ecore.EObject validateCreateObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName, org.eclipse.emf.ecore.EObject newObject, boolean top)
-
validateCreateObjectFromFactory
protected void validateCreateObjectFromFactory(org.eclipse.emf.ecore.EFactory factory, String typeName, org.eclipse.emf.ecore.EObject newObject)
-
processTopObject
protected void processTopObject(org.eclipse.emf.ecore.EObject object)
Add object to extent and call processObject.
-
getContentFeature
protected org.eclipse.emf.ecore.EStructuralFeature getContentFeature(org.eclipse.emf.ecore.EObject object)
-
processObject
protected void processObject(org.eclipse.emf.ecore.EObject object)
Add object to appropriate stacks.
-
createDocumentRoot
protected org.eclipse.emf.ecore.EObject createDocumentRoot(String prefix, String uri, String name, org.eclipse.emf.ecore.EFactory eFactory, boolean top)
-
createObjectByType
protected org.eclipse.emf.ecore.EObject createObjectByType(String prefix, String name, boolean top)
Create an object based on the prefix and type name.
-
getPackageForURI
protected org.eclipse.emf.ecore.EPackage getPackageForURI(String uriString)
Attempt to get the namespace for the given prefix, then return ERegister.getPackage() or null.
-
getLineNumber
protected int getLineNumber()
-
getColumnNumber
protected int getColumnNumber()
-
getLocation
protected String getLocation()
-
getCurrentLocation
protected Location getCurrentLocation()
-
handleMissingPackage
protected org.eclipse.emf.ecore.EPackage handleMissingPackage(String uriString)
-
getURIConverter
protected org.eclipse.emf.ecore.resource.URIConverter getURIConverter()
-
isError
protected boolean isError()
Returns true if there was an error in the last XML element; false otherwise.
-
isNull
protected boolean isNull()
Returns true if the xsi:nil attribute is in the list of attributes.
-
recordHeaderInformation
protected void recordHeaderInformation()
-
handleSchemaLocation
protected void handleSchemaLocation()
-
handleXSISchemaLocation
protected void handleXSISchemaLocation(String schemaLocations)
-
handleXSINoNamespaceSchemaLocation
protected void handleXSINoNamespaceSchemaLocation(String noNamespaceSchemaLocation)
-
handleForwardReferences
protected void handleForwardReferences()
-
handleForwardReferences
protected void handleForwardReferences(boolean isEndDocument)
Check if the values of the forward references have been set (they may have been set due to a bidirectional reference being set). If not, set them. If this is called during end document processing, errors should be diagnosed. If it is called in the middle of a document, we need to clean up the forward reference lists to avoid processing resolved references again later.
-
-