Gets the site links from a feed.

@return a map of feed item ID to SiteLinkFromFeed
761847
private static Map<Long, SiteLinkFromFeed> getSiteLinksFromFeed(
      AdWordsServicesInterface adWordsServices, AdWordsSession session, Feed feed)
      throws RemoteException {
    // Retrieve the feed's attribute mapping.
    Multimap<Long, Integer> feedMappings =
        getFeedMapping(adWordsServices, session, feed, PLACEHOLDER_SITELINKS);

    Map<Long, SiteLinkFromFeed> feedItems = Maps.newHashMap();

    for (FeedItem feedItem : getFeedItems(adWordsServices, session, feed)) {
      SiteLinkFromFeed siteLinkFromFeed = new SiteLinkFromFeed();

      for (FeedItemAttributeValue attributeValue : feedItem.getAttributeValues()) {
        // Skip this attribute if it hasn't been mapped to a field.
        if (!feedMappings.containsKey(attributeValue.getFeedAttributeId())) {
          continue;
        }

        for (Integer fieldId : feedMappings.get(attributeValue.getFeedAttributeId())) {
          switch (fieldId) {
            case PLACEHOLDER_FIELD_SITELINK_LINK_TEXT:
              siteLinkFromFeed.text = attributeValue.getStringValue();
              break;
            case PLACEHOLDER_FIELD_SITELINK_URL:
              siteLinkFromFeed.url = attributeValue.getStringValue();
              break;
            case PLACEHOLDER_FIELD_FINAL_URLS:
              siteLinkFromFeed.finalUrls = attributeValue.getStringValues();
              break;
            case PLACEHOLDER_FIELD_FINAL_MOBILE_URLS:
              siteLinkFromFeed.finalMobileUrls = attributeValue.getStringValues();
              break;
            case PLACEHOLDER_FIELD_TRACKING_URL_TEMPLATE:
              siteLinkFromFeed.trackingUrlTemplate = attributeValue.getStringValue();
              break;
            case PLACEHOLDER_FIELD_LINE_2_TEXT:
              siteLinkFromFeed.line2 = attributeValue.getStringValue();
              break;
            case PLACEHOLDER_FIELD_LINE_3_TEXT:
              siteLinkFromFeed.line3 = attributeValue.getStringValue();
              break;
            default:
              // Ignore attributes that do not map to a predefined placeholder field.
              break;
          }
        }
      }

      feedItems.put(feedItem.getFeedItemId(), siteLinkFromFeed);
    }

    return feedItems;
  }
589279
@Override
    @XmlElementWrapper(name = "links")
    @XmlElement(name = "link", type = LinkImpl.class)
    public List<Link> getLinks()
    {
        return links;
    }
702003
def links(self):
        
        return [annotation for annotation in self._annotations.values()
            if isinstance(annotation, WebLink)
        ]
845745
public Map<String, String> getLinks() {
        if (links == null) {
            return ImmutableMap.of();
        }
        return ImmutableMap.copyOf(links);
    }
425948
public List<String> getAllSelectedSitePath() {

        List<String> result = new ArrayList<String>();
        for (String cat : m_selectedCategories) {
            result.add(((CmsDataValue)m_categories.get(cat).getMainWidget()).getParameter(2));
        }
        return result;
    }
1281368
public Map<String, List<Item>> getTableItems() {
        Map<String, List<Map<String, AttributeValue>>> res = 
            result.getResponses();
        Map<String, List<Item>> map = new LinkedHashMap<String, List<Item>>(res.size());
        for (Map.Entry<String, List<Map<String, AttributeValue>>> e 
                : res.entrySet()) {
            String tableName = e.getKey();
            List<Map<String, AttributeValue>> items = e.getValue();
            map.put(tableName, InternalUtils.toItemList(items));
        }
        return map;
    }
1335486
@JsonIgnore
	Links getLinks() {

		if (data == null) {
			return Links.NONE;
		}

		return data.stream() //
				.flatMap(uberData -> uberData.getLinks().stream()) //
				.collect(Links.collector());
	}
589191
public static SiteLink makeSiteLink(String title, String siteKey) {
		return factory.getSiteLink(title, siteKey, Collections.emptyList());
	}
