java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.aas.AasSpecSummary

public class AasSpecSummary extends Object
Summarizes a specification.
Author:
Holger Eichelberger, SSE
  • Field Details

    • version

      private de.iip_ecosphere.platform.support.Version version
    • projectName

      private String projectName
    • versionIdentifier

      private String versionIdentifier
    • specNumber

      private String specNumber
    • title

      private String title
    • types

      private List<AasType> types
    • enums

      private List<AasEnum> enums
  • Constructor Details

    • AasSpecSummary

      AasSpecSummary(List<AasType> types, List<AasEnum> enums)
      Creates a specification summary. Validates the input and potentially modifies it.
      Parameters:
      types - the types in the specification
      enums - the enums in the specification
  • Method Details

    • setIdentifier

      void setIdentifier(String projectName, String versionIdentifier, de.iip_ecosphere.platform.support.Version version, String title, String specNumber)
      Sets the identification.
      Parameters:
      projectName - the IVML project name
      versionIdentifier - the IDTA version identifier
      version - the numeric version
      title - the full title of the specification
      specNumber - the specification number
    • registerType

      private void registerType(Map<String,AasType> typeMap, Map<String,AasType> sIdTypeMap, String idShort, AasType type)
      Registers type.
      Parameters:
      typeMap - the idShort/type map to modify as a side effect
      sIdTypeMap - the semanticId/type map to modify as a side effect
      idShort - the idShort to use (typically the one of type but if being renamed, the old idShort before renaming)
      type - the type to register
    • validate

      private void validate()
      Validates the model information towards IVML postprocessing.
    • ensureUniqueFieldName

      private void ensureUniqueFieldName(Set<String> fieldIdShorts, AasField field)
      Ensures unique field idShort names. May modify the idShort of field.
      Parameters:
      fieldIdShorts - the collected/used idShorts of the fields of the same type so far
      field - the field to check
    • info

      private void info(boolean condition, String text, Object... args)
      Conditionally emits a warning.
      Parameters:
      condition - the condition, must be true for emitting the warning
      text - the text in logger style
      args - the arguments
    • validate

      private void validate(AasEnum en)
      Validates an enumeration specification.
      Parameters:
      en - the enumeration to validate
    • getProjectName

      public String getProjectName()
      Returns the IVML project name.
      Returns:
      the project name
    • getVersion

      public de.iip_ecosphere.platform.support.Version getVersion()
      Returns the numeric version of the specification.
      Returns:
      the version (if present, else null)
    • getVersionIdentifier

      public String getVersionIdentifier()
      Returns the IDTA version identifier.
      Returns:
      the version identifier
    • getTitle

      public String getTitle()
      Returns the full title of the specification.
      Returns:
      the full title of the specification
    • getTypesCount

      public int getTypesCount()
      Returns the number of types.
      Returns:
      the number of types
    • getMainSubmodel

      public Optional<AasType> getMainSubmodel()
      Returns the main submodel of the specification.
      Returns:
      the main submodel
    • types

      public Iterable<AasType> types()
      Returns the types in the specification.
      Returns:
      the types
    • enums

      public Iterable<AasEnum> enums()
      Returns the enumerations in the specification.
      Returns:
      the enumerations
    • getSpecNumber

      public String getSpecNumber()
      Returns the specification number.
      Returns:
      the specification number
    • printStatistics

      public void printStatistics(PrintStream out)
      Emits some model statistics onto out.
      Parameters:
      out - the output stream
    • getLogger

      private static de.iip_ecosphere.platform.support.logging.Logger getLogger()
      Returns the logger instance for this class.
      Returns:
      the logger instance