com.microfocus.awm.meta.util

## Class TaurusXMLHelper

- java.lang.Object
- - org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl
  - - com.microfocus.awm.meta.util.TaurusXMLHelper

- All Implemented Interfaces:
    org.eclipse.emf.ecore.xmi.XMLHelper

      public class TaurusXMLHelper
      extends org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl

  Custom `XMLHelper` which creates AWM specific HREFs for `RToolInParameter`s in order to maintain parameter references if corresponding function packages are not available.

  It also creates legacy tool parameters for `LegacyToolDescriptor`s.

  Author:
    RalfP
  See Also:
    `getHREF(EObject)`, `XMLHelperImpl.createObject(EFactory, EClassifier)`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.xmi.XMLHelper

      `org.eclipse.emf.ecore.xmi.XMLHelper.ManyReference`

  - ### Field Summary

    - ### Fields inherited from interface org.eclipse.emf.ecore.xmi.XMLHelper

      `DATATYPE_IS_MANY, DATATYPE_SINGLE, IS_MANY_ADD, IS_MANY_MOVE, OTHER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaurusXMLHelper(TaurusResourceImpl pTaurusResourceImpl)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getHREF(org.eclipse.emf.ecore.EObject pObj)` Creates specific HREF strings for tool descriptor input parameters.

    - ### Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl

      `addPrefix, convertToString, createObject, createObject, deresolve, getAnyContentPrefixToURIMapping, getDanglingHREFException, getExtendedMetaData, getFeature, getFeature, getFeatureKind, getID, getIDREF, getJavaEncoding, getName, getNamespaceURI, getNoNamespacePackage, getPrefix, getPrefix, getPrefixes, getPrefixToNamespaceMap, getQName, getQName, getQName, getResource, getType, getURI, getValue, getXMLEncoding, getXMLMap, packages, popContext, popContext, populateNameInfo, populateNameInfo, populateNameInfo, pushContext, recordPrefixToURIMapping, resolve, saveString, setAnySimpleType, setCheckForDuplicates, setExtendedMetaData, setManyReference, setMustHavePrefix, setNoNamespacePackage, setOptions, setPrefixToNamespaceMap, setProcessDanglingHREF, setResource, setValue, setXMLMap`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaurusXMLHelper

          public TaurusXMLHelper(TaurusResourceImpl pTaurusResourceImpl)

      Constructor.
      Parameters:
        `pTaurusResourceImpl` - the resource instance

  - ### Method Detail

    - #### getHREF

          public java.lang.String getHREF(org.eclipse.emf.ecore.EObject pObj)

      Creates specific HREF strings for tool descriptor input parameters. They cannot be interpreted natively by EMF (only by `TaurusResourceImpl`) and have the following syntax:

      `#toolDescriptorID/@inputParm.index`

      The reason is that we want be able to maintain references to tool descriptor input parameters, even if their function package is not available. While EMF is natively able to maintain direct ID references to an object whose EClass is missing, this does not work for references to containments of this object (as an input parameter is a containment of its tool descriptor).
      With this special HREF we are able to reliably identify an unresolved tool descriptor and its targeted parameter.

      If the given `EObject` is an instance of `RToolInParameterUnresolved`, it means that the corresponding function package was already not available when the resource was loaded. But the instance contains all information we need to create the HREF as it has been serialized before.

      Specified by:
        `getHREF` in interface `org.eclipse.emf.ecore.xmi.XMLHelper`
      Overrides:
        `getHREF` in class `org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl`
      See Also:
        `TaurusResourceImpl.getEObject(String)`

Copyright © 2015 Micro Focus GmbH. All rights reserved.