// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/types/complex/DescriptionAttribute.java
// public final class DescriptionAttribute {
// 	private static final String DESCRIPTION = "Description";
// 	private AttributeDefinitionXHTML def;
// 
// 	DescriptionAttribute(XhtmlType type) throws DatatypeConfigurationException {
// 		def = ReqIF10Factory.eINSTANCE.createAttributeDefinitionXHTML();
// 		def.setIdentifier(IdentifierManager.generateIdentifier());
// 		def.setLongName(DESCRIPTION);
// 		def.setType(type.getDef());
// 		def.setLastChange(DateManager.getCurrentDate());
// 	}
// 
// 	public AttributeDefinitionXHTML getDef() {
// 		return this.def;
// 	}
// }
// 
// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/xhtml/XhtmlBuilder.java
// public class XhtmlBuilder {
// 	private Collection<XhtmlDivType> collection = new ArrayList<XhtmlDivType>();
// 
// 	public XhtmlBuilder append(ImageRefDTO ref) {
// 		XhtmlDivType d = XhtmlFactory.eINSTANCE.createXhtmlDivType();
// 
// 		ImageInformationProvider provider = new ImageInformationProvider();
// 
// 		try {
// 			ImageInformation info = provider.provideFor(ref.getUri());
// 			ImageDataUriProvider dataUriProvider = new ImageDataUriProvider();
// 
// 			XhtmlObjectType o = XhtmlFactory.eINSTANCE.createXhtmlObjectType();
// 			o.setClass("figure");
// 			o.setData(dataUriProvider.provideFor(info));
// 			o.setType(info.getMimeType());
// 			o.setWidth(Integer.valueOf(info.getWidth()).toString());
// 			o.setHeight(Integer.valueOf(info.getHeight()).toString());
// 			o.getBr().add(XhtmlFactory.eINSTANCE.createXhtmlBrType());
// 
// 			d.getObject().add(o);
// 		} catch (RuntimeException e) {
// 			XhtmlPType p = XhtmlFactory.eINSTANCE.createXhtmlPType();
// 			p.getXhtmlInlineMix().add(
// 					FeatureMapUtil.createTextEntry(e.getMessage()));
// 			d.getP().add(p);
// 		} catch (IOException e) {
// 			XhtmlPType p = XhtmlFactory.eINSTANCE.createXhtmlPType();
// 			p.getXhtmlInlineMix().add(
// 					FeatureMapUtil.createTextEntry(e.getMessage()));
// 			d.getP().add(p);
// 		}
// 
// 		this.collection.add(d);
// 		return this;
// 	}
// 
// 	public XhtmlBuilder append(final TextDTO txt) {
// 		XhtmlDivType d = XhtmlFactory.eINSTANCE.createXhtmlDivType();
// 		XhtmlPType p = XhtmlFactory.eINSTANCE.createXhtmlPType();
// 		final String[] lines = txt.getText().split("\n");
// 		for (int i = 0; i < lines.length; i++) {
// 			p.getXhtmlInlineMix().add(FeatureMapUtil.createTextEntry(lines[i]));
// 			if (i < lines.length - 1)
// 				p.getBr().add(XhtmlFactory.eINSTANCE.createXhtmlBrType());
// 		}
// 		d.getP().add(p);
// 		this.collection.add(d);
// 		return this;
// 	}
// 
// 	public XhtmlBuilder append(final XhtmlUlDTO dto) {
// 		XhtmlDivType d = XhtmlFactory.eINSTANCE.createXhtmlDivType();
// 		d.getUl().add(dto.getUl());
// 		this.collection.add(d);
// 		return this;
// 	}
// 
// 	public Collection<? extends XhtmlDivType> build() {
// 		return this.collection;
// 	}
// 
// 	public static XhtmlBuilder newInstance() {
// 		return new XhtmlBuilder();
// 	}
// 
// }


