Get the resource scenario object for a given resource atttribute and scenario.
        This is done when you know the attribute, resource and scenario and want to get the
        value associated with it.
968986
def get_resource_scenario(resource_attr_id, scenario_id, **kwargs):
    
    user_id = kwargs.get('user_id')

    _get_scenario(scenario_id, user_id)

    try:
        rs = db.DBSession.query(ResourceScenario).filter(ResourceScenario.resource_attr_id==resource_attr_id,
                                             ResourceScenario.scenario_id == scenario_id).options(joinedload_all('dataset')).options(joinedload_all('dataset.metadata')).one()

        return rs
    except NoResultFound:
        raise ResourceNotFoundError("resource scenario for %s not found in scenario %s"%(resource_attr_id, scenario_id))
630367
public Object getAttribute(ObjectName name, String attributeName) throws Exception {
		checkClientConnected();
		return mbeanConn.getAttribute(name, attributeName);
	}
660963
def get_resource_class_relationship_attribute_iterator(rc):
    
    for attr in itervalues_(rc.__everest_attributes__):
        if attr.kind != RESOURCE_ATTRIBUTE_KINDS.TERMINAL:
            yield attr
49765
def _get_value(context, key):
    
    if isinstance(context, dict):
        # Then we consider the argument a "hash" for the purposes of the spec.
        #
        # We do a membership test to avoid using exceptions for flow control
        # (e.g. catching KeyError).
        if key in context:
            return context[key]
    elif type(context).__module__ != _BUILTIN_MODULE:
        # Then we consider the argument an "object" for the purposes of
        # the spec.
        #
        # The elif test above lets us avoid treating instances of built-in
        # types like integers and strings as objects (cf. issue #81).
        # Instances of user-defined classes on the other hand, for example,
        # are considered objects by the test above.
        try:
            attr = getattr(context, key)
        except AttributeError:
            # TODO: distinguish the case of the attribute not existing from
            #   an AttributeError being raised by the call to the attribute.
            #   See the following issue for implementation ideas:
            #     http://bugs.python.org/issue7559
            pass
        else:
            # TODO: consider using EAFP here instead.
            #   http://docs.python.org/glossary.html#term-eafp
            if callable(attr):
                return attr()
            return attr

    return _NOT_FOUND
1238500
def getAttribute(self, attr: str) -> _AttrValueType:
        
        if attr == 'class':
            if self.classList:
                return self.classList.toString()
            return None
        attr_node = self.getAttributeNode(attr)
        if attr_node is None:
            return None
        return attr_node.value
544747
def get_resources(cls):
        """"""
        my_plurals = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)
        attributes.PLURALS.update(my_plurals)
        attr_map = RESOURCE_ATTRIBUTE_MAP
        resources = resource_helper.build_resource_info(my_plurals,
                                                        attr_map,
                                                        constants.A10_DEVICE_INSTANCE)

        return resources
18134
public Object get(String name) throws IOException {
        if (name.equalsIgnoreCase(IS_CA)) {
            return (Boolean.valueOf(ca));
        } else if (name.equalsIgnoreCase(PATH_LEN)) {
            return (Integer.valueOf(pathLen));
        } else {
          throw new IOException("Attribute name not recognized by " +
                                "CertAttrSet:BasicConstraints.");
        }
    }
1033699
def resource(self, resource_type):
        
        try:
            resource = getattr(self.resources, self.safe_rt(resource_type))(self)
        except AttributeError:
            self._resources(True)
            resource = getattr(self.resources, self.safe_rt(resource_type))(self)
        return resource
993249
public Object getAttribute(String attrName) {
        Lock lock = lockForRead();
        try {
            return attributes != null ? attributes.get(attrName) : null;
        } finally {
            lock.unlock();
        }
    }
405948
public T get()
	{
		T value = get(null);

		if (value == null)
			throw new RuntimeException("Missing property for JAXB resource: " + name);
		else
			return value;
	}
1011684
def do_attr(environment, obj, name):
    
    try:
        name = str(name)
    except UnicodeError:
        pass
    else:
        try:
            value = getattr(obj, name)
        except AttributeError:
            pass
        else:
            if environment.sandboxed and not \
               environment.is_safe_attribute(obj, name, value):
                return environment.unsafe_undefined(obj, name)
            return value
    return environment.undefined(obj=obj, name=name)
1153409
public Attribute getAttribute(final String attributeName) {
		final Attribute a = attributes.get(attributeName);
		if (a == null)
			throw new IllegalArgumentException("Attribute " + attributeName + " doesn't exists");
		return a;
	}
463593
def get_from_instance(self, instance):
        
        # walk the attribute path to get the value. Similarly to Django, first
        # try getting the value from a dict, then as a attribute lookup, and
        # then as a list index
        for attr in self._path:
            try: # dict lookup
                instance = instance[attr]
            except (TypeError, AttributeError, KeyError, ValueError, IndexError):
                try: # attr lookup
                    instance = getattr(instance, attr)
                except (TypeError, AttributeError):
                    try:  # list-index lookup
                        instance = instance[int(attr)]
                    except (IndexError,  # list index out of range
                            ValueError,  # invalid literal for int()
                            KeyError,    # current is a dict without `int(bit)` key
                            TypeError):  # unsubscriptable object
                                raise VariableLookupError("Failed lookup for key [%s] in %r" % (attr, instance))

            if callable(instance):
                instance = instance()
            elif instance is None:  # no sense walking down the path any further
                return None

        return instance
1200027
def _get(self, instance, **kw):
        
        logger.debug("ATFieldManager::get: instance={} field={}"
                     .format(instance, self.field))

        # check the field permission
        if not self.field.checkPermission("read", instance):
            raise Unauthorized("You are not allowed to read the field {}"
                               .format(self.name))

        # return the field value
        return self.field.get(instance)
110425
def get_attribute(self, name):
        
        assert isinstance(name, compat.str_type)
        return self.__attributes.get(name)
465339
public Object get(String propName) {
        if (propName.equals("method")) {
            return getMethod();
        }
        if (propName.equals("object")) {
            return getObject();
        }
        if (propName.equals("attribute")) {
            return getAttribute();
        }
        return null;
    }
379401
def get(self):
        

        data = self.resource(self.name).properties.get()

        self.set_data(**data)

        return data