Package com.attivio.util.serialization
Class SchemaConverter
- java.lang.Object
-
- com.attivio.util.serialization.AbstractConverter
-
- com.attivio.util.serialization.AbstractPlatformMessageConverter
-
- com.attivio.util.serialization.SchemaConverter
-
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter,com.thoughtworks.xstream.converters.ConverterMatcher
public class SchemaConverter extends AbstractPlatformMessageConverter
Serialize/deserialize schema
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLEGAL_FIELD_NAME_PATTERNPattern that field names must match.-
Fields inherited from class com.attivio.util.serialization.AbstractPlatformMessageConverter
log
-
Fields inherited from class com.attivio.util.serialization.AbstractConverter
mapper, NULL
-
-
Constructor Summary
Constructors Constructor Description SchemaConverter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanConvert(java.lang.Class clazz)static SchemaField.TypegetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String name, SchemaField.Type defaultType)Gets an SchemaField.Type attribute.static java.lang.ComparablegetComparable(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String name, SchemaField.Type type)Get an attribute's value as a typed comparable.static booleanisValidFieldName(java.lang.String fieldName)Deprecated.voidmarshal(java.lang.Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)static voidmarshalSchemaField(java.lang.String node, SchemaField field, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer)java.lang.Objectunmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)static SchemaFieldunmarshalSchemaField(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)-
Methods inherited from class com.attivio.util.serialization.AbstractPlatformMessageConverter
marshalMessage, unmarshalMessage
-
Methods inherited from class com.attivio.util.serialization.AbstractConverter
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, getAlias, getAlias, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getClass, getClass, getClassName, marshalArray, marshalArray, marshalArray2D, marshalIntArray, marshalIntArray, marshalList, marshalNode, marshalNode, marshalProperties, marshalProperties, readList, readSubObject, readThrowable, setMapper, unmarshalArray, unmarshalArray2D, unmarshalIntArray, unmarshalList, unmarshalNode, unmarshalNode, unmarshalNode, unmarshalNode, unmarshalProperties, unmarshalProperty, unmarshalPropertyName, unmarshalPropertyValue, writeSubObject, writeSubObject, writeThrowable
-
-
-
-
Field Detail
-
LEGAL_FIELD_NAME_PATTERN
public static final java.lang.String LEGAL_FIELD_NAME_PATTERN
Pattern that field names must match.- See Also:
- Constant Field Values
-
-
Method Detail
-
canConvert
public boolean canConvert(java.lang.Class clazz)
-
marshal
public void marshal(java.lang.Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
-
unmarshal
public java.lang.Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
marshalSchemaField
public static void marshalSchemaField(java.lang.String node, SchemaField field, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer)
-
unmarshalSchemaField
public static SchemaField unmarshalSchemaField(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)
-
isValidFieldName
@Deprecated public static boolean isValidFieldName(java.lang.String fieldName)
Deprecated.Tells whether the specified field name is valid.- Parameters:
fieldName- the field name- Returns:
- true if the field name is valid
-
getAttribute
public static SchemaField.Type getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String name, SchemaField.Type defaultType)
Gets an SchemaField.Type attribute.
-
getComparable
public static java.lang.Comparable getComparable(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String name, SchemaField.Type type)Get an attribute's value as a typed comparable.
-
-