Class YamlSemanticCatalog

java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.YamlSemanticCatalog

public class YamlSemanticCatalog extends Object
A simple Yaml-based semantic catalog for testing/shipping with the platform.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A default Yaml-based resolver.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private List<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult>
    Returns the definitions.
    Reads a Yaml semantic catalog from an input stream.
    Reads a Yaml semantic catalog from an input stream logging IO exceptions.
    void
    setDefinitions(List<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> definitions)
    Defines the definitions.
    static Map<String,de.iip_ecosphere.platform.support.semanticId.SemanticIdResolutionResult>
    toMap(YamlSemanticCatalog catalog, Function<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult,de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> adjuster)
    Turns a semantic catalog into a resolution map.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • definitions

      private List<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> definitions
  • Constructor Details

    • YamlSemanticCatalog

      public YamlSemanticCatalog()
  • Method Details

    • getDefinitions

      public List<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> getDefinitions()
      Returns the definitions.
      Returns:
      the definitions
    • setDefinitions

      public void setDefinitions(List<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> definitions)
      Defines the definitions. [snakeyaml]
      Parameters:
      definitions - the definitions
    • read

      public static YamlSemanticCatalog read(InputStream input) throws IOException
      Reads a Yaml semantic catalog from an input stream.
      Parameters:
      input - the input stream
      Returns:
      the catalog
      Throws:
      IOException - if the catalog cannot be read
    • readSafe

      public static YamlSemanticCatalog readSafe(InputStream input)
      Reads a Yaml semantic catalog from an input stream logging IO exceptions.
      Parameters:
      input - the input stream
      Returns:
      the catalog
    • toMap

      public static Map<String,de.iip_ecosphere.platform.support.semanticId.SemanticIdResolutionResult> toMap(YamlSemanticCatalog catalog, Function<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult,de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> adjuster)
      Turns a semantic catalog into a resolution map.
      Parameters:
      catalog - the catalog
      adjuster - optional function to set, e.g., default values for a catalog (may be null)
      Returns:
      the resolution map