<commit_before>package org.opentosca.planbuilder.importer.context.impl;

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

import javax.xml.namespace.QName;

import org.oasis_open.docs.tosca.ns._2011._12.TDeploymentArtifact;
import org.oasis_open.docs.tosca.ns._2011._12.TImplementationArtifact;
import org.oasis_open.docs.tosca.ns._2011._12.TNodeTypeImplementation;
import org.oasis_open.docs.tosca.ns._2011._12.TRequiredContainerFeature;
import org.oasis_open.docs.tosca.ns._2011._12.TTag;
import org.opentosca.planbuilder.model.tosca.AbstractDeploymentArtifact;
import org.opentosca.planbuilder.model.tosca.AbstractImplementationArtifact;
import org.opentosca.planbuilder.model.tosca.AbstractNodeType;
import org.opentosca.planbuilder.model.tosca.AbstractNodeTypeImplementation;
import org.opentosca.planbuilder.model.tosca.AbstractTag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * <p>
 * This class implements a TOSCA NodeTypeImplementation, in particular an
 * AbstractNodeTypeImplementation
 * </p>
 * Copyright 2013 IAAS University of Stuttgart <br>
 * <br>
 *
 * @author <NAME> - <EMAIL>
 *
 */
public class NodeTypeImplementationImpl extends AbstractNodeTypeImplementation {

	private final static Logger LOG = LoggerFactory.getLogger(NodeTypeImplementationImpl.class);

	private DefinitionsImpl definitions;
	private TNodeTypeImplementation nodeTypeImpl;
	private List<AbstractTag> tags;
	private List<AbstractImplementationArtifact> ias;
	private List<AbstractDeploymentArtifact> das;


	/**
	 * Constructor
	 *
	 * @param nodeTypeImpl a JAXB TNodeTypeImplementation
	 * @param definitionsImpl a DefinitionsImpl
	 */
	public NodeTypeImplementationImpl(TNodeTypeImplementation nodeTypeImpl, DefinitionsImpl definitionsImpl) {
		this.definitions = definitionsImpl;
		this.nodeTypeImpl = nodeTypeImpl;
		this.tags = new ArrayList<AbstractTag>();
		this.ias = new ArrayList<AbstractImplementationArtifact>();
		this.das = new ArrayList<AbstractDeploymentArtifact>();
		this.initTags();
		this.initIas();
		this.initDas();
	}
	
	/**
	 * Initializes the internal IAs
	 */
	private void initIas() {
		if (this.nodeTypeImpl.getImplementationArtifacts() != null) {
			for (TImplementationArtifact artifact : this.nodeTypeImpl.getImplementationArtifacts().getImplementationArtifact()) {
				this.ias.add(new ImplementationArtifactImpl(artifact, this.definitions));
			}
		}
	}
	
	/**
	 * Initializes the internal DAs
	 */
	private void initDas() {
		if (this.nodeTypeImpl.getDeploymentArtifacts() != null) {
			for (TDeploymentArtifact artifact : this.nodeTypeImpl.getDeploymentArtifacts().getDeploymentArtifact()) {
				this.das.add(new DeploymentArtifactImpl(artifact, this.definitions));
			}
		}
	}
	<commit_msg>adds small logging call to NodeTypeImplementation<commit_after>package org.opentosca.planbuilder.importer.context.impl;

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

import javax.xml.namespace.QName;

import org.oasis_open.docs.tosca.ns._2011._12.TDeploymentArtifact;
import org.oasis_open.docs.tosca.ns._2011._12.TImplementationArtifact;
import org.oasis_open.docs.tosca.ns._2011._12.TNodeTypeImplementation;
import org.oasis_open.docs.tosca.ns._2011._12.TRequiredContainerFeature;
import org.oasis_open.docs.tosca.ns._2011._12.TTag;
import org.opentosca.planbuilder.model.tosca.AbstractDeploymentArtifact;
import org.opentosca.planbuilder.model.tosca.AbstractImplementationArtifact;
import org.opentosca.planbuilder.model.tosca.AbstractNodeType;
import org.opentosca.planbuilder.model.tosca.AbstractNodeTypeImplementation;
import org.opentosca.planbuilder.model.tosca.AbstractTag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * <p>
 * This class implements a TOSCA NodeTypeImplementation, in particular an
 * AbstractNodeTypeImplementation
 * </p>
 * Copyright 2013 IAAS University of Stuttgart <br>
 * <br>
 *
 * @author <NAME> - <EMAIL>
 *
 */
public class NodeTypeImplementationImpl extends AbstractNodeTypeImplementation {

	private final static Logger LOG = LoggerFactory.getLogger(NodeTypeImplementationImpl.class);

	private DefinitionsImpl definitions;
	private TNodeTypeImplementation nodeTypeImpl;
	private List<AbstractTag> tags;
	private List<AbstractImplementationArtifact> ias;
	private List<AbstractDeploymentArtifact> das;


	/**
	 * Constructor
	 *
	 * @param nodeTypeImpl a JAXB TNodeTypeImplementation
	 * @param definitionsImpl a DefinitionsImpl
	 */
	public NodeTypeImplementationImpl(TNodeTypeImplementation nodeTypeImpl, DefinitionsImpl definitionsImpl) {
		this.definitions = definitionsImpl;
		this.nodeTypeImpl = nodeTypeImpl;
		this.tags = new ArrayList<AbstractTag>();
		this.ias = new ArrayList<AbstractImplementationArtifact>();
		this.das = new ArrayList<AbstractDeploymentArtifact>();
		LOG.debug("Initializing NodeTypeImplementation {" + this.nodeTypeImpl.getTargetNamespace() + "}" + this.nodeTypeImpl.getName());
		this.initTags();
		this.initIas();
		this.initDas();
	}
	
	/**
	 * Initializes the internal IAs
	 */
	private void initIas() {		
		if (this.nodeTypeImpl.getImplementationArtifacts() != null) {
			for (TImplementationArtifact artifact : this.nodeTypeImpl.getImplementationArtifacts().getImplementationArtifact()) {
				this.ias.add(new ImplementationArtifactImpl(artifact, this.definitions));
			}
		}
	}
	
	/**
	 * Initializes the internal DAs
	 */
	private void initDas() {
		if (this.nodeTypeImpl.getDeploymentArtifacts() != null) {
			for (TDeploymentArtifact artifact : this.nodeTypeImpl.getDeploymentArtifacts().getDeploymentArtifact()) {
				this.das.add(new DeploymentArtifactImpl(artifact, this.definitions));
			}
		}
	}
	
{'fraction_non_alphanumeric': 0.10288648840092084, 'fraction_numerical': 0.012750132813883479, 'mean_word_length': 5.7398568019093075, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3116328', 'n_tokens_mistral': 1879, 'n_tokens_neox': 1745, 'n_words': 301}