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

org.hpccsystems.ws.client.wrappers.XRefNodeWrapper Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 9.8.20-1
Show newest version
package org.hpccsystems.ws.client.wrappers;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class XRefNodeWrapper
{
    private final static String NAME_TAG = "name";
    private final static String STATUS_TAG = "status";
    private final static String MODIFIED_TAG = "modified";

    protected String name = null;
    protected String modified = null;
    protected String status = null;

    public XRefNodeWrapper (String name, String modified, String status)
    {
        this.name = name;
        this.modified = modified;
        this.status = status;
    }

    public XRefNodeWrapper (Node xrefnode)
    {
        populatenode(xrefnode);
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public void setModified(String modified)
    {
        this.modified = modified;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getName()
    {
        return name;
    }

    public String getModified()
    {
        return modified;
    }

    public String getStatus()
    {
        return status;
    }

    private void populatenode (Node currentNode)
    {
        if (currentNode != null)
        {
            try
            {
                NodeList currentChildren = currentNode.getChildNodes();

                for (int childindex = 0; childindex < currentChildren.getLength(); childindex++)
                {
                    Node childNode = currentChildren.item(childindex);
                    String tagName = childNode.getNodeName();
                    if (tagName.equalsIgnoreCase(NAME_TAG))
                    {
                        setName(childNode.getTextContent());
                    }
                    else if (tagName.equalsIgnoreCase(STATUS_TAG))
                    {
                        setStatus(childNode.getTextContent());
                    }
                    else if (tagName.equalsIgnoreCase(MODIFIED_TAG))
                    {
                        setModified(childNode.getTextContent());
                    }
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }
        }
    }

    @Override
    public String toString()
    {
        return "Name: " + name + " Modified: " + modified + " Status: " + status;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy