<commit_before>
# 
# Copyright 2010-2013 University of Southern California
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#    http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

"""ERMREST URL abstract syntax tree (AST) classes for catalog resources.

"""
import psycopg2
from ermrest import sanepg2

import model
import data

from model import Api

class Catalogs (Api):
    """A multi-tenant catalog set."""
    pass

class Catalog (Api):
    """A specific catalog by ID."""
    def __init__(self, catalog_id):
        self.catalog_id = catalog_id

    def schemas(self):
        """The schema set for this catalog."""
        return model.Schemas(self)

    def schema(self, name):
        """A specific schema for this catalog."""
        return model.Schema(self, name)

    def entity(self, epath):
        """An entity set for this catalog."""<commit_msg>fix ancestor Api class init from Catalog and Catalogs instances<commit_after>
# 
# Copyright 2010-2013 University of Southern California
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#    http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

"""ERMREST URL abstract syntax tree (AST) classes for catalog resources.

"""
import psycopg2
from ermrest import sanepg2

import model
import data

from model import Api

class Catalogs (Api):
    """A multi-tenant catalog set."""
    def __init__(self):
        Api.__init__(self, None)

class Catalog (Api):
    """A specific catalog by ID."""
    def __init__(self, catalog_id):
        Api.__init__(self, self)
        self.catalog_id = catalog_id

    def schemas(self):
        """The schema set for this catalog."""
        return model.Schemas(self)

    def schema(self, name):
        """A specific schema for this catalog."""
        return model.Schema(self, name)

    def entity(self, epath):
        """An entity set for this catalog."""
{'fraction_non_alphanumeric': 0.08978553253362413, 'fraction_numerical': 0.010178117048346057, 'mean_word_length': 3.460291734197731, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6164123', 'n_tokens_mistral': 757, 'n_tokens_neox': 730, 'n_words': 335}