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 ISyntaxFactorygetSyntaxFactory(com.fasterxml.jackson.core.TreeNode metadataNode) Get the syntax factory mentioned in the provided metadata mapping.static ISyntaxFactorygetSyntaxFactory(com.fasterxml.jackson.core.TreeNode metadataNode, ISyntaxFactory defaultValue) Get the syntax factory mentioned in the provided metadata mapping.static ISyntaxFactorygetSyntaxFactory(String syntax) Get the syntax factory with the provided syntax name Default toDemoSyntaxFactoryif the syntax is not found.static ISyntaxFactorygetSyntaxFactory(String syntax, ISyntaxFactory defaultValue) Get the syntax factory with the provided syntax namestatic ISyntaxFactorygetSyntaxFactory(Map<String, String> metadata) Get the syntax factory mentioned in the provided metadata mapping.static ISyntaxFactorygetSyntaxFactory(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 toDemoSyntaxFactoryif the syntax is not found.- Parameters:
metadata- Metadata mapping- Returns:
- An
ISyntaxFactoryinstance
-
getSyntaxFactory
Get the syntax factory mentioned in the provided metadata mapping. Default toDemoSyntaxFactoryif the syntax is not found.- Parameters:
metadataNode- Metadata mapping as an intermediate treenode format- Returns:
- An
ISyntaxFactoryinstance
-
getSyntaxFactory
Get the syntax factory with the provided syntax name Default toDemoSyntaxFactoryif the syntax is not found.- Parameters:
syntax- Name of the syntax to get- Returns:
- An
ISyntaxFactoryinstance
-
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
ISyntaxFactoryinstance
-
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
ISyntaxFactoryinstance
-
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
ISyntaxFactoryinstance
-