<commit_before>package net.sf.taverna.t2.lang.baclava;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Map;

import net.sf.taverna.t2.invocation.InvocationContext;
import net.sf.taverna.t2.lang.results.ResultsUtils;
import net.sf.taverna.t2.reference.ReferenceService;
import net.sf.taverna.t2.reference.T2Reference;

import org.embl.ebi.escience.baclava.DataThing;
import org.embl.ebi.escience.baclava.factory.DataThingFactory;
import org.embl.ebi.escience.baclava.factory.DataThingXMLFactory;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.Namespace;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;

/**
 * Handles the loading and saving of T2Reference data as Baclava documents
 * 
 * @author <NAME>
 * 
 */

public class BaclavaDocumentHandler {

	private Map<String, T2Reference> chosenReferences;<commit_msg>Included modified version of Baclava support<commit_after>package net.sf.taverna.t2.lang.baclava;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Map;

import net.sf.taverna.t2.invocation.InvocationContext;
import net.sf.taverna.t2.lang.baclava.factory.DataThingFactory;
import net.sf.taverna.t2.lang.baclava.factory.DataThingXMLFactory;
import net.sf.taverna.t2.lang.results.ResultsUtils;
import net.sf.taverna.t2.reference.ReferenceService;
import net.sf.taverna.t2.reference.T2Reference;

import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.Namespace;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;

/**
 * Handles the loading and saving of T2Reference data as Baclava documents
 * 
 * @author <NAME>
 * 
 */

public class BaclavaDocumentHandler {

	private Map<String, T2Reference> chosenReferences;
{'fraction_non_alphanumeric': 0.10952146028613714, 'fraction_numerical': 0.008880118401578688, 'mean_word_length': 5.479233226837061, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3231747', 'n_tokens_mistral': 727, 'n_tokens_neox': 708, 'n_words': 126}