<commit_before>package org.cytoscape.biopax.internal.action;

import java.io.OutputStream;

import org.cytoscape.io.CyFileFilter;
import org.cytoscape.io.write.CyNetworkViewWriterFactory;
import org.cytoscape.io.write.CyWriter;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.view.model.CyNetworkView;

public class ExportAsBioPAXTaskFactory implements CyNetworkViewWriterFactory {

	private final CyFileFilter filter;
	private CyNetwork network;
	private OutputStream outputStream;
	private final String fileName;

	public ExportAsBioPAXTaskFactory(String fileName, CyFileFilter filter) {
		this.filter = filter;
		this.fileName = fileName;
	}
	
	@Override
	public CyWriter getWriterTask() {
		return new ExportAsBioPAXTask(fileName, outputStream, network);
	}

	@Override
	public void setOutputStream(OutputStream outputStream) {
		this.outputStream = outputStream;
	}

	@Override
	public CyFileFilter getFileFilter() {
		return filter;
	}
	
	@Override
	public void setNetwork(CyNetwork network) {
		this.network = network;
	}

	@Override
	public void setNetworkView(CyNetworkView view) {
		this.network = view.getModel();
	}

}<commit_msg>first updates to make the write api more like normal task factories<commit_after>package org.cytoscape.biopax.internal.action;

import java.io.OutputStream;

import org.cytoscape.io.CyFileFilter;
import org.cytoscape.io.write.CyNetworkViewWriterFactory;
import org.cytoscape.io.write.CyWriter;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.view.model.CyNetworkView;

public class ExportAsBioPAXTaskFactory implements CyNetworkViewWriterFactory {

	private final CyFileFilter filter;
	private OutputStream outputStream;
	private final String fileName;

	public ExportAsBioPAXTaskFactory(String fileName, CyFileFilter filter) {
		this.filter = filter;
		this.fileName = fileName;
	}
	
	@Override
	public CyWriter getWriterTask(OutputStream outputStream, CyNetwork network) {
		return new ExportAsBioPAXTask(fileName, outputStream, network);
	}

	@Override
	public CyWriter getWriterTask(OutputStream outputStream, CyNetworkView view) {
		return new ExportAsBioPAXTask(fileName, outputStream, view.getModel());
	}

	@Override
	public CyFileFilter getFileFilter() {
		return filter;
	}
	
}
{'fraction_non_alphanumeric': 0.07774322523322967, 'fraction_numerical': 0.0, 'mean_word_length': 5.865853658536586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6349575', 'n_tokens_mistral': 731, 'n_tokens_neox': 673, 'n_words': 158}