Parses a data resource name into a DataResource instance.

@param name Name of the data resource.
@return DataResource instance matching the name.
14410
public static DataResource fromName(String name)
    {
        String[] parts = StringUtils.split(name, '/');

        if (!parts[0].equals(ROOT_NAME) || parts.length > 3)
            throw new IllegalArgumentException(String.format("%s is not a valid data resource name", name));

        if (parts.length == 1)
            return root();

        if (parts.length == 2)
            return keyspace(parts[1]);

        return columnFamily(parts[1], parts[2]);
    }
1296092
public String readDataType(String name) {
    if (name.equals("map")) {
      if (readChar() != '<') throw unexpected("expected '<'");
      String keyType = readDataType();
      if (readChar() != ',') throw unexpected("expected ','");
      String valueType = readDataType();
      if (readChar() != '>') throw unexpected("expected '>'");
      return String.format("map<%s, %s>", keyType, valueType);
    } else {
      return name;
    }
  }
214049
protected final Object getDataField(String name) throws NotAvailableException {
        try {
            MB dataClone = cloneDataBuilder();
            Descriptors.FieldDescriptor findFieldByName = dataClone.getDescriptorForType().findFieldByName(name);
            if (findFieldByName == null) {
                throw new NotAvailableException("Field[" + name + "] does not exist for type " + dataClone.getClass().getName());
            }
            return dataClone.getField(findFieldByName);
        } catch (Exception ex) {
            throw new NotAvailableException(name, this, ex);
        }
    }
851391
public T get(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return i;
            }
        }
        return null;
    }
698839
@Deprecated
  public DatanodeDescriptor getDatanodeByName(String name) {
    if (name == null) {
      return null;
    }
    int colon = name.indexOf(":");
    String host;
    if (colon < 0) {
      host = name;
    } else {
      host = name.substring(0, colon);
    }
    hostmapLock.readLock().lock();
    try {
      DatanodeDescriptor[] nodes = map.get(host);
      // no entry
      if (nodes == null) {
        return null;
      }
      for (DatanodeDescriptor containedNode : nodes) {
        if (name.equals(containedNode.getName())) {
          return containedNode;
        }
      }
      return null;
    } finally {
      hostmapLock.readLock().unlock();
    }
  }
184615
public JsonArray getJsonArray(String name) throws JsonException {
        JsonElement el = get(name);
        if (!el.isJsonArray()) {
            throw Util.typeMismatch(name, el, "JsonArray");
        }
        return el.asJsonArray();
    }
590991
@Nullable
  public URL getResource (final String name)
  {
    URL ret = null;

    if (m_aBestCandidate != null)
    {
      ret = m_aBestCandidate.getResource (name);
      if (ret != null)
        return ret;
      m_aBestCandidate = null;
    }

    IClassLoadHelper aLoadHelper = null;

    final Iterator <IClassLoadHelper> iter = m_aLoadHelpers.iterator ();
    while (iter.hasNext ())
    {
      aLoadHelper = iter.next ();
      ret = aLoadHelper.getResource (name);
      if (ret != null)
        break;
    }

    m_aBestCandidate = aLoadHelper;
    return ret;
  }
605395
def get_by_name(self, name):
        
        result = self.get_by("name", name)

        if result:
            data = result[0]
            new_resource = self.new(self._connection, data)
        else:
            new_resource = None

        return new_resource
398219
public void getResources(Vector<URL> resources, String name)
  {
    Path path;

    path = getPath(name);

    if (path != null && path.canRead()) {
      try {
        resources.add(path.getNetURL());
      } catch (Exception e) {
      }
    }
  }
818423
@SuppressWarnings("unchecked")
    public <T> T getContextData(String name) {
        T rc = null;
        if (null != this.inheritableLocals) {
            rc = (T) this.inheritableLocals.get(name);
        }
        if (null == rc && null != this.locals) {
            rc = (T) this.locals.get(name);
        }
        return rc;
    }
1008112
public Document findXMLResource(String name) {
    URL url = this.getClass().getResource(name);
    DocumentBuilderFactory docFactory = DocumentBuilderFactory
            .newInstance();
    docFactory.setNamespaceAware(true);
	// Fortify Mod: Disable entity expansion to foil External Entity Injections
	docFactory.setExpandEntityReferences(false);
    Document doc = null;
    try {
      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
      doc = docBuilder.parse(url.toURI().toString());
    } catch (Exception e) {
      LOGR.log(Level.WARNING, "Failed to parse classpath resource "
              + name, e);
    }
    return doc;
  }
535560
public JsonElement get(String name) throws JsonException {
        JsonElement result = nameValuePairs.get(name);
        if (result == null) {
            throw new JsonException("No value for " + name + ", in: " + this.toString());
        }
        return result;
    }
556858
public static policydataset_value_binding[] get(nitro_service service, String name) throws Exception{
		policydataset_value_binding obj = new policydataset_value_binding();
		obj.set_name(name);
		policydataset_value_binding response[] = (policydataset_value_binding[]) obj.get_resources(service);
		return response;
	}
617948
protected Map<String, String> getConnPropsByDataSourceName(final String dataSourceName) {
		return connProps.computeIfAbsent(dataSourceName, k -> new ConcurrentHashMap<>());
	}
1022037
protected function getDataSource($name)
    {
        return isset($this->dataSources[$name]) ? $this->dataSources[$name] : $this->dataSources['*'];
    }
500943
public BinarySparseDataset parse(String name, InputStream stream) throws IOException, ParseException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {

           BinarySparseDataset sparse = new BinarySparseDataset(name);
        
           String line = reader.readLine();
           if (line == null) {
                throw new IOException("Empty data source.");
           }
        
           Set<Integer> items = new HashSet<>();
           do {
                line = line.trim();
                if (line.isEmpty()) {
                    continue;
                }

                String[] s = line.split("\\s+");
            
                items.clear();
                for (int i = 0; i < s.length; i++) {
                    items.add(Integer.parseInt(s[i]));
                }

                int j = 0;
                int[] point = new int[items.size()];
                for (int i : items) {
                    point[j++] = i;
                }

                Arrays.sort(point);
                sparse.add(point);
                line = reader.readLine();
            } while (line != null);

            return sparse;
        }
    }
37513
public final synchronized L[] get(String name) {
        return (this.map != null)
                ? this.map.get(name)
                : null;
    }