Interface ITemplateGenerator

    • Method Detail

      • getInputModel

        SModel getInputModel()
      • getOutputModel

        SModel getOutputModel()
      • areMappingsAvailable

        boolean areMappingsAvailable()
        Generally, mapping labels are not available till the end ot structure transformation, which may run in parallel threads and thus access to label would be unpredictable. Use this method to control retrieve of labels only, it's not suitable to tell whether it's possible to add new label
        Returns:
        true if it's proper time to query (!) for label
      • registerMappingLabel

        void registerMappingLabel​(SNode inputNode,
                                  String mappingName,
                                  SNode outputNode)
      • findOutputNodeByInputNodeAndMappingName

        @Nullable
        SNode findOutputNodeByInputNodeAndMappingName​(SNode inputNode,
                                                      @Nullable
                                                      String mappingName)
        Parameters:
        inputNode - node from almost any model that may have served as an input for a generator. We tolerate null value now, indicating we are looking for conditional root (takes no input to create one)
        mappingName - label of the transformation of interest. Null value is tolerated but would yield no result instantly.
        Returns:
        node created from the specified input and marked with the label.
      • findOutputNode

        @Nullable
        SNode findOutputNode​(@Nullable
                             SModel inputModel,
                             @Nullable
                             String mappingName)
        Parameters:
        inputModel - null is tolerated, mappings for the actual model are looked up
        mappingName - label of the transformation of interest. Null value is tolerated but would yield no result instantly.
        Returns:
        conditional root instantiated for the supplied model
      • findAllOutputNodesByInputNodeAndMappingName

        List<SNode> findAllOutputNodesByInputNodeAndMappingName​(SNode inputNode,
                                                                String mappingName)
      • findCopiedOutputNodeForInputNode

        SNode findCopiedOutputNodeForInputNode​(SNode inputNode)
      • isStrict

        boolean isStrict()