Validate that the specified property names are indeed defined on the given class.
340084
def validate_properties_exist(self, classname, property_names):
        """"""
        schema_element = self.get_element_by_class_name(classname)

        requested_properties = set(property_names)
        available_properties = set(schema_element.properties.keys())
        non_existent_properties = requested_properties - available_properties
        if non_existent_properties:
            raise InvalidPropertyError(
                u'Class "{}" does not have definitions for properties "{}": '
                u'{}'.format(classname, non_existent_properties, property_names))
362805
public boolean containsPropertySet(Class<? extends Annotation> propertySet)
    {
        //
        // Defer to any delegate map
        //
        if (_delegateMap != null)
            return _delegateMap.containsPropertySet(propertySet);

        return false;
    }
191280
def validate(self):
        
        properties = (
            getattr(self.__class__, prop)
            for prop in self._property_list
            if hasattr(self.__class__, prop)
        )

        all_valid = True
        for prop in properties:
            if hasattr(prop, "validate"):
                # oh for fucks sake, brython has broken parser and return in
                # prop.validate() will also return from this function if used
                # with `and` operator
                result = prop.validate()
                all_valid = all_valid and result

        return all_valid
343355
static boolean isValidPropertyName(FeatureSet mode, String name) {
    if (isValidSimpleName(name)) {
      return true;
    } else {
      return mode.has(Feature.KEYWORDS_AS_PROPERTIES) && TokenStream.isKeyword(name);
    }
  }
576005
def validate(self, obj, **kwargs):
        """"""
        text = stringify(obj)
        if text is None:
            return False
        if '.' not in text:
            return False
        if '@' in text or ':' in text:
            return False
        if len(text) < 4:
            return False
        return True
931440
def validate(self):
        

        validate_properties(self._data_map, self._metadata_props)

        for prop in self._data_map:
            validate_any(prop, getattr(self, prop), self._data_structures.get(prop))

        return self
1365297
function isValidProperty(name) {
    for (var keyName in EntryProperty) {
        if (EntryProperty.hasOwnProperty(keyName)) {
            if (EntryProperty[keyName] === name) {
                return true;
            }
        }
    }
    return false;
}
937411
public static boolean hasProperty(ClassNode classNode, String propertyName) {
        if(classNode == null || propertyName == null || "".equals(propertyName.trim()))
            return false;

        List properties = classNode.getProperties();
        for (Iterator i = properties.iterator(); i.hasNext();) {
            PropertyNode pn = (PropertyNode) i.next();
            if(pn.getName().equals(propertyName))
                return true;
        }
        return false;
    }
857768
def valid(cls, data, context=None):
        """"""
        return cls(cls.TagType.VALID, data, context)
645828
def _has_annotation(annotation, value):
    

    def matches_property_name(fun):
        """ return true if fun is a callable that has the correct annotation with value """
        return callable(fun) and hasattr(fun, annotation) \
               and getattr(fun, annotation) is value
    return matches_property_name
285193
public boolean satisfied( PropertySet properties)
    {
    boolean isSatisfied;
    Iterator<IAssertion> assertions;
    
    for( assertions = getAssertions(),
           isSatisfied = !assertions.hasNext();

         !isSatisfied
           && assertions.hasNext();

         isSatisfied = assertions.next().satisfied( properties));
    
    return isSatisfied;
    }
29173
def _validate_non_abstract_edge_has_defined_endpoint_types(class_name, properties):
    """"""
    edge_source = properties.get(EDGE_SOURCE_PROPERTY_NAME, None)
    edge_destination = properties.get(EDGE_DESTINATION_PROPERTY_NAME, None)
    has_defined_endpoint_types = all((
        edge_source is not None and edge_source.type_id == PROPERTY_TYPE_LINK_ID,
        edge_destination is not None and edge_destination.type_id == PROPERTY_TYPE_LINK_ID,
    ))
    if not has_defined_endpoint_types:
        raise IllegalSchemaStateError(u'Found a non-abstract edge class with undefined or illegal '
                                      u'in/out properties: {} {}'.format(class_name, properties))
959109
def check_property(prop, name, **kwargs):
    

    checkers = {
        'color': check_color,
        'alpha': check_alpha,
        'size': check_size,
        'thickness': check_thickness,
        'index': check_index,
        'coordinates': check_coordinates,
        'colormap': check_colormap,
        'bins': check_bins,
        'spec': check_spec
    }

    if name in checkers:
        return checkers[name](prop, **kwargs)
    elif isinstance(prop, list) or isinstance(prop, ndarray) or isscalar(prop):
        return check_1d(prop, name)
    else:
        return prop
576399
public void validate(String path, Schema schema, Object value, List<ValidationResult> results) {
		String name = path != null ? path : "value";
		List<String> found = new ArrayList<String>();

		for (String property : _properties) {
			Object propertyValue = ObjectReader.getProperty(value, property);
			if (propertyValue != null)
				found.add(property);
		}

		if (found.size() == 0) {
			results.add(new ValidationResult(path, ValidationResultType.Error, "VALUE_NULL",
					name + " must have at least one property from " + _properties, _properties, null));
		}
	}
1355984
def assert_valid(self, instance, value=None):
        """"""
        valid = super(Dictionary, self).assert_valid(instance, value)
        if not valid:
            return False
        if value is None:
            value = instance._get(self.name)
        if value is None:
            return True
        if self.key_prop or self.value_prop:
            for key, val in iteritems(value):
                if self.key_prop:
                    self.key_prop.assert_valid(instance, key)
                if self.value_prop:
                    self.value_prop.assert_valid(instance, val)
        return True
1345602
def validate(self, name, value):
        """"""

        if self.valid_set and value not in self.valid_set:
            raise ImproperlyConfigured(
                "%s: \"%s\" is not a valid setting (choose between %s)." %
                (name, value, ", ".join("\"%s\"" % x for x in self.valid_set)))

        return value
1196674
private boolean isClientClass(String className, Set<ASMData> clientClasses)
	{
		for (ASMData data : clientClasses)
		{
			if (data.getClassName().equals(className) && data.getObjectName().equals(data.getClassName())
					&& ((ModAnnotation.EnumHolder) data.getAnnotationInfo().get("value")).getValue().equals("CLIENT"))
				return true;
		}
		return false;
	}