Package org.wso2.carbon.registry.jcr

Examples of org.wso2.carbon.registry.jcr.RegistryNode


    }

    public byte[] getProcessImage(String processId) {

        QName qName = decode(processId);
        SVGInterface svg = createSVG(qName);
        return svg.toPNGBytes();
    }
View Full Code Here


    private SVGInterface createSVG(QName qName) {

        // generate new
        InputStream in = getBpelDescriptor(qName);

        SVGInterface svg = null;

        try {
            svg = BPEL2SVGUtil.generate(in);

            if (svg == null)
View Full Code Here

   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

                RegistryConstants.QUERIES_COLLECTION_PATH +
                "/custom-queries";
    }

    public Node storeAsNode(String s) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException {
        RegistryNode node = new RegistryNode(s, session);
        CollectionImpl subCollection = null;

        try {
            subCollection = (CollectionImpl) session.getUserRegistry().newCollection();
            subCollection.setDescription("nt:query");
            session.getUserRegistry().put(s, subCollection);

        } catch (RegistryException e) {
            e.printStackTrace();

        }
        node.nodeType = (RegistryNodeType) node.getParent().getPrimaryNodeType();
        node.setPrimaryType("nt:query");

        node.nodeType.setNode(node);

        return node;
    }
View Full Code Here

        return (RegistryNode) session.getItem(s + "/" + configNodeName);
    }

    public Node setActivity(Node node) throws UnsupportedRepositoryOperationException, RepositoryException {

        RegistryNode acNode = null;

        if (node == null) {

            currentActivityNodePath = "";
View Full Code Here

    public String[] getColumnNames() throws RepositoryException {
        return new String[0];
    }

    public RowIterator getRows() throws RepositoryException {
        RegistryNode regNode = null;
        Set<RegistryRow> rows = new HashSet<RegistryRow>();

        for (Object node : nodes) {
            RegistryRow row;
            regNode = (RegistryNode) node;
View Full Code Here

        Iterator it1 = result1.iterator();

        while (it1.hasNext()) {

            RegistryNode temp = (RegistryNode) it1.next();
            Iterator it2 = result2.iterator();

            while (it2.hasNext()) {

                if (temp.getPath().equals(((RegistryNode) it2.next()).getPath())) {
                    andResult.add(temp);
                }
            }
        }
View Full Code Here

        Iterator it1 = result1.iterator();
        Set tempSet = new HashSet();

        while (it1.hasNext()) {

            RegistryNode temp = (RegistryNode) it1.next();
            Iterator it2 = source_set.iterator();

            while (it2.hasNext()) {

                if (temp.getPath().equals(((RegistryNode) it2.next()).getPath())) {

                    tempSet.add(temp);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.registry.jcr.RegistryNode

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.