Validates the given metadata for a series of conditions to ensure the table is well-formed.

@param meta Table metadata
351297
private void validateCreateTable(ConnectorTableMetadata meta)
    {
        validateColumns(meta);
        validateLocalityGroups(meta);
        if (!AccumuloTableProperties.isExternal(meta.getProperties())) {
            validateInternalTable(meta);
        }
    }
1262400
private function validateIdStrategy(EntityMetadata $metadata)
    {
        $persistence = $metadata->persistence;
        $validIdStrategies = ['object'];
        if (!in_array($persistence->idStrategy, $validIdStrategies)) {
            throw MetadataException::invalidMetadata($metadata->type, sprintf('The persistence id strategy "%s" is invalid. Valid types are "%s"', $persistence->idStrategy, implode('", "', $validIdStrategies)));
        }
    }
164016
public void log(final Metadata metadata) {
        final StringBuilder sb = new StringBuilder();

        for (final MetadataItem item : metadata.getGroupList()) {
            sb.append(LINE);
            sb.append(NEWLINE);
            sb.append(LINE);
            sb.append("Group: " + item.getName());
            sb.append(NEWLINE);
            for (MetadataElement element : item.getElements()) {
                sb.append("  Element  : " + element.getName());
                sb.append(NEWLINE);
                sb.append("  Type     : " + element.getType());
                sb.append(NEWLINE);
                sb.append("  MinOccurs: " + element.getMinOccurs());
                sb.append(NEWLINE);
                sb.append("  MaxOccurs: " + element.getMaxOccurs());
                sb.append(NEWLINE);
                sb.append("  IsAttr   : " + element.getIsAttribute());
                sb.append(NEWLINE);
                sb.append(NEWLINE);
            }

            for (MetadataElement element : item.getReferences()) {
                sb.append("  Ref      : " + element.getRef());
                sb.append(NEWLINE);
            }
            sb.append(NEWLINE);

        }

        for (MetadataEnum enumItem : metadata.getEnumList()) {
            sb.append(LINE);
            sb.append(NEWLINE);
            sb.append("Enum: " + enumItem.getName());
            sb.append(NEWLINE);
            for (String enumValue : enumItem.getValueList()) {
                sb.append("  Value    : " + enumValue);
                sb.append(NEWLINE);
            }
            sb.append(NEWLINE);
        }

        for (MetadataItem item : metadata.getClassList()) {
            sb.append(LINE);
            sb.append(NEWLINE);
            sb.append("Class: " + item.getName());
            sb.append(NEWLINE);
            for (MetadataElement element : item.getElements()) {
                sb.append("  Element  : " + element.getName());
                sb.append(NEWLINE);
                sb.append("  Type     : " + element.getType());
                sb.append(NEWLINE);
                sb.append("  MinOccurs: " + element.getMinOccurs());
                sb.append(NEWLINE);
                sb.append("  MaxOccurs: " + element.getMaxOccurs());
                sb.append(NEWLINE);
                sb.append("  IsAttr   : " + element.getIsAttribute());
                sb.append(NEWLINE);
                sb.append(NEWLINE);
            }

            for (MetadataElement element : item.getReferences()) {
                sb.append("  Ref      : " + element.getRef());
                sb.append(NEWLINE);
            }
            sb.append(NEWLINE);
        }

        for (MetadataItem dataType : metadata.getDataTypeList()) {
            sb.append(LINE);
            sb.append(NEWLINE);
            sb.append("Name    : " + dataType.getName());
            sb.append(NEWLINE);
            sb.append("MappedTo: " + dataType.getMappedTo());
            sb.append(NEWLINE);
        }

        // Log
        log.info(sb.toString());
    }
