Gets the feed mapping for a feed.

@return a multimap from feed attribute ID to the set of field IDs mapped to the attribute
978232
private static Multimap<Long, Integer> getFeedMapping(AdWordsServicesInterface adWordsServices,
      AdWordsSession session, Feed feed, long placeholderType) throws RemoteException {
    // Get the FeedMappingService.
    FeedMappingServiceInterface feedMappingService =
        adWordsServices.get(session, FeedMappingServiceInterface.class);
    String query = String.format(
        "SELECT FeedMappingId, AttributeFieldMappings WHERE FeedId = %d and PlaceholderType = %d "
        + "AND Status = 'ENABLED'", feed.getId(), placeholderType);

    Multimap<Long, Integer> attributeMappings = HashMultimap.create();
    int offset = 0;
    FeedMappingPage feedMappingPage;

    do {
      String pageQuery = String.format(query + " LIMIT %d, %d", offset, PAGE_SIZE);
      feedMappingPage = feedMappingService.query(pageQuery);
      if (feedMappingPage.getEntries() != null) {
        // Normally, a feed attribute is mapped only to one field. However, you may map it to more
        // than one field if needed.
        for (FeedMapping feedMapping : feedMappingPage.getEntries()) {
          for (AttributeFieldMapping attributeMapping : feedMapping.getAttributeFieldMappings()) {
            attributeMappings.put(attributeMapping.getFeedAttributeId(),
                attributeMapping.getFieldId());
          }
        }
      }
      offset += PAGE_SIZE;
    } while (offset < feedMappingPage.getTotalNumEntries());

    return attributeMappings;
  }
169123
protected Map<String, String> getElementAttributes() {
        // Preserve order of attributes
        Map<String, String> attrs = new HashMap<>();

        if (this.getLoop() != null) {
            attrs.put("loop", this.getLoop().toString());
        }
        if (this.getDigits() != null) {
            attrs.put("digits", this.getDigits());
        }

        return attrs;
    }
433092
public List<FieldRef> getFields() {
        Map<String,FieldRef> fields = new LinkedHashMap<String,FieldRef>();
        for (Klass<?> k = this; k!=null; k=k.getSuperClass()) {
            for (FieldRef f : k.getDeclaredFields()) {
                String name = f.getName();
                if (!fields.containsKey(name) && f.isRoutable()) {
                    fields.put(name,f);
                }
            }
        }

        return new ArrayList<FieldRef>(fields.values());
    }
415168
private Map<String,Object> getMap()
    {
        if (m_data == null)
            m_data = new HashMap<String,Object>();
        return (Map<String, Object>)m_data;
    }
637051
public java.util.List<Mapping> getMapping() {  
		if (myMapping == null) {
			myMapping = new java.util.ArrayList<Mapping>();
		}
		return myMapping;
	}
948547
@Override
    public Map<FieldDescriptor, Object> getAllFields() {
        TreeMap<FieldDescriptor, Object> result = new TreeMap<FieldDescriptor, Object>();
        for (final FieldDescriptor field : metadata.descriptor.getFields()) {
            if (hasField(field)) {
                result.put(field, getField(field));
            }
        }
        return Collections.unmodifiableMap(result);
    }
952916
public Map<String, Attribute> getAttributes() {
        Map<String, Attribute> result = new HashMap<>();
        DataSourceAttribute datasourceAttribute = new DataSourceAttribute();
        Map<String, Attribute> dsResult = new HashMap<>();
        dsResult.put(MAP_KEY, this.mapAttribute);
        datasourceAttribute.setAttributes(dsResult);
        result.put("datasource", datasourceAttribute);
        return result;
    }
183406
public Map<String, Object> asMap() {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("statusCode", statusCode);
        map.put("statusMessage", statusMessage);
        map.put("requestMethod", requestMethod);
        map.put("requestUri", requestUri);

        if (!StringUtils.isNullOrEmpty(message)) {
            map.put("message", message);
        }
        if (!StringUtils.isNullOrEmpty(stacktrace)) {
            map.put("stacktrace", stacktrace);
        }

        return map;
    }
622587
public Map<FieldDescriptorType, Object> getAllFields() {
    if (hasLazyField) {
      SmallSortedMap<FieldDescriptorType, Object> result =
          SmallSortedMap.newFieldMap(16);
      for (int i = 0; i < fields.getNumArrayEntries(); i++) {
        cloneFieldEntry(result, fields.getArrayEntryAt(i));
      }
      for (Map.Entry<FieldDescriptorType, Object> entry :
          fields.getOverflowEntries()) {
        cloneFieldEntry(result, entry);
      }
      if (fields.isImmutable()) {
        result.makeImmutable();
      }
      return result;
    }
    return fields.isImmutable() ? fields : Collections.unmodifiableMap(fields);
  }
538481
public function getMappedAttributes()
    {
        $mappedArrayForApiRequest = [];
        $requestAttributes = $this->request->getData();
        foreach ($requestAttributes as $key => $value) {
            if (array_key_exists($key, $this->mappingRequestToOtherRequestAttributes)) {
                $mappedArrayForApiRequest[$this->mappingRequestToOtherRequestAttributes[$key]] = $value;
            }
        }

        return $mappedArrayForApiRequest;
    }
1304257
def get_field_mapping(self):
        
        field_mapping = self.field_mapping_widget.get_field_mapping()
        for k, v in list(field_mapping['values'].items()):
            if not v:
                field_mapping['values'].pop(k)
        for k, v in list(field_mapping['fields'].items()):
            if not v:
                field_mapping['fields'].pop(k)
        return field_mapping
