Returns a list of {@link ResidueRange ResidueRanges} corresponding to this entire AtomPositionMap.
437259
public List<ResidueRangeAndLength> getRanges() {
		String currentChain = "";
		ResidueNumber first = null;
		ResidueNumber prev = null;
		List<ResidueRangeAndLength> ranges = new ArrayList<ResidueRangeAndLength>();
		for (ResidueNumber rn : treeMap.keySet()) {
			if (!rn.getChainName().equals(currentChain)) {
				if (first != null) {
					ResidueRangeAndLength newRange = new ResidueRangeAndLength(currentChain, first, prev, this.getLength(first, prev));
					ranges.add(newRange);
				}
				first = rn;
			}
			prev = rn;
			currentChain = rn.getChainName();
		}
		ResidueRangeAndLength newRange = new ResidueRangeAndLength(currentChain, first, prev, this.getLength(first, prev));
		ranges.add(newRange);
		return ranges;
	}
332217
private static int getPositionForPDBresunm(String pdbresnum, String authId , Atom[] atoms){
		ResidueNumber residueNumber =  ResidueNumber.fromString(pdbresnum);
		residueNumber.setChainName(authId);

		boolean blankChain = authId == null || authId.equalsIgnoreCase("null") || authId.equals("_");

		for ( int i =0; i< atoms.length ;i++){
			Group g = atoms[i].getGroup();

			// match _ to any chain
			if( blankChain ) {
				residueNumber.setChainName(g.getChain().getName());
			}

			//System.out.println(g.getResidueNumber() + "< ? >" + residueNumber +"<");
			if ( g.getResidueNumber().equals(residueNumber)){
				//System.out.println(g + " == " + residueNumber );
				Chain c = g.getChain();
				if ( blankChain || c.getName().equals(authId)){
					return i;
				}
			}
		}
		return -1;
	}
