Package org.simplestructruedata.entities

Examples of org.simplestructruedata.entities.SSDObjectNode


    public String getServiceName() {
        return HPIDialogueConstants.SERVER_SHUTDOWN_SERVICE;
    }

    public SSDObjectNode getSSDParameters() {
        return new SSDObjectNode(HPIDialogueConstants.PARAMETERS);
    }
View Full Code Here


    public String getServiceName() {
        return HPIDialogueConstants.DESCRIBE_INVOKER_SERVICE;
    }

    public SSDObjectNode getSSDParameters() {
        SSDObjectNode parameters = new SSDObjectNode(HPIDialogueConstants.PARAMETERS);

        SSDObjectNode ssdInvoker = new SSDObjectNode(HPIDialogueConstants.INVOKER);
        ssdInvoker.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.ID, invoker.getId()));
        ssdInvoker.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.DESCRIPTION, invoker.getDescription()));

        SSDObjectArray ssdExecutables = new SSDObjectArray(HPIDialogueConstants.EXECUTABLES);
        if (invoker.getExecutables() != null && invoker.getExecutables().size() > 0) {
            for (int i = 0; i < invoker.getExecutables().size(); i++) {
                Executable executable = (Executable) invoker.getExecutables().elementAt(i);
                SSDObjectNode ssdExecutable = new SSDObjectNode(HPIDialogueConstants.EXECUTABLE);
                ssdExecutable.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.CANONICAL_PATH, executable.getCanonicalPath()));

                SSDObjectArray ssdParemeters = new SSDObjectArray(HPIDialogueConstants.PARAMETERS);
                if (executable.getParameters() != null && executable.getParameters().size() > 0) {
                    for (int p = 0; p < executable.getParameters().size(); p ++) {
                        Parameter parameter = (Parameter) executable.getParameters().elementAt(p);
                        SSDObjectNode ssdParemeter = new SSDObjectNode(HPIDialogueConstants.PARAMETER);
                        ssdParemeter.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.KEY, parameter.getKey()));
                        ssdParemeter.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.VALUE, parameter.getValue()));

                        ssdParemeters.addElement(ssdParemeter);
                    }
                }
View Full Code Here

    public String getServiceName() {
        return HPIDialogueConstants.EXECUTE_INVOKER_SERVICE;
    }

    public SSDObjectNode getSSDParameters() {
        return new SSDObjectNode(HPIDialogueConstants.PARAMETERS);
    }
View Full Code Here

    public String getServiceName() {
            return HPIDialogueConstants.LIST_INVOKERS_SERVICE;
    }

    public SSDObjectNode getSSDParameters() {
        SSDObjectNode parameters = new SSDObjectNode(HPIDialogueConstants.PARAMETERS);
        SSDObjectArray listInvokers = new SSDObjectArray(HPIDialogueConstants.LIST_INVOKERS);
        if (this.listInvokers != null && this.listInvokers.size() > 0) {
            for (int i = 0; i < this.listInvokers.size(); i++) {
                Invoker invoker = (Invoker) this.listInvokers.elementAt(i);
                SSDObjectNode ssdInvoker = new SSDObjectNode(HPIDialogueConstants.INVOKER);
                ssdInvoker.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.ID, invoker.getId()));
                ssdInvoker.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.DESCRIPTION, invoker.getDescription()));

                SSDObjectArray ssdExecutables = new SSDObjectArray(HPIDialogueConstants.EXECUTABLES);
                if (invoker.getExecutables() != null && invoker.getExecutables().size() > 0) {
                    for (int e = 0; e < invoker.getExecutables().size(); e++) {
                        Executable executable = (Executable) invoker.getExecutables().elementAt(e);
                        SSDObjectNode ssdExecutable = new SSDObjectNode(HPIDialogueConstants.EXECUTABLE);
                        ssdExecutable.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.CANONICAL_PATH, executable.getCanonicalPath()));

                        SSDObjectArray ssdParemeters = new SSDObjectArray(HPIDialogueConstants.PARAMETERS);
                        if (executable.getParameters() != null && executable.getParameters().size() > 0) {
                            for (int p =0; p < executable.getParameters().size(); p ++) {
                                Parameter parameter = (Parameter) executable.getParameters().elementAt(p);
                                SSDObjectNode ssdParemeter = new SSDObjectNode(HPIDialogueConstants.PARAMETER);
                                ssdParemeter.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.KEY, parameter.getKey()));
                                ssdParemeter.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.VALUE, parameter.getValue()));

                                ssdParemeters.addElement(ssdParemeter);
                            }
                        }
