class SimpleCatalogManager implements CatalogManager {

    @Override
    public <T extends Record> void addRecord(Resource catalogId, T record) {
        try (RepositoryConnection conn = configProvider.getRepository().getConnection()) {
            if (conn.containsContext(record.getResource())) {
                throw utils.throwAlreadyExists(record.getResource(), recordFactory);
            }
            record.setCatalog(utils.getObject(catalogId, catalogFactory, conn));
            conn.begin();
            if (record.getModel().contains(null, vf.createIRI(com.mobi.ontologies.rdfs.Resource.type_IRI),
                    versionedRDFRecordFactory.getTypeIRI())) {
                addMasterBranch((VersionedRDFRecord) record, conn);
            } else {
                utils.addObject(record, conn);
            }
            conn.commit();
        }
    }

    public  SimpleCatalogManager();

}