765492
public ImmutableList<SQLPPTriplesMap> getMappings(Graph myModel) throws InvalidR2RMLMappingException {

		List<SQLPPTriplesMap> mappings = new ArrayList<SQLPPTriplesMap>();

		// retrieve the TriplesMap nodes
		Collection<TriplesMap> tripleMaps = r2rmlParser.getMappingNodes(myModel);

		for (TriplesMap tm : tripleMaps) {

			// for each node get a mapping
			SQLPPTriplesMap mapping;

			try {
				mapping = getMapping(tm);

                if(mapping!=null) {
                    // add it to the list of mappings
                    mappings.add(mapping);
                }

				// pass 2 - check for join conditions, add to list
				List<SQLPPTriplesMap> joinMappings = getJoinMappings(tripleMaps, tm);
				if (joinMappings != null) {
					mappings.addAll(joinMappings);
				}
			} catch (Exception e) {
				e.printStackTrace();
				throw new RuntimeException(e);
			}
		}
		return ImmutableList.copyOf(mappings);
	}
373862
protected Map<String, String> getElementAttributes() {
        // Preserve order of attributes
        Map<String, String> attrs = new HashMap<>();

        if (this.getAlias() != null) {
            attrs.put("alias", this.getAlias());
        }

        return attrs;
    }
280163
private static void createFeedMapping(
      AdWordsServicesInterface adWordsServices, AdWordsSession session, DSAFeedDetails feedDetails)
      throws RemoteException {
    // Get the FeedMappingService.
    FeedMappingServiceInterface feedMappingService =
        adWordsServices.get(session, FeedMappingServiceInterface.class);

    // Map the FeedAttributeIds to the fieldId constants.
    AttributeFieldMapping urlFieldMapping = new AttributeFieldMapping();
    urlFieldMapping.setFeedAttributeId(feedDetails.urlAttributeId);
    urlFieldMapping.setFieldId(DSA_PAGE_URLS_FIELD_ID);
    AttributeFieldMapping labelFieldMapping = new AttributeFieldMapping();
    labelFieldMapping.setFeedAttributeId(feedDetails.labelAttributeId);
    labelFieldMapping.setFieldId(DSA_LABEL_FIELD_ID);

    // Create the FeedMapping and operation.
    FeedMapping feedMapping = new FeedMapping();
    feedMapping.setCriterionType(DSA_PAGE_FEED_CRITERION_TYPE);
    feedMapping.setFeedId(feedDetails.feedId);
    feedMapping.setAttributeFieldMappings(
        new AttributeFieldMapping[] {urlFieldMapping, labelFieldMapping});
    FeedMappingOperation operation = new FeedMappingOperation();
    operation.setOperand(feedMapping);
    operation.setOperator(Operator.ADD);

    // Add the field mapping.
    FeedMapping newFeedMapping =
        feedMappingService.mutate(new FeedMappingOperation[] {operation}).getValue(0);
    System.out.printf(
        "Feed mapping with ID %d and criterionType %d was saved for feed with ID %d.%n",
        newFeedMapping.getFeedMappingId(),
        newFeedMapping.getCriterionType(),
        newFeedMapping.getFeedId());
  }
591531
public Map<Object, Object> getManifestAttributes() {
		Map<Object, Object> manifestAttributes = null;
		
		manifestAttributes = getExplodedWarManifestAttributes();
		if (manifestAttributes == null) {
		    manifestAttributes = getPackagedWarManifestAttributes();
		}
		if (manifestAttributes == null) {
		    manifestAttributes = getClassPathManifestAttributes();
		}
		
		if (manifestAttributes == null) {
		    manifestAttributes = new HashMap<>();
		}
		return manifestAttributes;
	}
295037
public Map<String, MBeanAttributeInfo> getAttributeMetadata() {

        MBeanAttributeInfo[] attributeList = mBeanInfo.getAttributes();

        Map<String, MBeanAttributeInfo> attributeMap = new TreeMap<String, MBeanAttributeInfo>();
        for (MBeanAttributeInfo attribute: attributeList) {
            attributeMap.put(attribute.getName(), attribute);
        }
        return attributeMap;
    }
133953
public static GeoRSSModule getGeoRSS(final SyndFeed feed) {
        final GeoRSSModule simple = (GeoRSSModule) feed.getModule(GeoRSSModule.GEORSS_GEORSS_URI);
        final GeoRSSModule w3cGeo = (GeoRSSModule) feed.getModule(GeoRSSModule.GEORSS_W3CGEO_URI);
        final GeoRSSModule gml = (GeoRSSModule) feed.getModule(GeoRSSModule.GEORSS_GML_URI);

        if (gml != null) {
            return gml;
        }
        if (simple != null) {
            return simple;
        }
        if (w3cGeo != null) {
            return w3cGeo;
        }

        return null;
        /*
         * if (geoRSSModule == null && w3cGeo != null) { geoRSSModule = w3cGeo; } else if
         * (geoRSSModule == null && gml != null) { geoRSSModule = gml; } else if (geoRSSModule !=
         * null && w3cGeo != null) { // sanity check if
         * (!geoRSSModule.getGeometry().equals(w3cGeo.getGeometry())) { throw new
         * Error("geometry of simple and w3c do not match"); } } return geoRSSModule;
         */
    }