View Full Code Here

        return HPIDialogueConstants.RESPONSE_SERVICE;
    }

    public SSDContextManager getSSDServiceMessage() {
        SSDContextManager ssdCtx = SSDContextManager.build();
        SSDObjectNode hpiMessage = new SSDObjectNode(HPIDialogueConstants.HPI_MESSAGE);
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_TYPE, this.getServiceType()));
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_NAME, this.getServiceName()));
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.MESSAGE, this.getMessage()));
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.STATUS, this.getStatus().toString()));
        hpiMessage.addAttribute(this.getSSDParameters());
        ssdCtx.getRootObject().addAttribute(hpiMessage);
        return ssdCtx;
    }
View Full Code Here

    public String getServiceName() {
        return HPIDialogueConstants.LOGOFF_SERVICE;
    }

    public SSDObjectNode getSSDParameters() {
        return new SSDObjectNode(HPIDialogueConstants.PARAMETERS);
    }
View Full Code Here

    public String getServiceName() {
        return HPIDialogueConstants.LOGIN_SERVICE;
    }

    public SSDObjectNode getSSDParameters() {
        SSDObjectNode parameters = new SSDObjectNode(HPIDialogueConstants.PARAMETERS);
        parameters.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SESSION_ID, this.getSessionId()));
        return parameters;
    }
View Full Code Here

                    }
                    // special opens or closes braces characters
                    if (currentChar == SSDDefaultConstants.OPENS_BRACES) {
                        if (ctx.getCurrentObject() instanceof SSDObjectArray) {
                            SSDObjectArray objectArray = (SSDObjectArray)ctx.getCurrentObject();
                            ctx.addToHeap(new SSDObjectNode(objectArray.getNextIdentifier()));
                        } else {
                            ctx.addToHeap(new SSDObjectNode(string.getString()));
                        }
                        string.clear();
                        continue;
                    } else if (currentChar == SSDDefaultConstants.CLOSES_BRACES) {
                        ctx.closeObject();
View Full Code Here

        if (this.getCurrentObject() instanceof SSDRootObject) {
            return;
        }
        SSDObject object = this.getAboveObject();
        if (object instanceof SSDObjectNode) {
            SSDObjectNode nodeObject = (SSDObjectNode) object;
            nodeObject.addAttribute(this.getCurrentObject());
        } else if (object instanceof SSDObjectArray) {
            SSDObjectArray objectArray = (SSDObjectArray) object;
            objectArray.addElement(this.getCurrentObject());
        } else throw new SSDException("Invalid type to this point");
        this.currentReference--;
View Full Code Here

                SSDObjectLeaf objectLeaf = (SSDObjectLeaf)object;
                returning.append("\"");
                returning.append(SSDUtils.formatEscapes(objectLeaf.getValue()));
                returning.append("\"" + formatting.getNewLine());
            } else if (object instanceof SSDObjectNode) {
                SSDObjectNode objectNode = (SSDObjectNode)object;
                returning.append("{" + formatting.getNewLine());
                Vector attributes = new Vector();
                Enumeration oldAttributes = objectNode.getAttributes();
                while (oldAttributes.hasMoreElements()) {
                    attributes.addElement(oldAttributes.nextElement());
                }

                int attributeSize = attributes.size();
View Full Code Here

TOP

Related Classes of org.simplestructruedata.entities.SSDObjectNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.