Determine the links between spaces

@param spaces The spaces to link up
510644
private void linkSpaces(ArrayList spaces) {
		for (int source=0;source<spaces.size();source++) {
			Space a = (Space) spaces.get(source);
			
			for (int target=source+1;target<spaces.size();target++) {
				Space b = (Space) spaces.get(target);
				
				if (a.hasJoinedEdge(b)) {
					a.link(b);
					b.link(a);
				}
			}
		}
	}
1081625
protected List<String> getSpaces(String host, ContentStore store)
        throws ContentStoreException {
        List<String> spaceList;
        String spaces = dupHosts.get(host);
        if (spaces.equals(ALL_SPACES)) { // Need to compare all spaces
            spaceList = new ArrayList<>(store.getSpaces());
            spaceList.removeAll(ADMIN_SPACES);
        } else { // Only compare specific set of spaces
            String[] spacesToCompare = spaces.split(",");
            spaceList = Arrays.asList(spacesToCompare);
        }
        return spaceList;
    }
1322211
public void setLinks(Collection<Link> links) {
        Collection<com.ibm.ws.repository.transport.model.Link> attachmentLinks = new ArrayList<com.ibm.ws.repository.transport.model.Link>();
        for (Link link : links) {
            attachmentLinks.add(link.getLink());
        }

        _asset.getWlpInformation().setLinks(attachmentLinks);
    }
354558
@Override
    public Iterator<String> getSpaceContents(String spaceId, String prefix) {
        ConnectOperation co =
            new ConnectOperation(host, port, username, password, zone);

        String path;
        if (prefix != null && !prefix.equals("")) {
            path = baseDirectory + "/" + spaceId + "/" + prefix;
        } else {
            path = baseDirectory + "/" + spaceId;
        }

        log.trace("listing space contents for " + path);
        try {
            return listRecursiveFiles(path, co.getConnection());
        } catch (IOException e) {
            log.error("Could not connect to iRODS", e);
            throw new StorageException(e);
        }
    }
238207
function bindNamespaces() {
  for (var namespace in namespaces) {
    for (var func in namespaces[namespace]) {
      namespaces[namespace][func] = namespaces[namespace][func].bind(this);
    }

    this[namespace] = namespaces[namespace];
  };
}
914559
private static Map<String, LinkAndRels> urlRelMap(Links links) {

		Map<String, LinkAndRels> urlRelMap = new LinkedHashMap<>();

		links.forEach(link -> {
			LinkAndRels linkAndRels = urlRelMap.computeIfAbsent(link.getHref(), s -> new LinkAndRels());
			linkAndRels.setLink(link);
			linkAndRels.getRels().add(link.getRel());
		});

		return urlRelMap;
	}
1174923
public void addNameSpace(Set<String> names) {
		for (String name : names) {
			this.nameSpace.add(name.replace('.', '/'));
		}
	}
1255870
function (checkNamespaces) {
                var i, j
                if (!checkNamespaces)
                  return true
                if (!this.namespaces)
                  return false
                for (i = checkNamespaces.length; i--;) {
                  for (j = this.namespaces.length; j--;) {
                    if (checkNamespaces[i] === this.namespaces[j])
                      return true
                  }
                }
                return false
              }
597084
public List<Space> getSpaces()
	{
        Builder newQueryBuilder = SpacesQuery.newQuery();
        newQueryBuilder.withSpaceType(SpaceType.GLOBAL);
        SpacesQuery globalSpaceQuery = newQueryBuilder.build();
        return gpUtil.getSpaceManager().getAllSpaces(globalSpaceQuery);
	}
358735
protected HalRepresentation add(final Links links) {
        this.links = this.links != null
                ? copyOf(this.links).with(links).build()
                : links.using(this.curies);
        if (embedded != null) {
            embedded = embedded.using(this.curies);
        }
        return this;
    }
1300569
public void setLinks(List<Mtp2> channels) {
        for (Mtp2 link : channels) {
            if (link != null) {
                link.mtp3 = this;
                this.links.add(link);
            }
        }

    }
912316
public static KsDef getKeySpaceDef(String keyspaceName, List<KsDef> keyspaces)
    {
        keyspaceName = keyspaceName.toUpperCase();

        for (KsDef ksDef : keyspaces)
        {
            if (ksDef.name.toUpperCase().equals(keyspaceName))
                return ksDef;
        }

        return null;
    }
412472
public List<SpaceWithOrganization> getTopSpaces(Integer limit) {
		WebResource resource = getResourceFactory().getApiResource(
				"/space/top/");
		if (limit != null) {
			resource = resource.queryParam("limit", limit.toString());
		}

		return resource.get(new GenericType<List<SpaceWithOrganization>>() {
		});
	}
74550
protected void parseNamespaceMapping( TokenStream tokens ) {
        tokens.consume('<');
        String prefix = removeQuotes(tokens.consume());
        tokens.consume('=');
        String uri = removeQuotes(tokens.consume());
        tokens.consume('>');
        // Register the namespace ...
        context.getNamespaceRegistry().register(prefix, uri);
    }
1356799
public void setMinorTickSpace(final double SPACE) {
        if (null == minorTickSpace) {
            _minorTickSpace = SPACE;
            fireUpdateEvent(RECALC_EVENT);
        } else {
            minorTickSpace.set(SPACE);
        }
    }
220294
public String getTopicSpaceMapping(String busName, SIBUuid12 topicSpace)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getTopicSpaceMapping", new Object[] { busName, topicSpace });

        VirtualLinkDefinition linkDef = getLinkDefinition(busName);
        //this is only called internally so we shall include invisible dests in the lookup
        String topicSpaceName = getDestinationInternal(topicSpace, true).getName();
        String mapping = null;

        if (linkDef != null && linkDef.getTopicSpaceMappings() != null)
            mapping = (String) linkDef.getTopicSpaceMappings().get(topicSpaceName);
        else
            // Local ME
            mapping = topicSpaceName;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getTopicSpaceMapping", mapping);
        return mapping;
    }
865263
@VisibleForTesting
  static void appendSpaces(StringBuilder sb, int numSpaces) {
    if (numSpaces > 16) {
      logger.warning("Tracer.appendSpaces called with large numSpaces");
      // Avoid long loop in case some bug in the caller
      numSpaces = 16;
    }
    while (numSpaces >= 5) {
      sb.append("     ");
      numSpaces -= 5;
    }

    // We know it's less than 5 now
    switch (numSpaces) {
      case 1:
        sb.append(" ");
        break;
      case 2:
        sb.append("  ");
        break;
      case 3:
        sb.append("   ");
        break;
      case 4:
        sb.append("    ");
        break;
    }
  }