import org.eclipse.rmf.reqif10.AttributeValueXHTML;
import org.eclipse.rmf.reqif10.ReqIF10Factory;
import org.eclipse.rmf.reqif10.SpecObject;
import org.eclipse.rmf.reqif10.XhtmlContent;
import org.eclipse.rmf.reqif10.xhtml.XhtmlDivType;
import org.eclipse.rmf.reqif10.xhtml.XhtmlFactory;
import de.kay_muench.reqif10.reqifcompiler.types.complex.DescriptionAttribute;
import de.kay_muench.reqif10.reqifcompiler.xhtml.XhtmlBuilder;
/**
 * 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;



class DescriptionValue {
	private AttributeValueXHTML value;

	DescriptionValue(final DescriptionAttribute type,
			final SpecObject specObject) {
		value = ReqIF10Factory.eINSTANCE.createAttributeValueXHTML();
		value.setDefinition(type.getDef());
		specObject.getValues().add(value);
	}

// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/types/complex/DescriptionAttribute.java
// public final class DescriptionAttribute {
// 	private static final String DESCRIPTION = "Description";
// 	private AttributeDefinitionXHTML def;
// 
// 	DescriptionAttribute(XhtmlType type) throws DatatypeConfigurationException {
// 		def = ReqIF10Factory.eINSTANCE.createAttributeDefinitionXHTML();
// 		def.setIdentifier(IdentifierManager.generateIdentifier());
// 		def.setLongName(DESCRIPTION);
// 		def.setType(type.getDef());
// 		def.setLastChange(DateManager.getCurrentDate());
// 	}
// 
// 	public AttributeDefinitionXHTML getDef() {
// 		return this.def;
// 	}
// }
// 
// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/xhtml/XhtmlBuilder.java
// public class XhtmlBuilder {
// 	private Collection<XhtmlDivType> collection = new ArrayList<XhtmlDivType>();
// 
// 	public XhtmlBuilder append(ImageRefDTO ref) {
// 		XhtmlDivType d = XhtmlFactory.eINSTANCE.createXhtmlDivType();
// 
// 		ImageInformationProvider provider = new ImageInformationProvider();
// 
// 		try {
// 			ImageInformation info = provider.provideFor(ref.getUri());
// 			ImageDataUriProvider dataUriProvider = new ImageDataUriProvider();
// 
// 			XhtmlObjectType o = XhtmlFactory.eINSTANCE.createXhtmlObjectType();
// 			o.setClass("figure");
// 			o.setData(dataUriProvider.provideFor(info));
// 			o.setType(info.getMimeType());
// 			o.setWidth(Integer.valueOf(info.getWidth()).toString());
// 			o.setHeight(Integer.valueOf(info.getHeight()).toString());
// 			o.getBr().add(XhtmlFactory.eINSTANCE.createXhtmlBrType());
// 
// 			d.getObject().add(o);
// 		} catch (RuntimeException e) {
// 			XhtmlPType p = XhtmlFactory.eINSTANCE.createXhtmlPType();
// 			p.getXhtmlInlineMix().add(
// 					FeatureMapUtil.createTextEntry(e.getMessage()));
// 			d.getP().add(p);
// 		} catch (IOException e) {
// 			XhtmlPType p = XhtmlFactory.eINSTANCE.createXhtmlPType();
// 			p.getXhtmlInlineMix().add(
// 					FeatureMapUtil.createTextEntry(e.getMessage()));
// 			d.getP().add(p);
// 		}
// 
// 		this.collection.add(d);
// 		return this;
// 	}
// 
// 	public XhtmlBuilder append(final TextDTO txt) {
// 		XhtmlDivType d = XhtmlFactory.eINSTANCE.createXhtmlDivType();
// 		XhtmlPType p = XhtmlFactory.eINSTANCE.createXhtmlPType();
// 		final String[] lines = txt.getText().split("\n");
// 		for (int i = 0; i < lines.length; i++) {
// 			p.getXhtmlInlineMix().add(FeatureMapUtil.createTextEntry(lines[i]));
// 			if (i < lines.length - 1)
// 				p.getBr().add(XhtmlFactory.eINSTANCE.createXhtmlBrType());
// 		}
// 		d.getP().add(p);
// 		this.collection.add(d);
// 		return this;
// 	}
// 
// 	public XhtmlBuilder append(final XhtmlUlDTO dto) {
// 		XhtmlDivType d = XhtmlFactory.eINSTANCE.createXhtmlDivType();
// 		d.getUl().add(dto.getUl());
// 		this.collection.add(d);
// 		return this;
// 	}
// 
// 	public Collection<? extends XhtmlDivType> build() {
// 		return this.collection;
// 	}
// 
// 	public static XhtmlBuilder newInstance() {
// 		return new XhtmlBuilder();
// 	}
// 
// }


// Path: reqifcompiler/src/main/java/de/kay_muench/reqif10/reqifcompiler/DescriptionValue.java
import org.eclipse.rmf.reqif10.AttributeValueXHTML;
import org.eclipse.rmf.reqif10.ReqIF10Factory;
import org.eclipse.rmf.reqif10.SpecObject;
import org.eclipse.rmf.reqif10.XhtmlContent;
import org.eclipse.rmf.reqif10.xhtml.XhtmlDivType;
import org.eclipse.rmf.reqif10.xhtml.XhtmlFactory;
import de.kay_muench.reqif10.reqifcompiler.types.complex.DescriptionAttribute;
import de.kay_muench.reqif10.reqifcompiler.xhtml.XhtmlBuilder;

/**
 * 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;



class DescriptionValue {
	private AttributeValueXHTML value;

	DescriptionValue(final DescriptionAttribute type,
			final SpecObject specObject) {
		value = ReqIF10Factory.eINSTANCE.createAttributeValueXHTML();
		value.setDefinition(type.getDef());
		specObject.getValues().add(value);
	}

	void setDescription(final XhtmlBuilder builder) {