621649
public String getToLink() {

        if (m_link == null) {
            String target = toString();
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(target)) {
                m_link = substituteLink(getCmsObject(), target);
            } else {
                m_link = "";
            }
        }
        return m_link;
    }
582989
private Map<String, SiteLink> copySiteLinks(Map<String, SiteLink> siteLinks) {
		if (filter.excludeAllSiteLinks()) {
			return Collections.emptyMap();
		}

		Map<String, SiteLink> result = new HashMap<>(siteLinks.size());
		for (Entry<String, SiteLink> entry : siteLinks.entrySet()) {
			if (filter.includeSiteLink(entry.getKey())) {
				result.put(entry.getKey(), copy(entry.getValue()));
			}
		}
		return result;
	}
671884
public PermalinkList getPermalinks() {
        // TODO: shall we cache this?
        PermalinkList permalinks = new PermalinkList(Permalink.BUILTIN);
        for (PermalinkProjectAction ppa : getActions(PermalinkProjectAction.class)) {
            permalinks.addAll(ppa.getPermalinks());
        }
        return permalinks;
    }
1087147
public java.util.List<? extends com.google.rpc.Help.LinkOrBuilder> 
      getLinksOrBuilderList() {
    return links_;
  }
961318
public com.google.rpc.Help.Link getLinks(int index) {
    return links_.get(index);
  }
73397
function _getLinks(nodes) {
  var links = [],
      nodeHash;

  nodeHash = nodes.reduce(function (obj, node) {
    obj[node.id] = node;
    return obj;
  }, {});

  _data.links.forEach(function (link) {
    var source = nodeHash[link.sourceId],
        target = nodeHash[link.targetId];
    if(source && target) {
      link.setProperties({
        source: source,
        target: target,
        isBackwardLink: source.isSelfOrAncestor(target)
      });
      links.push(link);
    }
  });

  return links;
}
1193318
private static Set<Long> getFeedItemIdsForCampaign(CampaignFeed campaignFeed)
      throws RemoteException {
    Set<Long> feedItemIds = Sets.newHashSet();

    FunctionOperator functionOperator = campaignFeed.getMatchingFunction().getOperator();

    if (FunctionOperator.IN.equals(functionOperator)) {
      // Check if matchingFunction is of the form IN(FEED_ITEM_ID,{xxx,xxx}).
      // Extract feed items if applicable.
      feedItemIds.addAll(getFeedItemIdsFromArgument(campaignFeed.getMatchingFunction()));
    } else if (FunctionOperator.AND.equals(functionOperator)) {
      // Check if matchingFunction is of the form IN(FEED_ITEM_ID,{xxx,xxx}).
      // Extract feed items if applicable.
      Arrays.stream(campaignFeed.getMatchingFunction().getLhsOperand())
          .filter(FunctionOperand.class::isInstance)
          .map(argument -> (FunctionOperand) argument)
          .filter(operand -> FunctionOperator.IN.equals(operand.getValue().getOperator()))
          .forEach(operand -> feedItemIds.addAll(getFeedItemIdsFromArgument(operand.getValue())));
    } else {
      // There are no other matching functions involving feed item IDs.
    }

    return feedItemIds;
  }
1250649
private static List<Feed> getFeeds(
      AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException {
    FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class);
    String query = "SELECT Id, Name, Attributes WHERE Origin = 'USER' AND FeedStatus = 'ENABLED'";

    List<Feed> feeds = new ArrayList<>();
    int offset = 0;
    FeedPage feedPage;

    do {
      String pageQuery = String.format(query + " LIMIT %d, %d", offset, PAGE_SIZE);
      feedPage = feedService.query(pageQuery);
      if (feedPage.getEntries() != null) {
        feeds.addAll(Arrays.asList(feedPage.getEntries()));
      }
      offset += PAGE_SIZE;
    } while (offset < feedPage.getTotalNumEntries());

    return feeds;
  }
59441
public function getFeedItemLink()
    {
        $parameters = $this->item->getFeedItemRouteParameters() ?: [];

        $url = $this->router->generate($this->item->getFeedItemRouteName(), $parameters, UrlGeneratorInterface::ABSOLUTE_URL);

        $anchor = (string) $this->item->getFeedItemUrlAnchor();
        if ($anchor !== '') {
            $url .= '#'.$anchor;
        }

        return $url;
    }