Package org.apache.tuscany.sca.diagram.artifacts

Examples of org.apache.tuscany.sca.diagram.artifacts.ReferenceArtifact


            .hasNext();) {
            Entry<String, ArrayList<String>> entry = it.next();
            String compositeRef = entry.getKey();
            ArrayList<String> componentRef = entry.getValue();

            ReferenceArtifact r1 = getRef(comp.getName() + "/" + compositeRef);

            for (String ref : componentRef) {

                ReferenceArtifact r2 = getRef(ref);

                if (r1 != null && r2 != null) {
                    addWire(r2, r1);
                }
            }
View Full Code Here


                ((ComponentEntity)ent).getReferenceToServiceMap().entrySet().iterator(); it.hasNext();) {
                Entry<String, String> entry = it.next();
                String ref = entry.getKey();
                String ser = entry.getValue();

                ReferenceArtifact r = getRef(ent.getName() + "/" + ref);
                ServiceArtifact s = getSer(ser);

                if (r != null && s != null) {
                    addWire(r, s);
                }
View Full Code Here

        int refHeight = ent.getRefHeight();
        int x = (ent.getX() + ent.getWidth()) - (refHeight * 2 / 3);
        int y = ent.getY() + Constant.SPACING_FOR_COMPONENT_OF_REFERENCE;

        for (String ref : setRefOrder(ent)) {
            ReferenceArtifact refer = new ReferenceArtifact();
            Element polygon = refer.addElement(doc, svgNS, x, y, refHeight);

            Element child = polygon;
            if (baseURL != null) {
                String url = baseURL + "/components/" + ent.getName() + "/services/" + ref;
                child = createLink(polygon, url);
            }

            Element text = Text.addTextElement(doc, svgNS, x, y - Constant.SPACING_FOR_TEXT, ref);
            svgRoot.appendChild(child);
            svgRoot.appendChild(text);

            y += (refHeight + Constant.SPACING_FOR_COMPONENT_OF_REFERENCE);

            refer.setName(ref);
            refer.setContainerName(ent.getName());
            refs.add(refer);

        }
    }
View Full Code Here

                                           refHeight,
                                           Constant.SPACING_FOR_COMPOSITE_OF_REFERENCE,
                                           comp.getReferences().size());

        for (String ref : comp.getReferences()) {
            ReferenceArtifact refer = new ReferenceArtifact();
            Element polygon = refer.addElement(doc, svgNS, x, y, refHeight);
            Element text = Text.addTextElement(doc, svgNS, x, y - Constant.SPACING_FOR_TEXT, ref);
            svgRoot.appendChild(polygon);
            svgRoot.appendChild(text);

            y += (refHeight + Constant.SPACING_FOR_COMPOSITE_OF_REFERENCE);

            refer.setName(ref);
            refer.setContainerName(comp.getName());
            refs.add(refer);

        }

    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.diagram.artifacts.ReferenceArtifact

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.