Package es.bsc.dataclay.util.yaml
Class CustomRepresenter
- java.lang.Object
-
- org.yaml.snakeyaml.representer.BaseRepresenter
-
- org.yaml.snakeyaml.representer.Representer
-
- es.bsc.dataclay.util.yaml.CustomRepresenter
-
public class CustomRepresenter extends org.yaml.snakeyaml.representer.Representer
Custom helper class with dataClay special types representation.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Class<? extends Object>,org.yaml.snakeyaml.nodes.Tag>
classTags
static Pattern
MULTILINE_PATTERN
protected org.yaml.snakeyaml.DumperOptions.NonPrintableStyle
nonPrintableStyle
protected TimeZone
timeZone
-
Constructor Summary
Constructors Constructor Description CustomRepresenter()
Provide a dataClay specific adapted SnakeYAML Representer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.yaml.snakeyaml.nodes.Tag
addClassTag(Class<? extends Object> arg0, org.yaml.snakeyaml.nodes.Tag arg1)
protected org.yaml.snakeyaml.nodes.Tag
getTag(Class<?> arg0, org.yaml.snakeyaml.nodes.Tag arg1)
TimeZone
getTimeZone()
protected org.yaml.snakeyaml.nodes.NodeTuple
representJavaBeanProperty(Object javaBean, org.yaml.snakeyaml.introspector.Property property, Object propertyValue, org.yaml.snakeyaml.nodes.Tag customTag)
Do *NOT* remove "redundant" global tag for collections --Python needs them.void
setTimeZone(TimeZone arg0)
-
Methods inherited from class org.yaml.snakeyaml.representer.Representer
addTypeDescription, checkGlobalTag, getProperties, representJavaBean, setPropertyUtils
-
Methods inherited from class org.yaml.snakeyaml.representer.BaseRepresenter
getDefaultFlowStyle, getDefaultScalarStyle, getPropertyUtils, isExplicitPropertyUtils, represent, representData, representMapping, representScalar, representScalar, representSequence, setDefaultFlowStyle, setDefaultScalarStyle
-
-
-
-
Method Detail
-
representJavaBeanProperty
protected org.yaml.snakeyaml.nodes.NodeTuple representJavaBeanProperty(Object javaBean, org.yaml.snakeyaml.introspector.Property property, Object propertyValue, org.yaml.snakeyaml.nodes.Tag customTag)
Do *NOT* remove "redundant" global tag for collections --Python needs them.- Overrides:
representJavaBeanProperty
in classorg.yaml.snakeyaml.representer.Representer
- Parameters:
property
- - JavaBean propertynode
- - representation of the propertyobject
- - instance represented by the node
-
getTag
protected org.yaml.snakeyaml.nodes.Tag getTag(Class<?> arg0, org.yaml.snakeyaml.nodes.Tag arg1)
-
addClassTag
public org.yaml.snakeyaml.nodes.Tag addClassTag(Class<? extends Object> arg0, org.yaml.snakeyaml.nodes.Tag arg1)
-
getTimeZone
public TimeZone getTimeZone()
-
setTimeZone
public void setTimeZone(TimeZone arg0)
-
-