255899
public static void validateMinimumTables(GeoPackageCore geoPackage) {
		if (!hasMinimumTables(geoPackage)) {
			throw new GeoPackageException(
					"Invalid GeoPackage. Does not contain required tables: "
							+ SpatialReferenceSystem.TABLE_NAME + " & "
							+ Contents.TABLE_NAME + ", GeoPackage Name: "
							+ geoPackage.getName());
		}
	}
632368
private void checkMetadata() {
    if (!localMember.properties().equals(localProperties)) {
      localProperties = new Properties();
      localProperties.putAll(localMember.properties());
      LOGGER.debug("{} - Detected local properties change {}", localMember.id(), localProperties);
      localMember.setIncarnationNumber(localMember.getIncarnationNumber() + 1);
      post(new GroupMembershipEvent(GroupMembershipEvent.Type.METADATA_CHANGED, localMember));
      recordUpdate(localMember.copy());
    }
  }
32716
private static function checkValidate(Meta $m)
    {
        if (!empty($m->getAllow()['validate'])) {
            if ($m->getAllow()['validate'] === "email" && !Check::email($m->getValue())) {
                if ($m->getDefault() === false)
                    $m->setError("email inválido.");
                else
                    $m->setValue($m->getDefault(), !1);

            } elseif ($m->getAllow()['validate'] === "cpf" && !Check::cpf($m->getValue())) {
                if ($m->getDefault() === false)
                    $m->setError("CPF inválido.");
                else
                    $m->setValue($m->getDefault(), !1);

            } elseif ($m->getAllow()['validate'] === "cnpj" && !Check::cnpj($m->getValue())) {
                if ($m->getDefault() === false)
                    $m->setError("CNPJ inválido.");
                else
                    $m->setValue($m->getDefault(), !1);
            }
        }
    }
1235861
@Override
    protected void validate(List<TableInfo> tableInfos)
    {
        try
        {
            if (!checkForDBExistence())
            {
                throw new SchemaGenerationException("Database " + databaseName + " not exist");
            }

            for (TableInfo tableInfo : tableInfos)
            {
                Map<String, MapReduce> views = new HashMap<String, MapReduce>();
                String id = CouchDBConstants.DESIGN + tableInfo.getTableName();
                CouchDBDesignDocument designDocument = getDesignDocument(id);
                designDocument.setLanguage(CouchDBConstants.LANGUAGE);
                views = designDocument.getViews();
                if (views == null)
                {
                    logger.warn("No view exist for table " + tableInfo.getTableName()
                            + "so any query will not produce any result");
                    return;
                }
                for (IndexInfo indexInfo : tableInfo.getColumnsToBeIndexed())
                {
                    if (views.get(indexInfo.getColumnName()) == null)
                    {
                        logger.warn("No view exist for column " + indexInfo.getColumnName() + " of table "
                                + tableInfo.getTableName() + "so any query on column " + indexInfo.getColumnName()
                                + "will not produce any result");
                    }
                }

                // for id column.
                if (views.get(tableInfo.getIdColumnName()) == null)
                {
                    logger.warn("No view exist for id column " + tableInfo.getIdColumnName() + " of table "
                            + tableInfo.getTableName() + "so any query on id column " + tableInfo.getIdColumnName()
                            + "will not produce any result");
                }

                // for select all.
                if (views.get("all") == null)
                {
                    logger.warn("No view exist for select all for table " + tableInfo.getTableName()
                            + "so select all query will not produce any result");
                }
            }
        }
        catch (Exception e)
        {
            throw new SchemaGenerationException("Database " + databaseName + " not exist");
        }
    }
