Class MetadataUtils

java.lang.Object
dk.gtz.graphedit.util.MetadataUtils

public class MetadataUtils extends Object
Static utility class for interacting with metadata
  • Method Details

    • getSyntaxFactory

      public static ISyntaxFactory getSyntaxFactory(Map<String,String> metadata)
      Get the syntax factory mentioned in the provided metadata mapping. Default to DemoSyntaxFactory if the syntax is not found.
      Parameters:
      metadata - Metadata mapping
      Returns:
      An ISyntaxFactory instance
    • getSyntaxFactory

      public static ISyntaxFactory getSyntaxFactory(com.fasterxml.jackson.core.TreeNode metadataNode)
      Get the syntax factory mentioned in the provided metadata mapping. Default to DemoSyntaxFactory if the syntax is not found.
      Parameters:
      metadataNode - Metadata mapping as an intermediate treenode format
      Returns:
      An ISyntaxFactory instance
    • getSyntaxFactory

      public static ISyntaxFactory getSyntaxFactory(String syntax)
      Get the syntax factory with the provided syntax name Default to DemoSyntaxFactory if the syntax is not found.
      Parameters:
      syntax - Name of the syntax to get
      Returns:
      An ISyntaxFactory instance
    • getSyntaxFactory

      public static ISyntaxFactory getSyntaxFactory(Map<String,String> metadata, ISyntaxFactory defaultValue)
      Get the syntax factory mentioned in the provided metadata mapping.
      Parameters:
      metadata - Metadata mapping
      defaultValue - Returns this if the syntax is not found
      Returns:
      An ISyntaxFactory instance
    • getSyntaxFactory

      public static ISyntaxFactory getSyntaxFactory(com.fasterxml.jackson.core.TreeNode metadataNode, ISyntaxFactory defaultValue)
      Get the syntax factory mentioned in the provided metadata mapping.
      Parameters:
      metadataNode - Metadata mapping as an intermediate treenode format
      defaultValue - Returns this if the syntax is not found
      Returns:
      An ISyntaxFactory instance
    • getSyntaxFactory

      public static ISyntaxFactory getSyntaxFactory(String syntax, ISyntaxFactory defaultValue)
      Get the syntax factory with the provided syntax name
      Parameters:
      syntax - Name of the syntax to get
      defaultValue - Returns this if the syntax is not found
      Returns:
      An ISyntaxFactory instance