Package org.enhydra.shark.xpdl.elements

Examples of org.enhydra.shark.xpdl.elements.Namespace


            ph.setVendor("Together");
        }
        ph.setCreated(Utils.getCurrentDateAndTime());

        Namespaces nss = pkg.getNamespaces();
        Namespace ns = createXPDLObject(nss, "", true);
        ns.setName("xpdl");
        ns.setLocation("http://www.wfmc.org/2002/XPDL1.0");
        adjustXPDLObject(pkg, type);

        return pkg;
    }
View Full Code Here


        }
        return fp;
    }

    public Namespace createXPDLObject(Namespaces nss, String type, boolean addToCollection) {
        Namespace ns = (Namespace) nss.generateNewElement();
        adjustType(ns, type);

        JaWETypes jts = JaWEManager.getInstance().getJaWEController().getJaWETypes();
        boolean hasTemplate = jts.hasTemplateId(type);
        if (hasTemplate) {
View Full Code Here

        Namespaces nss = pkg.getNamespaces();
        for (int i = 0; i < attribs.getLength(); i++) {
            Node n = attribs.item(i);
            String nn = n.getNodeName();
            if (nn.startsWith("xmlns:") && !nn.equals("xmlns:xsi")) {
                Namespace ns = (Namespace) nss.generateNewElement();
                ns.setName(nn.substring(6, nn.length()));
                fromXML(n, (XMLAttribute) ns.get("location"));
                nss.add(ns);
            }
        }
        fromXML(node, (XMLComplexElement) pkg);
    }
View Full Code Here

        Node node = parent.createElement(xpdlPrefix + pkg.toName());
        ((Element) node).setAttribute("xmlns", XMLUtil.XMLNS);
        // save additional namespaces
        Iterator itNs = pkg.getNamespaces().toElements().iterator();
        while (itNs.hasNext()) {
            Namespace ns = (Namespace) itNs.next();
            ((Element) node).setAttribute("xmlns:" + ns.getName(), ns.getLocation());
        }
        ((Element) node).setAttribute("xmlns:xsi", XMLUtil.XMLNS_XSI);
        ((Element) node).setAttribute("xsi:schemaLocation", XMLUtil.XSI_SCHEMA_LOCATION);

        toXML(node, pkg);
View Full Code Here

        if (JaWEManager.getInstance().getXPDLHandler().getXPDLRepositoryHandler().isXPDLPrefixEnabled()) {
            List l = pkg.getNamespaces().toElements();
            boolean hasxpdlns = false;
            for (int i = 0; i < l.size(); i++) {
                Namespace ns = (Namespace) l.get(i);
                String nsn = ns.getName();
                if (nsn.equals("xpdl")) {
                    hasxpdlns = true;
                    break;
                }
            }
            if (!hasxpdlns) {
                Namespaces nss = pkg.getNamespaces();
                XPDLObjectFactory xpdlof = JaWEManager.getInstance().getXPDLObjectFactory();
                Namespace ns = xpdlof.createXPDLObject(nss, "", false);
                ns.setName("xpdl");
                ns.setLocation("http://www.wfmc.org/2002/XPDL1.0");
                nss.add(ns);
                xpdlof.adjustXPDLObject(pkg, null);
                changed = true;
            }
        }
View Full Code Here

TOP

Related Classes of org.enhydra.shark.xpdl.elements.Namespace

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.