?? bicase.java
字號:
* Gets a NodeList of operator nodes.
* @return NodeList of operator nodes.
*/
public NodeList getOperatorNodeList() {
return m_OperatorNodeList;
}
/**
* Sets the operator node NodeList.
* @param a_NodeList operator node NodeList to be set.
*/
public void setOperatorNodeList(NodeList a_NodeList) {
m_OperatorNodeList = a_NodeList;
}
/**
* Gets an array of operator nodes.
* @return array of Nodes (OperatorNode).
*/
public Node[] getOperatorNodeListArray() {
return m_OperatorNodeList.getNodeListArray();
}
/**
* Gets the size of operator node NodeList.
* @return size of NodeList storing operator nodes.
*/
public int getOperatorNodeListSize() {
return m_OperatorNodeList.getNodeListSize();
}
/**
* Gets a NodeList of model nodes.
* @return NodeList of model nodes.
*/
public NodeList getModelNodeList() {
return m_ModelNodeList;
}
/**
* Sets the model node NodeList.
* @param a_NodeList model node NodeList to be set.
*/
public void setModelNodeList(NodeList aNodeList) {
m_ModelNodeList = aNodeList;
}
/**
* Gets an array of model nodes.
* @return array of Nodes (ModelNode).
*/
public Node[] getModelNodeListArray() {
return m_ModelNodeList.getNodeListArray();
}
/**
* Gets the size of model node NodeList.
* @return size of NodeList storing model nodes.
*/
public int getModelNodeListSize() {
return m_ModelNodeList.getNodeListSize();
}
/**
* Gets the Process of the case instance.
* @return Process of the case.
*/
public Process getProcess() {
return m_Process;
}
/**
* Sets Process of the case.
* @param a_Process the Process to be set into the case.
*/
public void setProcess(Process a_Process) {
m_Process = a_Process;
}
/**
* Gets all children of a Node.
* @param a_NodeID ID of the parent Node.
* @return a Vector of all children of a Node.
*/
public Vector getChildrenOfNode(String a_NodeID) {
return m_Process.getChildrenOfNode(a_NodeID);
}
/*
public Vector getRootNodes() {
Vector root = new Vector();
Node[] nodes = getOperatorNodeListArray();
for (int i = 0; i < nodes.length; i++) {
if (getParentOfNodes(nodes[i].getNodeID()).size() == 0)
root.addElement(nodes[i].getNodeID());
}
return root;
}
*/
/**
* Gets all parents of a Node.
* @param a_NodeID ID of the child Node.
* @return a Vector of all parents of a Node.
*/
public Vector getParentOfNodes(String a_NodeID) {
return m_Process.getParentsOfNode(a_NodeID);
}
/*
public int getPathLengthOfNode(String a_NodeID) {
int length = 0;
String nodeID = a_NodeID;
Vector children = getChildrenOfNode(nodeID);
while (children.size() > 0) {
length++;
Vector nodes = new Vector();
for (int i = 0; i < children.size(); i++) {
Vector childrenNode =
getChildrenOfNode((String) children.elementAt(i));
for (int j = 0; j < childrenNode.size(); j++)
nodes.addElement(childrenNode.elementAt(j));
}
children = nodes;
}
return length;
}
*/
/**
* Inserts a Connection between two nodes in the case.
* @param a_HeadNodeID ID of the parent node of the connection.
* @param a_TailNodeID ID of the child node of the connection.
* @return true if Connection between nodes is inserted successfully;
* false otherwise.
*/
public boolean insertConnection(String a_HeadNodeID, String a_TailNodeID) {
final boolean successInsert = m_Process.insertConnection(
a_HeadNodeID,
getOperatorNode(a_HeadNodeID).getMaxNumChild(),
a_TailNodeID,
getOperatorNode(a_TailNodeID).getMaxNumParent());
/*
if (successInsert)
{
Node headNode = getOperatorNode(a_HeadNodeID);
Node tailNode = getOperatorNode(a_TailNodeID);
tailNode.setInputMiningObject(headNode.getOutputMiningObject());
}
*/
return successInsert;
}
/**
* Removes a Connection between two nodes in the case.
* @param a_HeadNodeID ID of the parent node of the connection.
* @param a_TailNodeID ID of teh child node of the connection.
*/
public void removeConnection(String a_HeadNodeID, String a_TailNodeID) {
m_Process.removeConnectionBetweenNodes(a_HeadNodeID, a_TailNodeID);
}
/**
* Gets status of the case.
* @return status of the case.
*/
public String getStatus() {
return m_Status;
}
/**
* Sets status of the case.
* @param a_Status
*/
public void setStatus(String a_Status) {
m_Status = a_Status;
}
/**
* Gets access right of the case.
* @return access right of the case.
*/
public int getAccessRight() {
return m_AccessRight;
}
/**
* Sets access right of the case.
* @param a_Access access right to be set.
*/
public void setAccessRight(int a_Access) {
m_AccessRight = a_Access;
}
/**
* Gets version of the case.
* @return verion of the case.
*/
public int getVersion() {
return m_Version;
}
/**
* Sets version of the case.
* @param a_Version verion to be set.
*/
public void setVersion(int a_Version) {
m_Version = a_Version;
}
public int getNextAvailableNodeID(String a_Prefix)
{
int i = 0;
String id = null;
while (true)
{
id = a_Prefix + i;
if (!m_OperatorNodeList.containNodeID(id))
break;
i++;
}
return i;
}
/**
* Removes TaskNode from the case.
*/
private void removeTaskNode() {
m_TaskNode = null;
}
/**
* Gets a DataNode from the case.
* @param a_NodeID ID of the data node to be obtained.
* @return Node (DataNode).
*/
private Node getDataNode(String a_NodeID) {
if (a_NodeID == null)
System.err.println("In Case:getModelNode: node id is null");
return m_DataNodeList.getNode(a_NodeID);
}
/**
* Sets a DataNode in the case.
* @param a_Node DataNode to be set.
*/
private void setDataNode(DataNode a_Node) {
if (a_Node == null)
System.err.println("In Case:addModelNode: node is null");
if (a_Node.getNodeID() == null)
System.err.println("In Case:addModelNode: node id is null");
m_DataNodeList.setNode(a_Node.getNodeID(), a_Node);
}
/**
* Removes a DataNode from the NodeList of data nodes.
* @param a_NodeID ID of the DataNode to be removed from the list.
*/
private void removeDataNode(String a_NodeID) {
if (a_NodeID == null)
System.err.println("In Case:removeDataNode: node id is null");
m_DataNodeList.removeNode(a_NodeID);
}
/**
* Gets a OperatorNode from the case.
* @param a_NodeID ID of the operator node to be obtained.
* @return Node (OperatorNode).
*/
private Node getOperatorNode(String a_NodeID) {
if (a_NodeID == null)
System.err.println("In Case:getOperatorNode: node id is null");
return m_OperatorNodeList.getNode(a_NodeID);
}
/**
* Sets a OperatorNode in the case.
* @param a_Node OperatorNode to be set.
*/
public void setOperatorNode(IOperatorNode a_Node) {
if (a_Node == null)
System.err.println("In Case:addModelNode: node is null");
if (a_Node.getNodeID() == null)
System.err.println("In Case:addModelNode: node id is null");
m_OperatorNodeList.setOperatorNode(a_Node.getNodeID(), a_Node);
}
/**
* Removes a OperatorNode from the NodeList of operator nodes.
* @param a_NodeID ID of the OperatorNode to be removed from the list.
*/
private void removeOperatorNode(String a_NodeID) {
if (a_NodeID == null)
System.err.println("In Case:removeModelNode: node id is null");
m_OperatorNodeList.removeNode(a_NodeID);
m_Process.removeConnectionOfNode(a_NodeID);
}
/**
* Gets a OperatorNode from the case.
* @param a_NodeID ID of the operator node to be obtained.
* @return Node (OperatorNode).
*/
private Node getModelNode(String a_NodeID) {
if (a_NodeID == null)
System.err.println("In Case:getModelNode: node id is null");
return m_ModelNodeList.getNode(a_NodeID);
}
/**
* Sets a OperatorNode in the case.
* @param a_Node OperatorNode to be set.
*/
private void setModelNode(ModelNode a_Node) {
if (a_Node == null)
System.err.println("In Case:addModelNode: node is null");
if (a_Node.getNodeID() == null)
System.err.println("In Case:addModelNode: node id is null");
m_ModelNodeList.setNode(a_Node.getNodeID(), a_Node);
}
/**
* Removes a OperatorNode from the NodeList of operator nodes.
* @param a_NodeID ID of the OperatorNode to be removed from the list.
*/
private void removeModelNode(String a_NodeID) {
if (a_NodeID == null)
System.err.println("In Case:removeModelNode: node id is null");
m_ModelNodeList.removeNode(a_NodeID);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -