@Override protected void processElement(String name, String prefix, String localName) { if (EMOFExtendedMetaData.EXTENSION.equals(localName) && XMI2UMLResource.XMI_NS_URI.equals(helper.getURI(prefix)) && attribs != null && EcorePackage.eNS_URI.equals(attribs .getValue(EMOFExtendedMetaData.XMI_EXTENDER_ATTRIBUTE))) { types.push(ECORE_EXTENSION_TYPE); } else { super.processElement(name, prefix, localName); } }
@Override protected void processElement(String name, String prefix, String localName) { if (EMOFExtendedMetaData.EXTENSION.equals(localName) && XMI2UMLResource.XMI_NS_URI.equals(helper.getURI(prefix)) && attribs != null && UMLPackage.eNS_URI.equals(attribs .getValue(EMOFExtendedMetaData.XMI_EXTENDER_ATTRIBUTE))) { types.push(UML_EXTENSION_TYPE); } else { super.processElement(name, prefix, localName); } }
@Override protected void processElement(String name, String prefix, String localName) { if (EMOFExtendedMetaData.EXTENSION.equals(localName) && XMI2UMLResource.XMI_NS_URI.equals(helper.getURI(prefix)) && attribs != null && EcorePackage.eNS_URI.equals(attribs .getValue(EMOFExtendedMetaData.XMI_EXTENDER_ATTRIBUTE))) { types.push(ECORE_EXTENSION_TYPE); } else { super.processElement(name, prefix, localName); } }
elements.push(name); String prefix = "";
@Override protected void processElement(String name, String prefix, String localName) { if (localName.equals(XMIResource.XMI_TAG_NAME)) { types.push(XMI_ELEMENT_TYPE); String namespace = helper.getURI(XMIResource.XMI_NS); if (namespace != null && namespace.startsWith(XMIResource.XMI_NAMESPACE_PREFIX)) { ((XMIResource)xmlResource).setXMIVersion(namespace.substring(XMIResource.XMI_NAMESPACE_PREFIX.length())); } isRoot = false; } else if (isRoot) { String namespace = helper.getURI(XMIResource.XMI_NS); if (namespace != null && namespace.startsWith(XMIResource.XMI_NAMESPACE_PREFIX)) { ((XMIResource)xmlResource).setXMIVersion(namespace.substring(XMIResource.XMI_NAMESPACE_PREFIX.length())); } super.processElement(name, prefix, localName); } else { super.processElement(name, prefix, localName); } }
@Override protected void processElement(String name, String prefix, String localName) { if (localName.equals(XMIResource.XMI_TAG_NAME)) { types.push(XMI_ELEMENT_TYPE); String namespace = helper.getURI(XMIResource.XMI_NS); if (namespace != null && namespace.startsWith(XMIResource.XMI_NAMESPACE_PREFIX)) { ((XMIResource)xmlResource).setXMIVersion(namespace.substring(XMIResource.XMI_NAMESPACE_PREFIX.length())); } isRoot = false; } else if (isRoot) { String namespace = helper.getURI(XMIResource.XMI_NS); if (namespace != null && namespace.startsWith(XMIResource.XMI_NAMESPACE_PREFIX)) { ((XMIResource)xmlResource).setXMIVersion(namespace.substring(XMIResource.XMI_NAMESPACE_PREFIX.length())); } super.processElement(name, prefix, localName); } else { super.processElement(name, prefix, localName); } }
protected void processElement(String name, String prefix, String localName) { if (isRoot) { isRoot = false; recordHeaderInformation(); } if (isError()) { types.push(ERROR_TYPE); } else { if (objects.isEmpty()) { createTopObject(prefix, localName); } else { handleFeature(prefix, localName); } } }
protected void recordUnknownFeature(String prefix, String name, boolean isElement, EObject peekObject, String value) { if (isElement) { AnyType anyType = getExtension(peekObject); int objectsIndex = objects.size(); objects.push(anyType); int mixedTargetsIndex = mixedTargets.size(); mixedTargets.push(anyType.getAny()); int typesIndex = types.size(); types.push(UNKNOWN_FEATURE_TYPE); handleFeature(prefix, name); objects.remove(objectsIndex); mixedTargets.remove(mixedTargetsIndex); types.remove(typesIndex); } else { AnyType anyType = getExtension(peekObject); setAttribValue(anyType, prefix == null ? name : prefix + ":" + name, value); } }
protected void processElement(String name, String prefix, String localName) { if (isRoot) { isRoot = false; recordHeaderInformation(); } if (isError()) { types.push(ERROR_TYPE); } else { if (objects.isEmpty()) { createTopObject(prefix, localName); } else { handleFeature(prefix, localName); } } }
protected void recordUnknownFeature(String prefix, String name, boolean isElement, EObject peekObject, String value) { if (isElement) { AnyType anyType = getExtension(peekObject); int objectsIndex = objects.size(); objects.push(anyType); int mixedTargetsIndex = mixedTargets.size(); mixedTargets.push(anyType.getAny()); int typesIndex = types.size(); types.push(UNKNOWN_FEATURE_TYPE); handleFeature(prefix, name); objects.remove(objectsIndex); mixedTargets.remove(mixedTargetsIndex); types.remove(typesIndex); } else { AnyType anyType = getExtension(peekObject); setAttribValue(anyType, prefix == null ? name : prefix + ":" + name, value); } }
@Override protected void processElement(String name, String prefix, String localName) { if (EMOFExtendedMetaData.EXTENSION.equals(localName) && XMLContentHandlerImpl.isXMINamespace(helper.getURI(prefix))) { if (attribs != null && EcorePackage.eNS_URI.equals(attribs.getValue(EMOFExtendedMetaData.XMI_EXTENDER_ATTRIBUTE))) { types.push(ECORE_EXTENSION_TYPE); } else { types.push(ERROR_TYPE); } } else { super.processElement(name, prefix, localName); } }
@Override protected void processElement(String name, String prefix, String localName) { if (EMOFExtendedMetaData.EXTENSION.equals(localName) && XMLContentHandlerImpl.isXMINamespace(helper.getURI(prefix))) { if (attribs != null && EcorePackage.eNS_URI.equals(attribs.getValue(EMOFExtendedMetaData.XMI_EXTENDER_ATTRIBUTE))) { types.push(ECORE_EXTENSION_TYPE); } else { types.push(ERROR_TYPE); } } else { super.processElement(name, prefix, localName); } }
@Override protected void processObject(EObject object) { if (object != null) { EStructuralFeature valueFeature = getContentFeature(object); if (valueFeature != null) { text = new StringBuffer(); objects.push(object); types.push(valueFeature); return; } } super.processObject(object); }
@Override protected void processObject(EObject object) { if (object != null) { EStructuralFeature valueFeature = getContentFeature(object); if (valueFeature != null) { text = new StringBuffer(); objects.push(object); types.push(valueFeature); return; } } super.processObject(object); }
protected void reportUnknownFeature(String prefix, String name, boolean isElement, EObject peekObject, String value) { if (isElement) { types.push(ERROR_TYPE); } error (new FeatureNotFoundException (name, peekObject, getLocation(), getLineNumber(), getColumnNumber())); }
protected void reportUnknownFeature(String prefix, String name, boolean isElement, EObject peekObject, String value) { if (isElement) { types.push(ERROR_TYPE); } error (new FeatureNotFoundException (name, peekObject, getLocation(), getLineNumber(), getColumnNumber())); }