org.hpccsystems.ws.client.wrappers.XRefFilePartWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wsclient Show documentation
Show all versions of wsclient Show documentation
This project allows a user to interact with ESP services in a controlled manner. The API calls available under org.hpccsystems.ws.client.platform allow for a user to target ESP's across multiple environments running a range of hpccsystems-platform versions. There is no guarantee that if a user utilizes org.hpccsystems.ws.client.gen generated stub code from wsdl, that the calls will be backwards compatible with older hpccsystems-platform versions.
package org.hpccsystems.ws.client.wrappers;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class XRefFilePartWrapper
{
private final static String NODE_TAG = "Node";
private final static String NUM_TAG = "Num";
private int num;
private String node;
public XRefFilePartWrapper(Node wsdfuxrefresp)
{
populatefilepart(wsdfuxrefresp);
}
private void populatefilepart(Node childNode)
{
if (childNode != null)
{
NodeList currentPartChildren = childNode.getChildNodes();
for (int partschildrenindex = 0; partschildrenindex < currentPartChildren.getLength(); partschildrenindex++)
{
Node partChildNode = currentPartChildren.item(partschildrenindex);
String childtagName = partChildNode.getNodeName();
if (childtagName.equalsIgnoreCase(NUM_TAG))
{
setNum(Integer.valueOf(partChildNode.getTextContent()));
}
else if (childtagName.equalsIgnoreCase(NODE_TAG))
{
setNode(partChildNode.getTextContent());
}
}
}
}
public int getNum()
{
return num;
}
public void setNum(int num)
{
this.num = num;
}
public String getNode()
{
return node;
}
public void setNode(String node)
{
this.node = node;
}
@Override
public String toString()
{
return "Num: " + num + " Node: " + node;
}
}