/** * {@inheritDoc} */ public boolean equals(Object obj) { if (obj instanceof UsageLink) { UsageLink il=(UsageLink)obj; return (il.getSource() == _source && il.getTarget() == _target); } return (false); } }
/** * 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); }
if (isServiceProvider(sg, ul.getSource(), focus, visited)) { return (true);
if (!ul.getSource().getProperties().containsKey(ServiceGraphLayout.WIDTH)) { if (LOG.isLoggable(Level.FINER)) { LOG.fine("Source node on usage link with definition '"+ul.getSource().getService()+"' does not have layout information"); int x1=(int)(((Integer)ul.getSource().getProperties().get(ServiceGraphLayout.X_POSITION) +(Integer)ul.getSource().getProperties().get(ServiceGraphLayout.WIDTH)) * ratio); int y1=(int)(((Integer)ul.getSource().getProperties().get(ServiceGraphLayout.Y_POSITION)) * ratio); +(Integer)ul.getTarget().getProperties().get(ServiceGraphLayout.HEIGHT)) * ratio); int x4=(int)(((Integer)ul.getSource().getProperties().get(ServiceGraphLayout.X_POSITION) +(Integer)ul.getSource().getProperties().get(ServiceGraphLayout.WIDTH)) * ratio); int y4=(int)(((Integer)ul.getSource().getProperties().get(ServiceGraphLayout.Y_POSITION) +(Integer)ul.getSource().getProperties().get(ServiceGraphLayout.HEIGHT)) * ratio);
UsageLink ul=ulIter.next(); if (ul.getSource() == node || ul.getTarget() == node) { ulIter.remove();
/** * This method returns the description to be used for the * invocation link. * * @param il The invocation link * @return The description */ protected String getDescription(UsageLink ul) { return (ul.getSource().getService().getServiceType() +" -> "+ul.getTarget().getService().getServiceType()); }
if (ul.getSource() == sn && requiresLayout(ul.getTarget())) { links.add(ul);