// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/IdentifierManager.java
// public final class IdentifierManager {
// 	private static boolean predictabilityEnabled = false;
// 	private static long predictableId = 1L;
// 
// 	public static void enablePredictableId() {
// 		predictabilityEnabled = true;
// 	}
// 
// 	public static String generateIdentifier() {
// 		if (predictabilityEnabled) {
// 			predictableId += 1L;
// 			return "" + predictableId;
// 		}
// 		return "requie-tool-" + UUID.randomUUID().toString();
// 	}
// }
// 
// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/dto/StatusDTO.java
// public final class StatusDTO extends EnumeratorDTO {
// 
// 	public static Integer DEFAULT = 0;
// 	public static List<? extends Enumerator> VALUES;
// 
// 	public static StatusDTO newInstance() {
// 		return new StatusDTO();
// 	}
// 
// }
// 
// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/types/simple/RequirementStatus.java
// public class RequirementStatus {
// 	private DatatypeDefinitionEnumeration def;
// 
// 	public RequirementStatus() {
// 		def = ReqIF10Factory.eINSTANCE.createDatatypeDefinitionEnumeration();
// 		def.setIdentifier(IdentifierManager.generateIdentifier());
// 		def.setLongName("T_ReqStatus");
// 
// 		for (Enumerator status : StatusDTO.VALUES) {
// 			EnumValue enumValue = ReqIF10Factory.eINSTANCE.createEnumValue();
// 			enumValue.setIdentifier(IdentifierManager.generateIdentifier());
// 			enumValue.setLongName(status.getLiteral());
// 
// 			EmbeddedValue embeddedValue = ReqIF10Factory.eINSTANCE
// 					.createEmbeddedValue();
// 			embeddedValue.setKey(BigInteger.valueOf(status.getValue()));
// 			embeddedValue.setOtherContent("");
// 
// 			enumValue.setProperties(embeddedValue);
// 
// 			def.getSpecifiedValues().add(enumValue);
// 		}
// 	}
// 
// 	public DatatypeDefinitionEnumeration getDef() {
// 		return def;
// 	}
// 
// }


import org.eclipse.rmf.reqif10.AttributeDefinitionEnumeration;
import org.eclipse.rmf.reqif10.ReqIF10Factory;
import de.kay_muench.reqif10.reqifcompiler.IdentifierManager;
import de.kay_muench.reqif10.reqifcompiler.dto.StatusDTO;
import de.kay_muench.reqif10.reqifcompiler.types.simple.RequirementStatus;
/**
 * Copyright (c) 2014 Kay Erik Münch.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.spdx.org/licenses/EPL-1.0
 * 
 * Contributors:
 *     Kay Erik Münch - initial API and implementation
 * 
 */
package de.kay_muench.reqif10.reqifcompiler.types.complex;



public final class RequirementStatusAttribute {
	private static final String STATUS = "Status";
	private AttributeDefinitionEnumeration def;

	public RequirementStatusAttribute(RequirementStatus type) {

		def = ReqIF10Factory.eINSTANCE.createAttributeDefinitionEnumeration();
		def.setIdentifier(IdentifierManager.generateIdentifier());
		def.setLongName(STATUS);
		def.setType(type.getDef());
		def.setMultiValued(false);

		EnumeratedAttributeValue statusValue = new EnumeratedAttributeValue(def);
// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/IdentifierManager.java
// public final class IdentifierManager {
// 	private static boolean predictabilityEnabled = false;
// 	private static long predictableId = 1L;
// 
// 	public static void enablePredictableId() {
// 		predictabilityEnabled = true;
// 	}
// 
// 	public static String generateIdentifier() {
// 		if (predictabilityEnabled) {
// 			predictableId += 1L;
// 			return "" + predictableId;
// 		}
// 		return "requie-tool-" + UUID.randomUUID().toString();
// 	}
// }
// 
// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/dto/StatusDTO.java
// public final class StatusDTO extends EnumeratorDTO {
// 
// 	public static Integer DEFAULT = 0;
// 	public static List<? extends Enumerator> VALUES;
// 
// 	public static StatusDTO newInstance() {
// 		return new StatusDTO();
// 	}
// 
// }
// 
// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/types/simple/RequirementStatus.java
// public class RequirementStatus {
// 	private DatatypeDefinitionEnumeration def;
// 
// 	public RequirementStatus() {
// 		def = ReqIF10Factory.eINSTANCE.createDatatypeDefinitionEnumeration();
// 		def.setIdentifier(IdentifierManager.generateIdentifier());
// 		def.setLongName("T_ReqStatus");
// 
// 		for (Enumerator status : StatusDTO.VALUES) {
// 			EnumValue enumValue = ReqIF10Factory.eINSTANCE.createEnumValue();
// 			enumValue.setIdentifier(IdentifierManager.generateIdentifier());
// 			enumValue.setLongName(status.getLiteral());
// 
// 			EmbeddedValue embeddedValue = ReqIF10Factory.eINSTANCE
// 					.createEmbeddedValue();
// 			embeddedValue.setKey(BigInteger.valueOf(status.getValue()));
// 			embeddedValue.setOtherContent("");
// 
// 			enumValue.setProperties(embeddedValue);
// 
// 			def.getSpecifiedValues().add(enumValue);
// 		}
// 	}
// 
// 	public DatatypeDefinitionEnumeration getDef() {
// 		return def;
// 	}
// 
// }


// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/types/complex/RequirementStatusAttribute.java
import org.eclipse.rmf.reqif10.AttributeDefinitionEnumeration;
import org.eclipse.rmf.reqif10.ReqIF10Factory;
import de.kay_muench.reqif10.reqifcompiler.IdentifierManager;
import de.kay_muench.reqif10.reqifcompiler.dto.StatusDTO;
import de.kay_muench.reqif10.reqifcompiler.types.simple.RequirementStatus;

/**
 * Copyright (c) 2014 Kay Erik Münch.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.spdx.org/licenses/EPL-1.0
 * 
 * Contributors:
 *     Kay Erik Münch - initial API and implementation
 * 
 */
package de.kay_muench.reqif10.reqifcompiler.types.complex;



public final class RequirementStatusAttribute {
	private static final String STATUS = "Status";
	private AttributeDefinitionEnumeration def;

	public RequirementStatusAttribute(RequirementStatus type) {

		def = ReqIF10Factory.eINSTANCE.createAttributeDefinitionEnumeration();
		def.setIdentifier(IdentifierManager.generateIdentifier());
		def.setLongName(STATUS);
		def.setType(type.getDef());
		def.setMultiValued(false);

		EnumeratedAttributeValue statusValue = new EnumeratedAttributeValue(def);
		statusValue.setValue(StatusDTO.DEFAULT);