1208651
private void generateMetaClass() {
        if (data.isBeanStyleLightOrMinimal()) {
            return;
        }
        generateSeparator();
        addLine(1, "/**");
        addLine(1, " * The meta-bean for {@code " + data.getTypeRaw() + "}.");
        if (data.isTypeGeneric()) {
            for (int j = 0; j < data.getTypeGenericCount(); j++) {
                addLine(1, " * @param " + data.getTypeGenericName(j, true) + "  the type");
            }
        }
        addLine(1, " */");
        String superMeta;
        if (data.isSubClass()) {
            superMeta = data.getSuperTypeRaw() + ".Meta" + data.getSuperTypeGeneric(true);
        } else {
            data.ensureImport(DirectMetaBean.class);
            superMeta = "DirectMetaBean";
        }
        String finalType = data.isTypeFinal() ? "final " : "";
        if (data.isTypeGeneric()) {
            addLine(1, data.getEffectiveMetaScope() + "static " + finalType + 
                    "class Meta" + data.getTypeGeneric(true) + " extends " + superMeta + " {");
        } else {
            addLine(1, data.getEffectiveMetaScope() + "static " + finalType + 
                    "class Meta extends " + superMeta + " {");
        }
        addLine(2, "/**");
        addLine(2, " * The singleton instance of the meta-bean.");
        addLine(2, " */");
        if (data.isTypeGeneric()) {
            addLine(2, "@SuppressWarnings(\"rawtypes\")");
        }
        addLine(2, "static final Meta INSTANCE = new Meta();");
        addBlankLine();
        generateMetaPropertyConstants();
        generateMetaPropertyMapSetup();
        addLine(2, "/**");
        addLine(2, " * Restricted constructor.");
        addLine(2, " */");
        addLine(2, data.getNestedClassConstructorScope() + " Meta() {");
        addLine(2, "}");
        addBlankLine();
        generateMetaPropertyGet();
        generateMetaBuilder();
        generateMetaBeanType();
        generateMetaPropertyMap();
        generateIndentedSeparator();
        generateMetaPropertyMethods();
        generateIndentedSeparator();
        generateMetaGetPropertyValue();
        generateMetaSetPropertyValue();
        generateMetaValidate();
        addLine(1, "}");
        addBlankLine();
    }
113861
public function storeMeta($metaData, $metaType, $metaId, $metaModel = Meta::class)
    {
        // Validation required instead of type hinting because it could be passed as false or NULL
        if (!is_array($metaData)) {
            return;
        }

        foreach ($metaData as $key => $value) {
            $modelInstance = call_user_func(
                [$metaModel, 'firstOrNew'],
                [
                    'key'       => $key,
                    'meta_type' => $metaType,
                    'meta_id'   => $metaId,
                ]
            );

            $value = $this->removeEmptyValues($value);
            if (!empty($value)) {
                $modelInstance->setAttribute('value', $value);
                $modelInstance->save();
                continue;
            }

            // The value is empty, remove the row
            if ($modelInstance->exists) {
                $modelInstance->delete();
            }
        }
    }
384646
protected function validate(PropertyMetadata $metadata, string $name, & $value)
	{
		if (!$metadata->isValid($value)) {
			$class = get_class($this);
			throw new InvalidArgumentException("Value for {$class}::\${$name} property is invalid.");
		}
	}
533836
protected void validate(List<TableInfo> tableInfos)
    {
        try
        {
            HTableDescriptor hTableDescriptor = admin.getTableDescriptor(databaseName.getBytes());
            HColumnDescriptor[] columnFamilies = hTableDescriptor.getColumnFamilies();
            for (TableInfo tableInfo : tableInfos)
            {
                if (tableInfo != null)
                {
                    boolean isColumnFound = false;
                    for (HColumnDescriptor columnDescriptor : columnFamilies)
                    {
                        if (columnDescriptor.getNameAsString().equalsIgnoreCase(tableInfo.getTableName()))
                        {
                            isColumnFound = true;
                            break;
                        }
                    }
                    if (!isColumnFound)
                    {
                        throw new SchemaGenerationException("column " + tableInfo.getTableName()
                                + " does not exist in table " + databaseName + "", "Hbase", databaseName,
                                tableInfo.getTableName());
                    }
                }
            }
        }
        catch (TableNotFoundException tnfex)
        {
            throw new SchemaGenerationException("table " + databaseName + " does not exist ", tnfex, "Hbase");
        }
        catch (IOException ioe)
        {
            logger.error("Either check for network connection or table isn't in enabled state, Caused by:", ioe);
            throw new SchemaGenerationException(ioe, "Hbase");
        }
    }
