int width=(Integer)sg.getProperties().get(ServiceGraphLayout.WIDTH); if (sg.getDescription() != null && ratio >= 1.0) { org.w3c.dom.Element text= container.getOwnerDocument().createElement("text"); container.getOwnerDocument().createTextNode(sg.getDescription()); text.appendChild(textValue); if (sg.getServiceNodes().size() > 0) { for (ServiceNode sn : sg.getServiceNodes()) { generateService(sn, ratio, container, insertPoint); for (UsageLink ul : sg.getUsageLinks()) { generateUsageLink(ul, ratio, container, insertPoint); for (InvocationLink il : sg.getInvocationLinks()) { generateInvocationLink(il, ratio, container, insertPoint);
ServiceNode focus=sg.getServiceNode(focusServiceType); java.util.Iterator<ServiceNode> serviceNodeIter=sg.getServiceNodes().iterator(); if (sg.getUsageLink(node, focus) != null) { continue; java.util.Iterator<InvocationLink> ilIter=sg.getInvocationLinks().iterator(); java.util.Iterator<UsageLink> ulIter=sg.getUsageLinks().iterator();
for (ServiceNode sn : sg.getServiceNodes()) { if (sn.getProperties().get(ServiceNode.INITIAL_NODE) == Boolean.TRUE) { initialNodes.add(sn); sg.getProperties().put(ServiceGraphLayout.HEIGHT, _height); sg.getProperties().put(ServiceGraphLayout.WIDTH, _width);
if (sg.getUsageLink(focus, node) != null) { return (true); for (UsageLink ul : sg.getUsageLinks()) { if (ul.getTarget() == node) { if (isServiceProvider(sg, ul.getSource(), focus, visited)) {
tsn = sg.getServiceNode(id.getServiceType()); tsn = sg.getServiceNodeForInterface(id.getInterface()); UsageLink existingul=sg.getUsageLink(sn, tsn); ul.getInvocations().add(id); sg.getUsageLinks().add(ul); InvocationLink existingil=sg.getInvocationLink(opn, topn); il.getInvocations().add(id); sg.getInvocationLinks().add(il); } else { LOG.fine("Link between source '"+opn
ServiceGraph ret=new ServiceGraph(); ret.getServiceNodes().add(sn); ServiceNode sn=ret.getServiceNode(sd.getServiceType());
/** * This method returns the usage link associated with the supplied * source and target service nodes. * * @param source The source * @param target The target * @return The usage link, or null if not found */ public UsageLink getUsageLink(ServiceNode source, ServiceNode target) { UsageLink ret=null; for (UsageLink eul : getUsageLinks()) { if (eul.getSource() == source && eul.getTarget() == target) { ret = eul; break; } } return (ret); }
throw new Exception("Failed to generate service dependency overview"); serviceGraph.setDescription("Generated: " + new Date()); ServiceGraphLayoutImpl serviceGraphLayout = new ServiceGraphLayoutImpl(); serviceGraphLayout.layout(serviceGraph);
/** * This method returns the invocation link associated with the supplied * source and target operation nodes. * * @param source The source * @param target The target * @return The invocation link, or null if not found */ public InvocationLink getInvocationLink(OperationNode source, OperationNode target) { InvocationLink ret=null; for (InvocationLink eil : getInvocationLinks()) { if (eil.getSource() == source && eil.getTarget() == target) { ret = eil; break; } } return (ret); }
for (UsageLink ul : sg.getUsageLinks()) {
graph.setDescription("Generated: "+new java.util.Date());