475273
def _get_ATOM_sequences(self):
        ''''''

        # Get a list of all residues with ATOM or HETATM records
        atom_sequences = {}
        structural_residue_IDs_set = set() # use a set for a quicker lookup
        ignore_HETATMs = True # todo: fix this if we need to deal with HETATMs

        residue_lines_by_chain = []
        structural_residue_IDs_set = []

        present_chain_ids = {}
        for l in self.structure_lines:
            if len(l) > 21 and l[:3] != 'TER':
                present_chain_ids[l[21]] = present_chain_ids.get(l[21], set())
                present_chain_ids[l[21]].add(l[:6])

        model_index = 0
        residue_lines_by_chain.append([])
        structural_residue_IDs_set.append(set())
        full_code_map = {}
        hetatm_map = {}
        full_atom_map = {}
        for l in self.structure_lines:
            chain_id = None
            if l.startswith("TER   "):
                model_index += 1
                residue_lines_by_chain.append([])
                structural_residue_IDs_set.append(set())
            else:
                residue_id = l[21:27]
                if residue_id not in structural_residue_IDs_set[model_index]:
                    residue_lines_by_chain[model_index].append(l)
                    structural_residue_IDs_set[model_index].add(residue_id)
                if l.startswith('ATOM'):
                    chain_id = l[21]
                    # Only use ATOM records to build the code map as chains can have ligands HETATMs
                    full_code_map[chain_id] = full_code_map.get(chain_id, set())
                    full_code_map[chain_id].add(l[17:20].strip())

                    # Only use ATOM records to build the atom map as CA-only chains can have ligands described in full as HETATMs
                    full_atom_map[chain_id] = full_atom_map.get(chain_id, set())
                    full_atom_map[chain_id].add(l[12:16].strip())
                elif l.startswith('HETATM'):
                    chain_id = l[21]
                    hetatm_map[chain_id] = hetatm_map.get(chain_id, set())
                    hetatm_map[chain_id].add(l[17:20].strip())

        # Get the residues used by the residue lines. These can be used to determine the chain type if the header is missing.
        for chain_id in self.atom_chain_order:
            if full_code_map.get(chain_id):
                # The chains may contain other molecules e.g. MG or HOH so before we decide their type based on residue types alone,
                # we subtract out those non-canonicals
                canonical_molecules = full_code_map[chain_id].intersection(dna_nucleotides.union(rna_nucleotides).union(residue_types_3))

                determined_chain_type = None
                if canonical_molecules.union(dna_nucleotides) == dna_nucleotides:
                    determined_chain_type = 'DNA'
                elif canonical_molecules.union(rna_nucleotides) == rna_nucleotides:
                    determined_chain_type = 'RNA'
                elif len(full_code_map[chain_id]) == 1 and 'UNK' in full_code_map[chain_id]:
                    determined_chain_type = 'Unknown'
                elif canonical_molecules:
                    if len(full_atom_map[chain_id]) == 1 and 'CA' in full_atom_map[chain_id]:
                        determined_chain_type = 'Protein skeleton'
                    else:
                        determined_chain_type = 'Protein'
                else:
                    determined_chain_type = PDB._determine_heterogen_chain_type(canonical_molecules)

                if self.chain_types.get(chain_id):
                    assert(self.chain_types[chain_id] == determined_chain_type)
                else:
                    self.chain_types[chain_id] = determined_chain_type

        line_types_by_chain = []
        chain_ids = []
        for model_index in range(len(residue_lines_by_chain)):
            line_types = set()
            if residue_lines_by_chain[model_index]:
                if missing_chain_ids.get(self.pdb_id):
                    chain_ids.append(missing_chain_ids[self.pdb_id])
                else:
                    chain_ids.append(residue_lines_by_chain[model_index][0][21])
            for l in residue_lines_by_chain[model_index]:
                line_types.add(l[0:6])
            if line_types == set(['ATOM']):
                line_types_by_chain.append('ATOM')
            elif line_types == set(['HETATM']):
                line_types_by_chain.append('HETATM')
            else:
                line_types_by_chain.append('Mixed')

        for x in range(0, len(residue_lines_by_chain)):
            residue_lines = residue_lines_by_chain[x]
            line_types = line_types_by_chain[x]
            if ignore_HETATMs and line_types == 'HETATM':
                continue

            for y in range(len(residue_lines)):
                l = residue_lines[y]
                residue_type = l[17:20].strip()
                if l.startswith("HETATM"):
                    if self.modified_residue_mapping_3.get(residue_type):
                        residue_type = self.modified_residue_mapping_3[residue_type]
                    elif y == (len(residue_lines) - 1):
                        # last residue in the chain
                        if residue_type == 'NH2':
                            residue_type = 'UNK' # fixes a few cases e.g. 1MBG, 1K9Q, 1KA6
                        elif ignore_HETATMs:
                            continue

                    elif ignore_HETATMs:
                        continue

                residue_id = l[21:27]
                chain_id = l[21]
                if missing_chain_ids.get(self.pdb_id):
                    chain_id = missing_chain_ids[self.pdb_id]

                if chain_id in self.chain_types:
                    # This means the pdb had SEQRES and we constructed atom_sequences
                    chain_type = self.chain_types[chain_id]
                else:
                    # Otherwise assume this is protein
                    chain_type = 'Protein'

                atom_sequences[chain_id] = atom_sequences.get(chain_id, Sequence(chain_type))

                residue_type = self.modified_residue_mapping_3.get(residue_type, residue_type)

                short_residue_type = None
                if residue_type == 'UNK':
                    short_residue_type = 'X'
                elif chain_type == 'Unknown':
                    assert(False) # we should not reach here - Unknown chains should only contain UNK records
                elif chain_type == 'Protein' or chain_type == 'Protein skeleton':
                    short_residue_type = residue_type_3to1_map.get(residue_type) or protonated_residue_type_3to1_map.get(residue_type) or non_canonical_amino_acids.get(residue_type)
                elif chain_type == 'DNA':
                    short_residue_type = dna_nucleotides_2to1_map.get(residue_type) or non_canonical_dna.get(residue_type)
                elif chain_type == 'RNA':
                    short_residue_type = non_canonical_rna.get(residue_type) or residue_type

                if not short_residue_type:
                    if l.startswith("ATOM") and l[12:16] == ' OH2' and l[17:20] == 'TIP':
                        continue
                    elif not self.strict:
                        short_residue_type = 'X'
                    else:
                        raise NonCanonicalResidueException("Unrecognized residue type %s in PDB file '%s', residue ID '%s'." % (residue_type, str(self.pdb_id), str(residue_id)))

                #structural_residue_IDs.append((residue_id, short_residue_type))
                # KAB - way to allow for multiresidue noncanonical AA's
                if len(short_residue_type) == 1:
                    atom_sequences[chain_id].add(PDBResidue(residue_id[0], residue_id[1:], short_residue_type, chain_type))
                else:
                    for char in short_residue_type:
                        atom_sequences[chain_id].add(PDBResidue(residue_id[0], residue_id[1:], char, chain_type))

        # Assign 'Ligand' or 'Heterogen' to all HETATM-only chains
        for chain_id in present_chain_ids.keys():
            if chain_id not in self.chain_types:
                assert('ATOM  ' not in present_chain_ids[chain_id])
                self.chain_types[chain_id] = PDB._determine_heterogen_chain_type(hetatm_map.get(chain_id, set()))
        self.atom_sequences = atom_sequences
57595
private ArrayList<String> calculateRangeFromParameters(){
        ArrayList<String>allTheValues = new ArrayList<String>();
        int minSampleSizeInteger = Integer.parseInt(minSampleSize);
        int maxSampleSizeInteger = Integer.parseInt(maxSampleSize);
        int incrementInteger = Integer.parseInt(increment);
        for(int i=minSampleSizeInteger; i<maxSampleSizeInteger; i=i+incrementInteger){
            String value = Integer.toString(i) + " - " + Integer.toString(i+incrementInteger);
            allTheValues.add(value);
        }
        return allTheValues;
    }
414819
public List<Section> getTickmarkSections() {
        List<Section> tickmarkSectionsCopy = new ArrayList<Section>(10);
        tickmarkSectionsCopy.addAll(tickmarkSections);
        return tickmarkSectionsCopy;
    }
