<commit_before>package am.userInterface.vertex;



import java.io.Serializable;
import java.util.ArrayList;
import java.util.Enumeration;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;

import am.GlobalStaticVariables;
import am.app.ontology.Node;

import com.hp.hpl.jena.ontology.OntModel;

/**
 * Vertex class contains all the information about the node or vertex of the XML tree.
 * Some of the information include tbe name of the vertex, the location on the canvas,
 * if the vertex is visible, if it is mapped, and the actual mapping.
 * 
 * @author <NAME>
 * @version 11/27/2004
 */
public class Vertex extends DefaultMutableTreeNode implements Serializable
{
	// instance variables 
	static int key =0;				// unique number assigned by the program
	static final long serialVersionUID = 1;
	private int arcHeight;			// arc height of the rectangular node
	private int arcWidth;			// arc width of the rectangular node
	private String description;		// description of the vertex
	private int height;				// height of the node/vertex
	private int id;					// assign the unique number here
	
	private OntModel ontModel;
	private String uri;
	private boolean isMapped;		// is the vertex mapped by the user
	private boolean isMappedByContext;	// is the vertex mapped by context
	private boolean isMappedByDef;		// is the vertex mapped by definition
	private boolean isSelected;		// is the node or vertex selected
	private boolean isVisible;		// is the node/vertex visible
	private String name;			// name of the vertex (may not be unique)
	private int nodeType;			// the type of node (global or local)
	//private VertexDescriptionPane vertexDescription; //stores the description of the OWL classes
	private int ontNode;		//the type of vertex; XML or OWL -> 0 for XML and 1 for OWL
	private String parentsDesc="";		// String the stores the parentsDesList
	private ArrayList parentsNameList;		// stores the names of the parents and grand parents of the vertex
	private ArrayList siblingsNameList;		// stores the names of siblings of the vertex
	private ArrayList parentsDescList;		// stores the Discriptions of the parents and grand parents of the vertex
	private ArrayList siblingsDescList;		// stores the Discriptions of siblings of the vertex
	private String parentsName= "";		// String the stores the parentsNameList
	private boolean shouldCollapse;	// keeps track if the node or vertex should collapse or not. 
	private String siblingsDesc = "";// String the stores the siblingsDescList
	private String siblingsName ="";	// String the stores the siblingsNameList
	private int width;				// width of the node/vertex
	private int x;					// coordinate x location on canvas
	
	private int x2; 				// coordinate x2 = x+width location on canvas
	private int y;					// coordinate y location on canvas
	private int y2; 				// coordinate y2 = y+width location on canvas	    
	
	private Node node;    //the node containing the ontology information of this vertex, there is a double link from the node to the vertex and from the vertex to the node.
	
	/*******************************************************************************************
	 /**
	  * Constructor for objects of class Vertex
	  * @param name 	name of the vertex
	  */
	public Vertex(String name, int sourceOrTarget)	{
		
		super(name);
		// initialize instance variables
		setID(key++);
		setName(name);
		setDesc("");
		this.ontModel = null;
		setIsMapped(false);
		setIsMappedByContext(false);
		setIsMappedByDef(false);
		setX(-1);
		setX2(-1);
		setY(-1);
		setY2(-1);<commit_msg>Cleaned up code to remove warnings.<commit_after>package am.userInterface.vertex;



import java.io.Serializable;
import javax.swing.tree.DefaultMutableTreeNode;
import am.GlobalStaticVariables;
import am.app.ontology.Node;
import com.hp.hpl.jena.ontology.OntModel;

/**
 * Vertex class contains all the information about the node or vertex of the XML tree.
 * Some of the information include tbe name of the vertex, the location on the canvas,
 * if the vertex is visible, if it is mapped, and the actual mapping.
 * 
 * @author <NAME>
 * @version 11/27/2004
 */
public class Vertex extends DefaultMutableTreeNode implements Serializable
{
	// instance variables 
	static int key =0;				// unique number assigned by the program
	static final long serialVersionUID = 1;
	private int arcHeight;			// arc height of the rectangular node
	private int arcWidth;			// arc width of the rectangular node
	private String description;		// description of the vertex
	private int height;				// height of the node/vertex
	private int id;					// assign the unique number here
	
	private OntModel ontModel;
	private String uri;
	private boolean isMapped;		// is the vertex mapped by the user
	private boolean isMappedByContext;	// is the vertex mapped by context
	private boolean isMappedByDef;		// is the vertex mapped by definition
	private boolean isSelected;		// is the node or vertex selected
	private boolean isVisible;		// is the node/vertex visible
	private String name;			// name of the vertex (may not be unique)
	private int nodeType;			// the type of node (global or local)
	//private VertexDescriptionPane vertexDescription; //stores the description of the OWL classes
	private int ontNode;		//the type of vertex; XML or OWL -> 0 for XML and 1 for OWL
	private boolean shouldCollapse;	// keeps track if the node or vertex should collapse or not. 
	private int width;				// width of the node/vertex
	private int x;					// coordinate x location on canvas
	
	private int x2; 				// coordinate x2 = x+width location on canvas
	private int y;					// coordinate y location on canvas
	private int y2; 				// coordinate y2 = y+width location on canvas	    
	
	private Node node;    //the node containing the ontology information of this vertex, there is a double link from the node to the vertex and from the vertex to the node.
	
	/*******************************************************************************************
	 /**
	  * Constructor for objects of class Vertex
	  * @param name 	name of the vertex
	  */
	public Vertex(String name, int sourceOrTarget)	{
		
		super(name);
		// initialize instance variables
		setID(key++);
		setName(name);
		setDesc("");
		this.ontModel = null;
		setIsMapped(false);
		setIsMappedByContext(false);
		setIsMappedByDef(false);
		setX(-1);
		setX2(-1);
		setY(-1);
		setY2(-1);
{'fraction_non_alphanumeric': 0.09845046173110032, 'fraction_numerical': 0.006886836750665206, 'mean_word_length': 3.6916299559471364, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3310368', 'n_tokens_mistral': 1872, 'n_tokens_neox': 1725, 'n_words': 772}