private static void signGraph() {
		Sign signer = new Sign();

		System.out
				.println("In order to sign a graph, you must first specicy some parameters.");

		String inputGraph = getStringValue("Please specify the filename of the graph to be signed:");
		GraphCollection gc = null;
		try {
			gc = TriGPlusReader.readFile(inputGraph, true);
		}
		catch (Exception e) {
			System.err
					.println("An unexpected error occured. The specified input file does not contain a valid set of graphs.");
			return;
		}

		String outputGraph = getStringValue("Please specify the filename of the signed output graph:");

		RSAKeyPair keyPair = null;
		String skFileName = getStringValue("Please specify the filename of the private key file:");
		String pkFileName = getStringValue("Please specify the filename of the public key file:");
		try {
			keyPair = new RSAKeyPair(skFileName, pkFileName);
		}
		catch (Exception e) {
			System.err
					.println("An unexpected error occured. The specified key files do not contain a valid key pair.");
			return;
		}

		SignatureAlgorithmInterface config = null;
		try {
			switch (getChoice(
					"Please specify the framework configuration to be used for signing the graph:",
					" (1) carroll-2003\n" + " (2) fisteus-2010\n"
							+ " (3) sayers-2004\n" + " (4) tummarello-2005", 4)) {
				case 1:
					config = SignatureAlgorithmList
							.getAlgorithm("carroll-2003");
					break;
				case 2:
					config = SignatureAlgorithmList
							.getAlgorithm("fisteus-2010");
					break;
				case 3:
					config = SignatureAlgorithmList.getAlgorithm("sayers-2004");
					break;
				case 4:
					config = SignatureAlgorithmList
							.getAlgorithm("tummarello-2005");
					break;
			}
		}
		catch (Exception e) {
			System.err
					.println("An unexpected error occured. The specified configuration is not available.");
			return;
		}

		try {
			signer.signGraph(keyPair.getKeyPair(), gc, outputGraph, config);
			System.out
					.println("The input graphs were successfully signed. The result is stored in the file '"
							+ outputGraph + "'.");
		}
		catch (Exception e) {
			System.err
					.println("An unexpected error occured. The graph could not be signed.");
			e.printStackTrace();
			return;
		}
	}