386623
public List<Object> getAllLocators() {
		List<Object> locators = new ArrayList<Object>();

		synchronized (_lock) {
			for (Reference reference : _references)
				locators.add(reference.getLocator());
		}

		return locators;
	}
1215852
public Range[] getRanges() {
		Range[] ranges = new Range[nodes.size()];
		for (int i = 0; i < ranges.length; i++) {
			ranges[i] = nodes.get(i).getRange();
		}
		return ranges;
	}
1004754
public List<LayoutProperty> getDataProperties() throws FetchException {
        List<LayoutProperty> all = getAllProperties();
        List<LayoutProperty> data = new ArrayList<LayoutProperty>(all.size() - 1);
        for (LayoutProperty property : all) {
            if (!property.isPrimaryKeyMember()) {
                data.add(property);
            }
        }
        return Collections.unmodifiableList(data);
    }
213123
public IntStream getAllOccurrencesAsRanges() {
        IntStream result = IntStream.empty();
        // with/or without end
        for (int i = start; i < end; i++) {
            // every i is one occurrence
            int token_position = tokenIndex.suffix_array[i];
            IntStream range = IntStream.range(token_position, token_position + length);
            result = IntStream.concat(result, range);
        }
        return result;
    }
269069
public List<RowRange> getTransientRanges() {
    List<RowRange> ranges = new ArrayList<>();
    Iterator<String> keys = appConfig.getKeys(PREFIX.substring(0, PREFIX.length() - 1));
    while (keys.hasNext()) {
      String key = keys.next();
      String val = appConfig.getString(key);
      String[] sa = val.split(":");
      RowRange rowRange = new RowRange(Bytes.of(DatatypeConverter.parseHexBinary(sa[0])),
          Bytes.of(DatatypeConverter.parseHexBinary(sa[1])));
      ranges.add(rowRange);
    }
    return ranges;
  }
913589
public List<CmsSolrIndex> getAllSolrIndexes() {

        List<CmsSolrIndex> result = new ArrayList<CmsSolrIndex>();
        for (String indexName : getIndexNames()) {
            CmsSolrIndex index = getIndexSolr(indexName);
            if (index != null) {
                result.add(index);
            }
        }
        return result;
    }
1156391
public Set<String> getChains() {
		Set<String> chains = new HashSet<String>();
		List<ResidueRange> rrs = toCanonical().getResidueRanges();
		for (ResidueRange rr : rrs) chains.add(rr.getChainName());
		return chains;
	}

	@Override
	public String getIdentifier() {
		return getCATH();
	}

	@Override
	public SubstructureIdentifier toCanonical() {
		List<ResidueRange> ranges = new ArrayList<ResidueRange>();
		String chain = String.valueOf(getDomainName().charAt(getDomainName().length() - 3));
		for (CathSegment segment : this.getSegments()) {
			ranges.add(new ResidueRange(chain, segment.getStart(), segment.getStop()));
		}

		return new SubstructureIdentifier(getThePdbId(), ranges);
	}

	@Override
	public Structure reduce(Structure input) throws StructureException {
		return toCanonical().reduce(input);
	}

	@Override
	public Structure loadStructure(AtomCache cache) throws StructureException,
			IOException {
		return cache.getStructure(getThePdbId());
	}


}
1236124
public java.util.List<IpRange> getIpv4Ranges() {
        if (ipv4Ranges == null) {
            ipv4Ranges = new com.amazonaws.internal.SdkInternalList<IpRange>();
        }
        return ipv4Ranges;
    }
582389
public List<LocaleEncodingMappingListType<WebFragmentDescriptor>> getAllLocaleEncodingMappingList()
   {
      List<LocaleEncodingMappingListType<WebFragmentDescriptor>> list = new ArrayList<LocaleEncodingMappingListType<WebFragmentDescriptor>>();
      List<Node> nodeList = model.get("locale-encoding-mapping-list");
      for(Node node: nodeList)
      {
         LocaleEncodingMappingListType<WebFragmentDescriptor>  type = new LocaleEncodingMappingListTypeImpl<WebFragmentDescriptor>(this, "locale-encoding-mapping-list", model, node);
         list.add(type);
      }
      return list;
   }
1030430
public List<Integer> getPageRange() {
        List<Integer> r = new ArrayList<Integer>();
        for (int i = 1; i <= getPages(); i++) {
            r.add(i);
        }
        return r;
    }
1314813
public static List<PartitionIDRange> getGlobalRange(final int partitionBits) {
        Preconditions.checkArgument(partitionBits>=0 && partitionBits<(Integer.SIZE-1),"Invalid partition bits: %s",partitionBits);
        final int partitionIdBound = (1 << (partitionBits));
        return ImmutableList.of(new PartitionIDRange(0, partitionIdBound, partitionIdBound));
    }
169085
public List<ExtensionElement> getExtendedInfoAsList() {
        List<ExtensionElement> res = null;
        if (extendedInfo != null) {
            res = new ArrayList<>(1);
            res.add(extendedInfo);
        }
        return res;
    }