org.infinispan.schematic.internal.schema
Class DocumentTransformer
java.lang.Object
org.infinispan.schematic.internal.schema.DocumentTransformer
public class DocumentTransformer
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentTransformer
public DocumentTransformer()
getSubstitutedProperty
public static String getSubstitutedProperty(String value,
DocumentTransformer.PropertyAccessor propertyAccessor)
- getSubstitutedProperty is called to perform the property substitution on the value.
- Parameters:
value
- propertyAccessor
-
- Returns:
- String
convertValuesWithMismatchedTypes
public static Document convertValuesWithMismatchedTypes(Document original,
SchemaLibrary.Results results)
- Return a copy of the supplied document that contains converted values for all of the fields (including in the nested
documents and arrays) that have values that are of the wrong type but can be converted to be of the correct type.
This method does nothing and returns the original document if there are no changes to be made.
- Parameters:
original
- the original document that contains fields with mismatched values; may not be nullresults
- the results of the JSON Schema validation
and which
contains the type mismatch errors
- Returns:
- the document with all of the conversions made the its fields and the fields of nested documents, or the original
document if there are no conversions to be made; never null
convertValuesWithMismatchedTypes
protected static Document convertValuesWithMismatchedTypes(Document original,
int level,
LinkedList<DocumentTransformer.Conversion> conversions)
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.