Package org.apache.stanbol.enhancer.nlp.json.valuetype

Examples of org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer.serialize()


    private ObjectNode writeValue(Value<?> value) {
        ObjectNode jValue;
        Class<?> valueType = value.value().getClass();
        ValueTypeSerializer vts = valueTypeSerializerRegistry.getSerializer(valueType);
        if(vts != null){
            jValue = vts.serialize(mapper,value.value());
            //TODO assert that jValue does not define "class" and "prob"!
        } else { //use the default binding and the "data" field
            jValue = mapper.createObjectNode();
            jValue.put("value", mapper.valueToTree(value.value()));
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.