Class TransformerSupport

java.lang.Object
org.bigraphs.grgen.converter.TransformerSupport
Direct Known Subclasses:
BigraphTransformer, RuleTransformer, SignatureTransformer

public abstract class TransformerSupport extends Object
Abstract support class that provides support to other transformer-related classes It cannot be instantiated directly.

It is designed to be extended by direct implementations of BaseTransformer, e.g., BigraphTransformer, to provide support to their common subclasses.

Author:
Dominik Grzelak
  • Field Details

    • LINE_SEP

      protected String LINE_SEP
    • DEFAULT_WHITESPACE_CHAR

      protected char DEFAULT_WHITESPACE_CHAR
  • Constructor Details

    • TransformerSupport

      public TransformerSupport()
  • Method Details

    • assertCorrectClassType

      public void assertCorrectClassType(Class classType, Object instance) throws RuntimeException
      Throws:
      RuntimeException
    • assertPrimeAndGround

      public void assertPrimeAndGround(org.bigraphs.framework.core.impl.pure.PureBigraph bigraph) throws RuntimeException
      Throws:
      RuntimeException
    • createAbstractNodeClass

      protected String createAbstractNodeClass(String abstractNodeClassIdentifier)
    • createAbstractEdgeClass

      protected String createAbstractEdgeClass(String abstractEdgeClassIdentifier)
    • createNodeClass

      protected String createNodeClass(String nodeClassIdentifier)
    • createEdgeClass

      protected String createEdgeClass(String edgeClassIdentifier)
    • extendClass

      protected String extendClass(String classPrefix, String superClassIdentifier)
    • closeClassDefinition

      protected String closeClassDefinition(String classPrefix)
    • closeClassDefinitionWithAttributes

      protected String closeClassDefinitionWithAttributes(String classPrefix, String attributeList)
    • createNodeInstance

      protected String createNodeInstance(String classType, String name, String variable)
    • createNodeInstance

      protected String createNodeInstance(String classType, String name, String variable, int index)
    • createEdge

      protected String createEdge(String edgeClassType, String edgeVar, String nodeVariableLeft, String nodeVariableRight)
    • createVarTypeDecl

      protected String createVarTypeDecl(String varName, String type)
      Creates the variable varName:type
      Parameters:
      varName -
      type -
      Returns:
      the variable declaration
    • createVarTypeDeclWithComma

      protected String createVarTypeDeclWithComma(String varName, String nodeType)
      Creates the variable varName:nodeType;
      Parameters:
      varName -
      nodeType -
      Returns:
      the variable declaration
    • createVarTypeDeclWithComma

      protected String createVarTypeDeclWithComma(String varName, org.bigraphs.framework.core.Control nodeTypeAsControl)
    • nodeTypeOf

      protected String nodeTypeOf(org.bigraphs.framework.core.Control control)
    • createGraphlet

      protected String createGraphlet(String leftPart, String middlePart, String rightPart)
      Creates the graphlet leftPart -middlePart-> rightPart;
      Parameters:
      leftPart -
      middlePart -
      rightPart -
      Returns:
      the graphlet
    • openRuleModifierBlock

      protected String openRuleModifierBlock()
    • openRuleReplaceBlock

      protected String openRuleReplaceBlock()
    • closeBlock

      protected String closeBlock()