705878
def _validate_metadata(metadata_props):
    '''
    
    '''
    if len(CaseInsensitiveDict(metadata_props)) != len(metadata_props):
        raise RuntimeError('Duplicate metadata props found')

    for key, value in metadata_props.items():
        valid_values = KNOWN_METADATA_PROPS.get(key)
        if valid_values and value.lower() not in valid_values:
            warnings.warn('Key {} has invalid value {}. Valid values are {}'.format(key, value, valid_values))
311289
private static function getValidatorStaticMeta(): ValidatorStaticMeta
    {
        if (null === self::$validatorStaticMeta) {
            self::$validatorStaticMeta = new ValidatorStaticMeta(self::getDoctrineStaticMeta());
        }

        return self::$validatorStaticMeta;
    }
244616
@Override
    protected void validate(List<TableInfo> tableInfos)
    {
        for (TableInfo tableInfo : tableInfos)
        {
            try
            {
                if (!client.tableExists(tableInfo.getTableName()))
                {
                    throw new SchemaGenerationException("Table: " + tableInfo.getTableName() + " does not exist ");
                }
            }
            catch (Exception e)
            {
                logger.error("Error while validating tables, Caused by: " + e.getMessage());
                throw new KunderaException("Error while validating tables, Caused by: " + e.getMessage());
            }
        }
    }
994890
private function validateCollectionNaming(EntityMetadata $metadata)
    {
        $persistence = $metadata->persistence;
        if (false === $this->entityUtil->isEntityTypeValid($persistence->collection)) {
            throw MetadataException::invalidMetadata(
                $metadata->type,
                sprintf('The entity persistence collection "%s" is invalid based on the configured name format "%s"',
                        $persistence->collection,
                        $this->entityUtil->getRestConfig()->getEntityFormat()
                )
            );
        }
    }
341347
public void removeNodeMetaData(Object key) {
        if (key==null) throw new GroovyBugError("Tried to remove meta data with null key "+this+".");
        if (metaDataMap == null) {
            return;
        }
        metaDataMap.remove(key);
    }
865458
private <X extends Class, T extends Object> void populateMetadata(EntityMetadata metadata, Class<X> clazz,
            Map puProperties)
    {
        // process for metamodelImpl

        if (metadata.getPersistenceUnit() != null)
        {
            MetaModelBuilder<X, T> metaModelBuilder = kunderaMetadata.getApplicationMetadata().getMetaModelBuilder(
                    metadata.getPersistenceUnit());

            onBuildMetaModelSuperClass(clazz.getSuperclass(), metaModelBuilder);

            metaModelBuilder.process(clazz);

            for (Field f : clazz.getDeclaredFields())
            {
                if (f != null && !Modifier.isStatic(f.getModifiers()) && !Modifier.isTransient(f.getModifiers())
                        && !f.isAnnotationPresent(Transient.class))
                {
                    // construct metamodel.
                    metaModelBuilder.construct(clazz, f);

                    // on id attribute.
                    onIdAttribute(metaModelBuilder, metadata, clazz, f);

                    // determine if it is a column family or super column
                    // family.
                    onFamilyType(metadata, clazz, f);
                }
            }

            EntityType entityType = (EntityType) metaModelBuilder.getManagedTypes().get(metadata.getEntityClazz());

            validateAndSetId(metadata, clazz, metaModelBuilder);
            validateandSetEntityType(metadata, clazz, metaModelBuilder);
            MetadataUtils.onJPAColumnMapping(entityType, metadata);

            /* Scan for Relationship field */
            populateRelationMetaData(entityType, clazz, metadata);
        }
    }