Node extends NetworkElement { public void setUrlNodeIcon (NetworkLayer layer , URL url , Double relativeSize) { if (relativeSize == null) relativeSize = 1.0; mapLayer2URLSpecificIcon.put(layer , Pair.of(url , relativeSize <= 0? 1.0 : relativeSize)); } protected  Node(NetPlan netPlan , long id , int index , double xCoord, double yCoord, String name, AttributeMap attributes); void setSiteName(String site); String getSiteName(); void setPopulation(double population); double getPopulation(); double getEgressOfferedTraffic(NetworkLayer ... optionalLayerParameter); double getIncomingLinksTraffic(NetworkLayer ... optionalLayerParameter); double getOutgoingLinksTraffic(NetworkLayer ... optionalLayerParameter); double getIncomingLinksCapacity(NetworkLayer ... optionalLayerParameter); double getOutgoingLinksCapacity(NetworkLayer ... optionalLayerParameter); double getIngressOfferedTraffic(NetworkLayer ... optionalLayerParameter); double getEgressOfferedMulticastTraffic(NetworkLayer ... optionalLayerParameter); double getIngressOfferedMulticastTraffic(NetworkLayer ... optionalLayerParameter); void removeAllForwardingRules(NetworkLayer ... optionalLayerParameter); double getEgressCarriedTraffic(NetworkLayer ... optionalLayerParameter); double getIngressCarriedTraffic(NetworkLayer ... optionalLayerParameter); double getEgressCarriedMulticastTraffic(NetworkLayer ... optionalLayerParameter); double getIngressCarriedMulticastTraffic(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getInNeighbors(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getOutNeighbors(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getOutNeighborsAllLayers(); SortedSet<Node> getInNeighborsAllLayers(); Point2D getXYPositionMap(String ...layout); void setXYPositionMap(Point2D pos , String ...layout); boolean isUp(); boolean isDown(); SortedSet<Link> getIncomingLinks(NetworkLayer ... optionalLayerParameter); SortedSet<NetworkLayer> getWorkingLayers(); boolean isWorkingAtLayer(NetworkLayer layer); boolean isIsolated(); SortedSet<Link> getOutgoingLinks(NetworkLayer ... optionalLayerParameter); SortedSet<Link> getOutgoingLinksAllLayers(); SortedSet<Link> getIncomingLinksAllLayers(); SortedSet<Demand> getOutgoingDemandsAllLayers(); SortedSet<Demand> getIncomingDemandsAllLayers(); SortedSet<MulticastDemand> getOutgoingMulticastDemandsAllLayers(); SortedSet<MulticastDemand> getIncomingMulticastDemandsAllLayers(); SortedSet<Demand> getIncomingDemands(NetworkLayer ... optionalLayerParameter); boolean setFailureState(boolean setAsUp); SortedSet<Route> getIncomingRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getIncomingMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getOutgoingRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getOutgoingMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<Demand> getOutgoingDemands(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastDemand> getIncomingMulticastDemands(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastDemand> getOutgoingMulticastDemands(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getAssociatedRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getExpressRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getAssociatedMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<SharedRiskGroup> getSRGs(); SortedSet<Resource> getResources(String ... type); void remove(); @Override String toString(); SortedMap<Pair<Demand,Link>,Double> getForwardingRules(NetworkLayer ... optionalLayerParameter); SortedMap<Pair<Demand,Link>,Double> getForwardingRules(Demand demand); URL getUrlNodeIcon(NetworkLayer layer); double getNodeIconRelativeSize(NetworkLayer layer); void setUrlNodeIcon(NetworkLayer layer , URL url , Double relativeSize); void removeUrlNodeIcon(NetworkLayer layer); SortedSet<String> getPlanningDomains(); void removeFromPlanningDomain(String planningDomain); void addToPlanningDomain(String planningDomain);  }
@Test public void testSetUrlNodeIcon() throws Exception { n1.setUrlNodeIcon(np.getNetworkLayerDefault() , new URL ("file:/icon") , 0.5); assertEquals(n1.getUrlNodeIcon(np.getNetworkLayerDefault()) , new URL ("file:/icon")); n1.removeUrlNodeIcon(np.getNetworkLayerDefault()); assertEquals(n1.getUrlNodeIcon(np.getNetworkLayerDefault()) , null); }