class DualInputSemanticProperties implements SemanticProperties {

	public void addForwardedField(int input, int sourceField, int targetField) {

		Map<Integer, FieldSet> fieldMapping;

		if (input != 0 && input != 1) {
			throw new IndexOutOfBoundsException();
		} else if (input == 0) {
			fieldMapping = this.fieldMapping1;
		} else {
			fieldMapping = this.fieldMapping2;
		}

		if(isTargetFieldPresent(targetField, fieldMapping)) {
			throw new InvalidSemanticAnnotationException("Target field "+targetField+" was added twice to input "+input);
		}

		FieldSet targetFields = fieldMapping.get(sourceField);
		if (targetFields != null) {
			fieldMapping.put(sourceField, targetFields.addField(targetField));
		} else {
			fieldMapping.put(sourceField, new FieldSet(targetField));
		}
	}

	public  DualInputSemanticProperties();

}