Validate a |Subsystem|.

    Checks its state and cut.
509744
def subsystem(s):
    
    node_states(s.state)
    cut(s.cut, s.cut_indices)
    if config.VALIDATE_SUBSYSTEM_STATES:
        state_reachable(s)
    return True
657157
def _validate(self, writing=False):
        """"""
        if (((len(self.fragment_offset) != len(self.fragment_length)) or
             (len(self.fragment_length) != len(self.data_reference)))):
            msg = ("The lengths of the fragment offsets ({len_offsets}), "
                   "fragment lengths ({len_fragments}), and "
                   "data reference items ({len_drefs}) must be the same.")
            msg = msg.format(len_offsets=len(self.fragment_offset),
                             len_fragments=len(self.fragment_length),
                             len_drefs=len(self.data_reference))
            self._dispatch_validation_error(msg, writing=writing)
        if any([x <= 0 for x in self.fragment_offset]):
            msg = "Fragment offsets must all be positive."
            self._dispatch_validation_error(msg, writing=writing)
        if any([x <= 0 for x in self.fragment_length]):
            msg = "Fragment lengths must all be positive."
            self._dispatch_validation_error(msg, writing=writing)
1208066
def validate(self):
        """"""

        changes = self.change_collector.collect_changes()

        features = []
        imported_okay = True
        for importer, modname, modpath in changes.new_feature_info:
            try:
                mod = importer()
                features.extend(_get_contrib_features(mod))
            except (ImportError, SyntaxError):
                logger.info(
                    'Failed to import module at {}'
                    .format(modpath))
                logger.exception('Exception details: ')
                imported_okay = False

        if not imported_okay:
            return False

        # if no features were added at all, reject
        if not features:
            logger.info('Failed to collect any new features.')
            return False

        return all(
            validate_feature_api(feature, self.X, self.y, subsample=False)
            for feature in features
        )
484070
def apply_cut(self, cut):
        
        return Subsystem(self.network, self.state, self.node_indices,
                         cut=cut, mice_cache=self._mice_cache)
229489
def validate(cls):
        
        if cls.get_dict():
            cls.show_error(False)
            return True

        cls.show_error(True)
        return False
134642
def validate(self, lsid, check_existing=True):
        
        # Base LSID matches
        if not lsid.startswith(self.base_lsid):
            return False

        # Module number isn't already taken
        if check_existing and lsid in self.registered_modules:
            return False

        # Everything checks out, return True
        return True
1341258
public function validate()
    {
        $data = $this->wasSubmitted() === true ? $this->getSubmitted() : null;

        // Invalid selection on choice/multiple choice field
        if ($data === []) {
            $this->addError("Unrecognized choice.");
        }

        if ($this->isRequired() === true && $data === null) {
            $this->addError("This field is required.");
        }

        if ($this->getErrors() === []) {
            $this->setValidatedData($data);
        }
    }
617452
def validate(self):
        """"""
        if self.error:
            return False

        for v in self.validators:
            self.error = v(self.value)
            if self.error:
                return False

        return True
371763
def subsystems(cls):
    
    ret = set()
    for goal in cls.all():
      ret.update(goal.subsystems())
    return ret
1341884
def validate(self, arg=None):
        """"""
        if os.path.isdir(self.path):
            self.validator.object = None
        else:
            self.validator.object = ICONS['error']
95839
def _validate_duplication(self, subj_and_pred, cl):
        """"""
        subj, pred = subj_and_pred

        log.info("Validating duplication of member %s" % pred)
        if (subj, pred) in self.checked_attributes:
            err = self.err("{0} - duplicated member of {1}",
                           self._field_name_from_uri(pred),
                           self._field_name_from_uri(cl))
            return ValidationWarning(ValidationResult.WARNING, err['err'],
                                     err['line'], err['num'])
643160
def Validate(self):
    """"""
    if not self.check_id:
      raise DefinitionError("Check has missing check_id value")
    cls_name = self.check_id
    if not self.method:
      raise DefinitionError("Check %s has no methods" % cls_name)
    ValidateMultiple(self.method,
                     "Check %s has invalid method definitions" % cls_name)
603704
public IStatus validate(ISREInstall sre) {
		final IStatus status;
		if (this.enableSystemWideSelector && this.systemSREButton.getSelection()) {
			if (SARLRuntime.getDefaultSREInstall() == null) {
				status = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR, Messages.SREConfigurationBlock_5);
			} else {
				status = SARLEclipsePlugin.getDefault().createOkStatus();
			}
		} else if (!this.projectProviderFactories.isEmpty() && this.projectSREButton.getSelection()) {
			if (retreiveProjectSRE() == null) {
				status = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
							Messages.SREConfigurationBlock_6);
			} else {
				status = SARLEclipsePlugin.getDefault().createOkStatus();
			}
		} else if (this.runtimeEnvironments.isEmpty()) {
			status = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
					Messages.SREConfigurationBlock_8);
		} else {
			status = sre.getValidity();
		}
		return status;
	}
778846
static void parseSubsystems(ModelNode node, List<Subsystem> subsystems) {
        List<Property> properties = node.get("subsystem").asPropertyList();
        for (Property property : properties) {
            Subsystem subsystem = new Subsystem(property.getName(), property.getValue());
            subsystems.add(subsystem);
        }
    }
807100
protected void validate() {
        Assert.checkNotNullParam("endpoint", endpoint);
        Assert.checkNotNullParam("optionMap", optionMap);
        Assert.checkNotNullParam("uri", uri);
    }
382179
def validate(self, input, is_substitute): # ToDo: apply 'no substitute' for initial load validations
        
        constraint = self.__get_constraint(input)
        to_validate = self.__get_to_validate(input)
        return self.__compare(to_validate, constraint)
679366
def validate(self):
        """"""
        errors = []
        app = errors.append

        if not self.hint_cores >= self.mpi_procs * self.omp_threads >= self.min_cores:
            app("self.hint_cores >= mpi_procs * omp_threads >= self.min_cores not satisfied")

        if self.omp_threads > self.hw.cores_per_node:
            app("omp_threads > hw.cores_per_node")

        if self.mem_per_proc > self.hw.mem_per_node:
            app("mem_mb >= self.hw.mem_per_node")

        if not self.max_mem_per_proc >= self.mem_per_proc >= self.min_mem_per_proc:
            app("self.max_mem_per_proc >= mem_mb >= self.min_mem_per_proc not satisfied")

        if self.priority <= 0:
            app("priority must be > 0")

        if not (1 <= self.min_cores <= self.hw.num_cores >= self.hint_cores):
            app("1 <= min_cores <= hardware num_cores >= hint_cores not satisfied")

        if errors:
            raise self.Error(str(self) + "\n".join(errors))