Newer
Older
AlgebraicDataflowArchitectureModel / AlgebraicDataflowArchitectureModel / src / models / webServices / Service.java
k-fujii on 24 Apr 2023 2 KB refactored
package models.webServices;

import java.util.ArrayList;
import java.util.List;

import models.dataConstraintModel.IdentifierTemplate;

public class Service {
	private String name = null;
	private String baseURL = null;
	private ArrayList<IdentifierTemplate> identifireTemplates = null;

	/**--------------------------------------------------------------------------------
	 * [Constructor]
	/**--------------------------------------------------------------------------------
	 * identifireTemplates are Empty
	 * 
	 * @param name : it's Web services name.
	 */
	public Service(final String name, final String baseURL) {
		this.name = name;
		this.baseURL = baseURL;
		this.identifireTemplates = new ArrayList<>();
	}

	/**--------------------------------------------------------------------------------
	 * 
	 * @param name 				 : it's Web services name.
	 * @param identifierTemplates : the list of resources which formal model of DTRAM.
	 */
	public Service(final String name, final ArrayList<IdentifierTemplate> identifierTemplates) {
		this.name = name;
		this.identifireTemplates = identifierTemplates;
	}

	/**--------------------------------------------------------------------------------
	 * Copy Constructor
	 *
	 * @param name : it's Web services name.	
	 */
	private Service(final Service copy) {
		this.name = copy.name;
		this.baseURL = copy.baseURL;
		this.identifireTemplates = copy.identifireTemplates;
	}

	/**--------------------------------------------------------------------------------
	 * [public]
	/**--------------------------------------------------------------------------------
	 * [getter] 
	 * 
	 * @return you'll get name of service.
	 */
	public String getName() {
		return this.name;
	}

	/**--------------------------------------------------------------------------------
	 * @return you'll get services's baseURL
	 */
	public String getBaseURL() {
		return this.baseURL;
	}

	/**--------------------------------------------------------------------------------
	 * @return you'll get list of an identifier template.
	 */
	public List<IdentifierTemplate> getIdentifierTemplates(){
		return this.identifireTemplates;
	}

	/**--------------------------------------------------------------------------------
	 * add new <identifierTemplate> to List
	 * 
	 * @param identifierTemplate
	 */
	public void addIdentifireTemplate(final IdentifierTemplate identifierTemplate) {
		this.identifireTemplates.add(identifierTemplate);
	}
}