// Path: src/main/java/com/ojn/gexf4j/core/Edge.java
// public interface Edge extends SlicableDatum<Edge> {
// 
// 	String getId();
// 	
// 	Node getSource();
// 	
// 	Node getTarget();
// 	Edge setTarget(Node target);
// 	
// 	boolean hasLabel();
// 	Edge clearLabel();
// 	String getLabel();
// 	Edge setLabel(String label);
// 	
// 	boolean hasWeight();
// 	Edge clearWeight();
// 	float getWeight();
// 	Edge setWeight(float weight);
// 
// 	EdgeType getEdgeType();
// 	Edge setEdgeType(EdgeType edgeType);
// 
// 	boolean hasColor();
// 	Edge clearColor();
// 	Color getColor();
// 	Edge setColor(Color color);
// 
// 	boolean hasThickness();
// 	Edge clearThickness();
// 	float getThickness();
// 	Edge setThickness(float thickness);
// 
// 	EdgeShape getShape();
// 	Edge setShape(EdgeShape shape);	
// }
// 
// Path: src/main/java/com/ojn/gexf4j/core/viz/EdgeShape.java
// public enum EdgeShape {
// 
// 	SOLID,
// 	DOTTED,
// 	DASHED,
// 	DOUBLE,
// 	NOTSET,
// }


import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import com.ojn.gexf4j.core.Edge;
import com.ojn.gexf4j.core.viz.EdgeShape;
package com.ojn.gexf4j.core.impl.writer;



public class EdgeEntityWriter extends SlicableDatumEntityWriter<Edge> {
	private static final String ENTITY = "edge";
	private static final String ATTRIB_ID = "id";
	private static final String ATTRIB_LABEL = "label";
	private static final String ATTRIB_SOURCE = "source";
	private static final String ATTRIB_TARGET = "target";
	private static final String ATTRIB_WEIGHT = "weight";
	private static final String ATTRIB_TYPE = "type";
	
	public EdgeEntityWriter(XMLStreamWriter writer, Edge entity) {
		super(writer, entity);
		write();
	}
	
	@Override
	protected String getElementName() {
		return ENTITY;
	}

	@Override
	protected void writeElements() throws XMLStreamException {
		super.writeElements();
		
		if (entity.hasColor()) {
			new ColorEntityWriter(writer, entity.getColor());
		}
		
		if (entity.hasThickness()) {
			new ValueEntityWriter<Float>(writer,
					"viz:thickness",
					entity.getThickness());
		}
		
// Path: src/main/java/com/ojn/gexf4j/core/Edge.java
// public interface Edge extends SlicableDatum<Edge> {
// 
// 	String getId();
// 	
// 	Node getSource();
// 	
// 	Node getTarget();
// 	Edge setTarget(Node target);
// 	
// 	boolean hasLabel();
// 	Edge clearLabel();
// 	String getLabel();
// 	Edge setLabel(String label);
// 	
// 	boolean hasWeight();
// 	Edge clearWeight();
// 	float getWeight();
// 	Edge setWeight(float weight);
// 
// 	EdgeType getEdgeType();
// 	Edge setEdgeType(EdgeType edgeType);
// 
// 	boolean hasColor();
// 	Edge clearColor();
// 	Color getColor();
// 	Edge setColor(Color color);
// 
// 	boolean hasThickness();
// 	Edge clearThickness();
// 	float getThickness();
// 	Edge setThickness(float thickness);
// 
// 	EdgeShape getShape();
// 	Edge setShape(EdgeShape shape);	
// }
// 
// Path: src/main/java/com/ojn/gexf4j/core/viz/EdgeShape.java
// public enum EdgeShape {
// 
// 	SOLID,
// 	DOTTED,
// 	DASHED,
// 	DOUBLE,
// 	NOTSET,
// }


// Path: src/main/java/com/ojn/gexf4j/core/impl/writer/EdgeEntityWriter.java
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import com.ojn.gexf4j.core.Edge;
import com.ojn.gexf4j.core.viz.EdgeShape;

package com.ojn.gexf4j.core.impl.writer;



public class EdgeEntityWriter extends SlicableDatumEntityWriter<Edge> {
	private static final String ENTITY = "edge";
	private static final String ATTRIB_ID = "id";
	private static final String ATTRIB_LABEL = "label";
	private static final String ATTRIB_SOURCE = "source";
	private static final String ATTRIB_TARGET = "target";
	private static final String ATTRIB_WEIGHT = "weight";
	private static final String ATTRIB_TYPE = "type";
	
	public EdgeEntityWriter(XMLStreamWriter writer, Edge entity) {
		super(writer, entity);
		write();
	}
	
	@Override
	protected String getElementName() {
		return ENTITY;
	}

	@Override
	protected void writeElements() throws XMLStreamException {
		super.writeElements();
		
		if (entity.hasColor()) {
			new ColorEntityWriter(writer, entity.getColor());
		}
		
		if (entity.hasThickness()) {
			new ValueEntityWriter<Float>(writer,
					"viz:thickness",
					entity.getThickness());
		}
		
		if (entity.getShape() != EdgeShape.NOTSET) {