Class SysMLTextualNotationService

java.lang.Object
com.dassault_systemes.modeler.magic.sysml.textual.SysMLTextualNotationService

@OpenApiAll public final class SysMLTextualNotationService extends Object
Provides API for importing and exporting SysML textual notation for a given project or namespace.
  • Constructor Details

    • SysMLTextualNotationService

      public SysMLTextualNotationService()
  • Method Details

    • exportTextual

      public static String exportTextual(Namespace namespace)
      Exports the textual SysML representation of the specified Namespace.

      The TextualNotationBuilder service is looked up from the project that owns the given namespace. If the service is not available, an IllegalStateException is thrown.

      Parameters:
      namespace - the namespace to export to textual SysML notation; must belong to a ModelElementProject
      Returns:
      the textual SysML notation corresponding to the given namespace
      Throws:
      IllegalStateException - if no TextualNotationBuilder is registered for the namespace's project
    • importTextual

      public static void importTextual(ModelElementProject project, String sysmlText)
      Imports SysML textual notation into the specified project.
      Parameters:
      project - the target project that will receive the imported model
      sysmlText - the SysML textual notation to import; must not be null