Interface ISymbolicNameService


  • public interface ISymbolicNameService
    Service responsible for generating and converting symbolic names that are used to represent cross-references in XML.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.eclipse.emf.common.util.URI convertSymbolicNameToUri​(String name, org.eclipse.emf.ecore.EObject contextObject, org.eclipse.emf.ecore.EReference contextFeature, String contextTopObjectFqn, IBmEngine engine, Version runtimeVersion)
      Converts the name used in the specific context to URI.
      String convertUriToCommonSymbolicName​(org.eclipse.emf.common.util.URI targetUri)
      Converts the specified URI to a common symbolic name (which is common to most usage contexts and uniquely identifies the object it belongs to, thus used when no context is specified).
      String generateSymbolicName​(org.eclipse.emf.ecore.EObject targetObject, org.eclipse.emf.ecore.EObject contextObject, org.eclipse.emf.ecore.EReference contextFeature)
      Generates symbolic name for the specified target object in the specified context (references to the same object may be represented in different ways depending on the usage context).
    • Method Detail

      • convertSymbolicNameToUri

        org.eclipse.emf.common.util.URI convertSymbolicNameToUri​(String name,
                                                                 org.eclipse.emf.ecore.EObject contextObject,
                                                                 org.eclipse.emf.ecore.EReference contextFeature,
                                                                 String contextTopObjectFqn,
                                                                 IBmEngine engine,
                                                                 Version runtimeVersion)
        Converts the name used in the specific context to URI. Symbolic names are not always globally unique, e.g. symbolic name of a derived field is the same as the symbolic name of its source. So in order to tell which object a symbolic name belongs to it is necessary to know the context the symbolic name is used in.
        Parameters:
        name - the name, may not be null.
        contextObject - the context object (referencing object), may not be null.
        contextFeature - the context feature, may not be null.
        contextTopObjectFqn - the context top object FQN, may not be null.
        engine - the BM engine, may not be null.
        runtimeVersion - the runtime version, may not be null.
        Returns:
        a non-null URI.
      • convertUriToCommonSymbolicName

        String convertUriToCommonSymbolicName​(org.eclipse.emf.common.util.URI targetUri)
        Converts the specified URI to a common symbolic name (which is common to most usage contexts and uniquely identifies the object it belongs to, thus used when no context is specified).
        Parameters:
        targetUri - The URI, may not be null.
        Returns:
        symbolic name or null in case the object identified by the speicified URI does not have a common symbolic name or the URI does not contain enough information to build the symbolic name.
      • generateSymbolicName

        String generateSymbolicName​(org.eclipse.emf.ecore.EObject targetObject,
                                    org.eclipse.emf.ecore.EObject contextObject,
                                    org.eclipse.emf.ecore.EReference contextFeature)
        Generates symbolic name for the specified target object in the specified context (references to the same object may be represented in different ways depending on the usage context).
        Parameters:
        targetObject - The target object, may not be null.
        contextObject - The context object, may not be null.
        contextFeature - The context feature, may not be null.
        Returns:
        symbolic name or null in case the target object cannot be indentified by a symbolic name in the specified context.