Class YamlSemanticCatalog.YamlBasedResolver

java.lang.Object
de.iip_ecosphere.platform.support.semanticId.SemanticIdResolver
de.iip_ecosphere.platform.support.iip_aas.YamlSemanticCatalog.YamlBasedResolver
Enclosing class:
YamlSemanticCatalog

public static class YamlSemanticCatalog.YamlBasedResolver extends de.iip_ecosphere.platform.support.semanticId.SemanticIdResolver
A default Yaml-based resolver.
Author:
Holger Eichelberger, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Map<String,de.iip_ecosphere.platform.support.semanticId.SemanticIdResolutionResult>
     
    private String
     
    private Predicate<String>
     

    Fields inherited from class de.iip_ecosphere.platform.support.semanticId.SemanticIdResolver

    ENGLISH, GERMAN, PLUGIN_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    YamlBasedResolver(String name, YamlSemanticCatalog catalog, Predicate<String> responsible, Function<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult,de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> adjuster)
    Creates an instance.
    YamlBasedResolver(String name, String resource, Predicate<String> responsible, Function<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult,de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> adjuster)
    Creates an instance based on a resource name ResourceLoader.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    isResponsible(String semanticId)
     
    de.iip_ecosphere.platform.support.semanticId.SemanticIdResolutionResult
     

    Methods inherited from class de.iip_ecosphere.platform.support.semanticId.SemanticIdResolver

    hasResolver, resolve

    Methods inherited from class java.lang.Object

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

    • name

      private String name
    • catalog

      private Map<String,de.iip_ecosphere.platform.support.semanticId.SemanticIdResolutionResult> catalog
    • responsible

      private Predicate<String> responsible
  • Constructor Details

    • YamlBasedResolver

      public YamlBasedResolver(String name, String resource, Predicate<String> responsible, Function<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult,de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> adjuster)
      Creates an instance based on a resource name ResourceLoader.
      Parameters:
      name - the print name of the resolver
      resource - the resource containing the catalog
      responsible - a predicate indicating responsibility
      adjuster - optional function to set, e.g., default values for a catalog (may be null)
    • YamlBasedResolver

      public YamlBasedResolver(String name, YamlSemanticCatalog catalog, Predicate<String> responsible, Function<de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult,de.iip_ecosphere.platform.support.semanticId.DefaultSemanticIdResolutionResult> adjuster)
      Creates an instance.
      Parameters:
      name - the print name of the resolver
      catalog - the catalog to use
      responsible - a predicate indicating responsibility
      adjuster - optional function to set, e.g., default values for a catalog (may be null)
  • Method Details

    • getName

      public String getName()
      Overrides:
      getName in class de.iip_ecosphere.platform.support.semanticId.SemanticIdResolver
    • resolveSemanticId

      public de.iip_ecosphere.platform.support.semanticId.SemanticIdResolutionResult resolveSemanticId(String semanticId)
      Specified by:
      resolveSemanticId in class de.iip_ecosphere.platform.support.semanticId.SemanticIdResolver
    • isResponsible

      public boolean isResponsible(String semanticId)
      Specified by:
      isResponsible in class de.iip_ecosphere.platform.support.semanticId.SemanticIdResolver