// Path: src/main/java/org/ihtsdo/snomed/util/rf2/srsi/Relationship.java
// public static enum CHARACTERISTIC {
// 	STATED, INFERRED, ADDITIONAL
// };


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.io.output.NullOutputStream;
import org.ihtsdo.snomed.util.rf2.srsi.Relationship.CHARACTERISTIC;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
		this.additionalFile = additionalFile;
		this.outputFile = outputFile;
	}

	public static void main(String[] args) throws Exception {
		if (args.length < 4) {
			doHelp();
		}

		RelationshipProcessor rp = new RelationshipProcessor(args[0], args[1], args[2], args[3]);
		// Make sure we have a valid effectiveTime for output, before we start
		rp.outputEffectiveTime = extractEffectiveTime(args[3]);
		rp.loadRelationships();
		rp.substituteInferredRelationships();

		// Are we running in interactive mode? Query memory structures if so
		if (args.length == 5 && args[4].equals("-i")) {
			rp.goInteractive();
		}
	}

	/**
	 * Lookup the concept in both the stated and inferred graphs and output all the relationships (sorted naturally) for each
	 * 
	 * @param conceptSCTID
	 * @throws Exception
	 */
	private void outputConcept(Long conceptSCTID) throws Exception {

		// Output all the parents of this concept in the
// Path: src/main/java/org/ihtsdo/snomed/util/rf2/srsi/Relationship.java
// public static enum CHARACTERISTIC {
// 	STATED, INFERRED, ADDITIONAL
// };


// Path: src/main/java/org/ihtsdo/snomed/util/rf2/srsi/RelationshipProcessor.java
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.io.output.NullOutputStream;
import org.ihtsdo.snomed.util.rf2.srsi.Relationship.CHARACTERISTIC;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

		this.additionalFile = additionalFile;
		this.outputFile = outputFile;
	}

	public static void main(String[] args) throws Exception {
		if (args.length < 4) {
			doHelp();
		}

		RelationshipProcessor rp = new RelationshipProcessor(args[0], args[1], args[2], args[3]);
		// Make sure we have a valid effectiveTime for output, before we start
		rp.outputEffectiveTime = extractEffectiveTime(args[3]);
		rp.loadRelationships();
		rp.substituteInferredRelationships();

		// Are we running in interactive mode? Query memory structures if so
		if (args.length == 5 && args[4].equals("-i")) {
			rp.goInteractive();
		}
	}

	/**
	 * Lookup the concept in both the stated and inferred graphs and output all the relationships (sorted naturally) for each
	 * 
	 * @param conceptSCTID
	 * @throws Exception
	 */
	private void outputConcept(Long conceptSCTID) throws Exception {

		// Output all the parents of this concept in the
		Concept conceptInferred = Concept.getConcept(conceptSCTID, CHARACTERISTIC.INFERRED);