<commit_before>/*******************************************************************************
 * Copyright (C) 2007 The University of Manchester   
 * 
 *  Modifications to the initial code base are copyright of their
 *  respective authors, or their employers as appropriate.
 * 
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 *    
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *    
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 ******************************************************************************/
package net.sf.taverna.t2.workflowmodel.processor.activity.impl;

import java.util.Collections;
import java.util.List;

import net.sf.taverna.t2.reference.ExternalReferenceSPI;
import net.sf.taverna.t2.workflowmodel.AbstractPort;
import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityInputPort;

/**
 * An input port on an Activity instance. Simply used as a bean to hold port
 * name and depth properties.
 * 
 * @author <NAME>
 * @author <NAME>
 * 
 */
public class ActivityInputPortImpl extends AbstractPort implements
		ActivityInputPort {

	private Class<?> translatedElementClass;
	private List<Class<? extends ExternalReferenceSPI>> handledReferenceSchemes;
	boolean allowsLiteralValues;

	/**
	 * Constructs an Activity input port instance with the provided name and
	 * depth.
	 * 
	 * @param portName
	 * @param portDepth
	 */
	public ActivityInputPortImpl(String portName, int portDepth) {
		super(portName, portDepth);
	}

	/**
	 * Constructs an Activity input port with the provided name and depth,
	 * together with a list of predetermined annotations.
	 * 
	 * @param portName
	 * @param portDepth
	 */
	public ActivityInputPortImpl(String portName, int portDepth,
			boolean allowsLiteralValues,
			List<Class<? extends ExternalReferenceSPI>> handledReferenceSchemes,
			Class<?> translatedElementClass) {
		this(portName, portDepth);
		this.allowsLiteralValues = allowsLiteralValues;
		this.handledReferenceSchemes = handledReferenceSchemes;
		this.translatedElementClass = translatedElementClass;
	}

	public boolean allowsLiteralValues() {
		return this.allowsLiteralValues();
	}

	public List<Class<? extends ExternalReferenceSPI>> getHandledReferenceSchemes() {
		return Collections.unmodifiableList(this.handledReferenceSchemes);
	}

	public Class<?> getTranslatedElementClass() {
		return this.translatedElementClass;
	}

}<commit_msg>Infinite recursion stopped<commit_after>/*******************************************************************************
 * Copyright (C) 2007 The University of Manchester   
 * 
 *  Modifications to the initial code base are copyright of their
 *  respective authors, or their employers as appropriate.
 * 
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 *    
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *    
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 ******************************************************************************/
package net.sf.taverna.t2.workflowmodel.processor.activity.impl;

import java.util.Collections;
import java.util.List;

import net.sf.taverna.t2.reference.ExternalReferenceSPI;
import net.sf.taverna.t2.workflowmodel.AbstractPort;
import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityInputPort;

/**
 * An input port on an Activity instance. Simply used as a bean to hold port
 * name and depth properties.
 * 
 * @author <NAME>
 * @author <NAME>
 * 
 */
public class ActivityInputPortImpl extends AbstractPort implements
		ActivityInputPort {

	private Class<?> translatedElementClass;
	private List<Class<? extends ExternalReferenceSPI>> handledReferenceSchemes;
	boolean allowsLiteralValues;

	/**
	 * Constructs an Activity input port instance with the provided name and
	 * depth.
	 * 
	 * @param portName
	 * @param portDepth
	 */
	public ActivityInputPortImpl(String portName, int portDepth) {
		super(portName, portDepth);
	}

	/**
	 * Constructs an Activity input port with the provided name and depth,
	 * together with a list of predetermined annotations.
	 * 
	 * @param portName
	 * @param portDepth
	 */
	public ActivityInputPortImpl(String portName, int portDepth,
			boolean allowsLiteralValues,
			List<Class<? extends ExternalReferenceSPI>> handledReferenceSchemes,
			Class<?> translatedElementClass) {
		this(portName, portDepth);
		this.allowsLiteralValues = allowsLiteralValues;
		this.handledReferenceSchemes = handledReferenceSchemes;
		this.translatedElementClass = translatedElementClass;
	}

	public boolean allowsLiteralValues() {
		return this.allowsLiteralValues;
	}

	public List<Class<? extends ExternalReferenceSPI>> getHandledReferenceSchemes() {
		return Collections.unmodifiableList(this.handledReferenceSchemes);
	}

	public Class<?> getTranslatedElementClass() {
		return this.translatedElementClass;
	}

}
{'fraction_non_alphanumeric': 0.12246946628743517, 'fraction_numerical': 0.008030784674585912, 'mean_word_length': 4.753609239653513, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '4675777', 'n_tokens_mistral': 1633, 'n_tokens_neox': 1498, 'n_words': 552}