public function addAllowedSchema(SchemaInterface $schema)
    {
        $exists = false;
        foreach ($this->allowedSchemas as $allowedSchema) {
            if ($allowedSchema->getId() == $schema->getId()) {
                $exists = true;
            }
        }

        if (!$exists) {
            $this->allowedSchemas[] = $schema;
        }

        return $this;
    }