Package dk.gtz.graphedit.util
Class MetadataUtils
java.lang.Object
dk.gtz.graphedit.util.MetadataUtils
Static utility class for interacting with metadata
-
Method Summary
Modifier and TypeMethodDescriptionstatic ISyntaxFactory
getSyntaxFactory
(com.fasterxml.jackson.core.TreeNode metadataNode) Get the syntax factory mentioned in the provided metadata mapping.static ISyntaxFactory
getSyntaxFactory
(com.fasterxml.jackson.core.TreeNode metadataNode, ISyntaxFactory defaultValue) Get the syntax factory mentioned in the provided metadata mapping.static ISyntaxFactory
getSyntaxFactory
(String syntax) Get the syntax factory with the provided syntax name Default toDemoSyntaxFactory
if the syntax is not found.static ISyntaxFactory
getSyntaxFactory
(String syntax, ISyntaxFactory defaultValue) Get the syntax factory with the provided syntax namestatic ISyntaxFactory
getSyntaxFactory
(Map<String, String> metadata) Get the syntax factory mentioned in the provided metadata mapping.static ISyntaxFactory
getSyntaxFactory
(Map<String, String> metadata, ISyntaxFactory defaultValue) Get the syntax factory mentioned in the provided metadata mapping.
-
Method Details
-
getSyntaxFactory
Get the syntax factory mentioned in the provided metadata mapping. Default toDemoSyntaxFactory
if the syntax is not found.- Parameters:
metadata
- Metadata mapping- Returns:
- An
ISyntaxFactory
instance
-
getSyntaxFactory
Get the syntax factory mentioned in the provided metadata mapping. Default toDemoSyntaxFactory
if the syntax is not found.- Parameters:
metadataNode
- Metadata mapping as an intermediate treenode format- Returns:
- An
ISyntaxFactory
instance
-
getSyntaxFactory
Get the syntax factory with the provided syntax name Default toDemoSyntaxFactory
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 mappingdefaultValue
- 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 formatdefaultValue
- Returns this if the syntax is not found- Returns:
- An
ISyntaxFactory
instance
-
getSyntaxFactory
Get the syntax factory with the provided syntax name- Parameters:
syntax
- Name of the syntax to getdefaultValue
- Returns this if the syntax is not found- Returns:
- An
ISyntaxFactory
instance
-