All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yaoqiang.graph.io.graphml.GraphMLProxyAutoBoundsNode Maven / Gradle / Ivy

package org.yaoqiang.graph.io.graphml;

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

import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

/**
 * GraphMLProxyAutoBoundsNode
 * 
 * @author Shi Yaoqiang([email protected])
 */
public class GraphMLProxyAutoBoundsNode {

	private int activeRealizer;

	private List groupNodes = new ArrayList();

	public GraphMLProxyAutoBoundsNode(Element proxyAutoBoundsNodeElement) {
		NodeList realizers = proxyAutoBoundsNodeElement.getElementsByTagName(GraphMLConstants.YWORKS + GraphMLConstants.REALIZERS);
		if (realizers.getLength() > 0) {
			Element realizerElement = (Element) realizers.item(0);
			this.activeRealizer = Integer.parseInt(realizerElement.getAttribute(GraphMLConstants.ACTIVE));
			
			List groupNodeElements = GraphMLUtils.childsTags(realizerElement, GraphMLConstants.YWORKS + GraphMLConstants.GENERIC_GROUP_NODE);
			for (Element el : groupNodeElements) {
				GraphMLGenericNode node = new GraphMLGenericNode(el);
				groupNodes.add(node);
			}
		}
	}

	public int getActiveRealizer() {
		return activeRealizer;
	}

	public List getGroupNodes() {
		return groupNodes;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy