Class MetaModelTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.model.MetaModelTemplate

public class MetaModelTemplate extends AbstractReportingTemplate
This template can be used to initialize a meta model.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • MetaModelTemplate

      public MetaModelTemplate()
      Default constructor.
    • MetaModelTemplate

      public MetaModelTemplate(String name)
      Constructs the template with a new report.
      Parameters:
      name - The name of the module the model belongs to.
    • MetaModelTemplate

      public MetaModelTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, DomainValuesFactoryTemplate domainValuesFactory, String name)
      Constructs the template with the required parameters.
      Parameters:
      report - The initialization report that should be used to add errors and warnings to.
      domainValuesFactory - The domainValuesFactory used for external domains.
      name - The name of the module the model belongs to.
  • Method Details

    • getModuleName

      public String getModuleName()
      This method returns the module name.
      Returns:
      the module name, never null.
    • getAttribute

      public AttributeTemplate getAttribute(String attributeName)
      This method may be used to request the attribute template for the specified name.
      Parameters:
      attributeName - The name of the attribute whose template is requested.
      Returns:
      The attribute template for the specified name.
    • getEntity

      public EntityTemplate getEntity(String entityName)
    • getEntities

      protected Iterator<EntityTemplate> getEntities()
    • getAggregates

      public Iterator<AggregateTemplate> getAggregates()
    • addEntity

      public EntityTemplate addEntity(String name)
      This method may be used to add a non-singleton entity definition to the meta model.
      Parameters:
      name - The name of the entity that should be added.
      Returns:
      Entity template representing the added entity.
    • addEntity

      public EntityTemplate addEntity(String name, String parent, boolean singleton)
      This method may be used to add an entity definition to the meta model.
      Parameters:
      name - The name of the entity that should be added.
      parent - The name of the parent entity (optional).
      singleton - Boolean indicating if the added entity is a singleton.
      Returns:
      Entity template representing the added entity.
    • addAggregate

      public AggregateTemplate addAggregate(String name)
      This method may be used to add an aggregate definition to the meta model.
      Parameters:
      name - The name of the aggregate that should be added.
      Returns:
      Aggregate template representing the added aggregate.
    • addAggregate

      public AggregateTemplate addAggregate(String name, String functionalName)
      This method may be used to add an aggregate definition to the meta model.
      Parameters:
      name - The name of the aggregate that should be added.
      functionalName - The functional name of the aggregate that should be added.
      Returns:
      Aggregate template representing the added aggregate.
    • addStaticInstance

      public InstanceTemplate addStaticInstance(String entityName, String instanceName)
      This method may be used to add a static instance to the meta model.
      Parameters:
      entityName - The name of the entity of the static instance.
      instanceName - The name of the static instance.
      Returns:
      Instance template representing the added static instance.
    • getInstances

      protected Iterator<InstanceTemplate> getInstances()
    • getDomains

      protected Iterator<DomainTemplate> getDomains()
    • addDomain

      public DomainTemplate addDomain(String name)
      This method may be used to add a domain to the meta model.
      Parameters:
      name - The name of the domain that should be added.
      Returns:
      Domain template representing the domain that was added.
    • toDataSource

      public com.aquima.interactions.metamodel.ds.IMetaModelDS toDataSource()
      This method converts the template to a data source that can be used to initialize a meta model.
      Returns:
      a data source that can be used to initialize a meta model.
    • getDomainValuesFactory

      public DomainValuesFactoryTemplate getDomainValuesFactory()