<commit_before>package com.nedap.archie.adlparser.odin;

import com.fasterxml.jackson.databind.JavaType;
import com.nedap.archie.adlparser.antlr.AdlLexer;
import com.nedap.archie.adlparser.antlr.AdlParser;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.ANTLRInputStream;

import java.io.IOException;

/**
 * Created by pieter.bos on 02/11/15.
 */
public class OdinObjectParser {

    public static <T> T convert(AdlParser.Odin_textContext odin, Class<T> clazz) {
        try {
            return OdinToJsonConverter.getObjectMapper().readValue(new OdinToJsonConverter().convert(odin), clazz);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static <T> T convert(AdlParser.Odin_textContext odin, JavaType clazz) {
        try {

            return OdinToJsonConverter.getObjectMapper().readValue(new OdinToJsonConverter().convert(odin), clazz);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static <T> T convert(String odin, Class<T> clazz) {
        AdlLexer adlLexer = new AdlLexer(new ANTLRInputStream(odin));
        AdlParser parser = new AdlParser(new CommonTokenStream(adlLexer));
        return convert(parser.odin_text(), clazz);
    }
}<commit_msg>Add missing method in Odin Object parser<commit_after>package com.nedap.archie.adlparser.odin;

import com.fasterxml.jackson.databind.JavaType;
import com.nedap.archie.adlparser.antlr.AdlLexer;
import com.nedap.archie.adlparser.antlr.AdlParser;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.ANTLRInputStream;

import java.io.IOException;

/**
 * Created by pieter.bos on 02/11/15.
 */
public class OdinObjectParser {

    public static <T> T convert(AdlParser.Odin_textContext odin, Class<T> clazz) {
        try {
            return OdinToJsonConverter.getObjectMapper().readValue(new OdinToJsonConverter().convert(odin), clazz);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static <T> T convert(AdlParser.Odin_textContext odin, JavaType clazz) {
        try {
            return OdinToJsonConverter.getObjectMapper().readValue(new OdinToJsonConverter().convert(odin), clazz);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static <T> T convert(String odin, Class<T> clazz) {
        AdlLexer adlLexer = new AdlLexer(new ANTLRInputStream(odin));
        AdlParser parser = new AdlParser(new CommonTokenStream(adlLexer));
        return convert(parser.odin_text(), clazz);
    }

    public static <T> T convert(String odin, JavaType clazz) {
        AdlLexer adlLexer = new AdlLexer(new ANTLRInputStream(odin));
        AdlParser parser = new AdlParser(new CommonTokenStream(adlLexer));
        return convert(parser.odin_text(), clazz);
    }
}
{'fraction_non_alphanumeric': 0.10573600552868002, 'fraction_numerical': 0.0055286800276434, 'mean_word_length': 3.393019726858877, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4507772', 'n_tokens_mistral': 976, 'n_tokens_neox': 924, 'n_words': 189}