@Evolving public interface ModelCatalog
| Modifier and Type | Method and Description | 
|---|---|
Model | 
alterModel(NameIdentifier ident,
          ModelChange... changes)
Applies the  
changes to a model in the catalog. | 
ModelVersion | 
alterModelVersion(NameIdentifier ident,
                 int version,
                 ModelVersionChange... changes)
Applies the specified  
changes to a model version identified by its
 version number. | 
ModelVersion | 
alterModelVersion(NameIdentifier ident,
                 java.lang.String alias,
                 ModelVersionChange... changes)
Applies the specified  
changes to a model version identified by its
 alias. | 
boolean | 
deleteModel(NameIdentifier ident)
Delete the model from the catalog. 
 | 
boolean | 
deleteModelVersion(NameIdentifier ident,
                  int version)
Delete the model version by the  
NameIdentifier and version number. | 
boolean | 
deleteModelVersion(NameIdentifier ident,
                  java.lang.String alias)
Delete the model version by the  
NameIdentifier and version alias. | 
Model | 
getModel(NameIdentifier ident)
Get a model metadata by  
NameIdentifier from the catalog. | 
ModelVersion | 
getModelVersion(NameIdentifier ident,
               int version)
Get a model version by the  
NameIdentifier and version number from the catalog. | 
ModelVersion | 
getModelVersion(NameIdentifier ident,
               java.lang.String alias)
Get a model version by the  
NameIdentifier and version alias from the catalog. | 
void | 
linkModelVersion(NameIdentifier ident,
                java.lang.String uri,
                java.lang.String[] aliases,
                java.lang.String comment,
                java.util.Map<java.lang.String,java.lang.String> properties)
Link a new model version to the registered model object. 
 | 
NameIdentifier[] | 
listModels(Namespace namespace)
List the models in a schema namespace from the catalog. 
 | 
int[] | 
listModelVersions(NameIdentifier ident)
List all the versions of the register model by  
NameIdentifier in the catalog. | 
default boolean | 
modelExists(NameIdentifier ident)
Check if a model exists using an  
NameIdentifier from the catalog. | 
default boolean | 
modelVersionExists(NameIdentifier ident,
                  int version)
Check if the model version exists by the  
NameIdentifier and version number. | 
default boolean | 
modelVersionExists(NameIdentifier ident,
                  java.lang.String alias)
Check if the model version exists by the  
NameIdentifier and version alias. | 
Model | 
registerModel(NameIdentifier ident,
             java.lang.String comment,
             java.util.Map<java.lang.String,java.lang.String> properties)
Register a model in the catalog if the model is not existed, otherwise the  
ModelAlreadyExistsException will be thrown. | 
default Model | 
registerModel(NameIdentifier ident,
             java.lang.String uri,
             java.lang.String[] aliases,
             java.lang.String comment,
             java.util.Map<java.lang.String,java.lang.String> properties)
Register a model in the catalog if the model is not existed, otherwise the  
ModelAlreadyExistsException will be thrown. | 
NameIdentifier[] listModels(Namespace namespace) throws NoSuchSchemaException
namespace - A schema namespace.NoSuchSchemaException - If the schema does not exist.Model getModel(NameIdentifier ident) throws NoSuchModelException
NameIdentifier from the catalog.ident - A model identifier.NoSuchModelException - If the model does not exist.default boolean modelExists(NameIdentifier ident)
NameIdentifier from the catalog.ident - A model identifier.Model registerModel(NameIdentifier ident, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws NoSuchSchemaException, ModelAlreadyExistsException
ModelAlreadyExistsException will be thrown. The Model object will be created when the
 model is registered, users can call linkModelVersion(NameIdentifier,
 String, String[], String, Map) to link the model version to the registered Model.ident - The name identifier of the model.comment - The comment of the model. The comment is optional and can be null.properties - The properties of the model. The properties are optional and can be null or
     empty.NoSuchSchemaException - If the schema does not exist.ModelAlreadyExistsException - If the model already registered.default Model registerModel(NameIdentifier ident, java.lang.String uri, java.lang.String[] aliases, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws NoSuchSchemaException, ModelAlreadyExistsException, ModelVersionAliasesAlreadyExistException
ModelAlreadyExistsException will be thrown. The Model object will be created when the
 model is registered, in the meantime, the model version (version 0) will also be created and
 linked to the registered model.ident - The name identifier of the model.uri - The model artifact URI.aliases - The aliases of the model version. The aliases should be unique in this model,
     otherwise the ModelVersionAliasesAlreadyExistException will be thrown. The aliases
     are optional and can be empty. Also, be aware that the alias cannot be a number or a number
     string.comment - The comment of the model. The comment is optional and can be null.properties - The properties of the model. The properties are optional and can be null or
     empty.NoSuchSchemaException - If the schema does not exist when register a model.ModelAlreadyExistsException - If the model already registered.ModelVersionAliasesAlreadyExistException - If the aliases already exist in the model.boolean deleteModel(NameIdentifier ident)
ident - The name identifier of the model.int[] listModelVersions(NameIdentifier ident) throws NoSuchModelException
NameIdentifier in the catalog.ident - The name identifier of the model.NoSuchModelException - If the model does not exist.ModelVersion getModelVersion(NameIdentifier ident, int version) throws NoSuchModelVersionException
NameIdentifier and version number from the catalog.ident - The name identifier of the model.version - The version number of the model.NoSuchModelVersionException - If the model version does not exist.ModelVersion getModelVersion(NameIdentifier ident, java.lang.String alias) throws NoSuchModelVersionException
NameIdentifier and version alias from the catalog.ident - The name identifier of the model.alias - The version alias of the model.NoSuchModelVersionException - If the model version does not exist.default boolean modelVersionExists(NameIdentifier ident, int version)
NameIdentifier and version number. If the
 model version exists, return true, otherwise return false.ident - The name identifier of the model.version - The version number of the model.default boolean modelVersionExists(NameIdentifier ident, java.lang.String alias)
NameIdentifier and version alias. If the model
 version exists, return true, otherwise return false.ident - The name identifier of the model.alias - The version alias of the model.void linkModelVersion(NameIdentifier ident, java.lang.String uri, java.lang.String[] aliases, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws NoSuchModelException, ModelVersionAliasesAlreadyExistException
ident - The name identifier of the model.uri - The URI of the model version artifact.aliases - The aliases of the model version. The aliases should be unique in this model,
     otherwise the ModelVersionAliasesAlreadyExistException will be thrown. The aliases
     are optional and can be empty. Also, be aware that the alias cannot be a number or a number
     string.comment - The comment of the model version. The comment is optional and can be null.properties - The properties of the model version. The properties are optional and can be
     null or empty.NoSuchModelException - If the model does not exist.ModelVersionAliasesAlreadyExistException - If the aliases already exist in the model.boolean deleteModelVersion(NameIdentifier ident, int version)
NameIdentifier and version number. If the model version
 does not exist, return false. If the model version is deleted, return true.ident - The name identifier of the model.version - The version number of the model.boolean deleteModelVersion(NameIdentifier ident, java.lang.String alias)
NameIdentifier and version alias. If the model version
 does not exist, return false. If the model version is deleted, return true.ident - The name identifier of the model.alias - The version alias of the model.Model alterModel(NameIdentifier ident, ModelChange... changes) throws NoSuchModelException, java.lang.IllegalArgumentException
changes to a model in the catalog.
 Implementations may reject the changes. If any change is rejected, no changes should be applied to the model.
ident - the NameIdentifier instance of the model to alterchanges - the several ModelChange instances to apply to the modelModel instanceNoSuchModelException - If the model does not existjava.lang.IllegalArgumentException - If the change is rejected by the implementationModelVersion alterModelVersion(NameIdentifier ident, int version, ModelVersionChange... changes) throws NoSuchModelException, NoSuchModelVersionException, java.lang.IllegalArgumentException
changes to a model version identified by its
 version number.
 If any change is rejected by the implementation, no changes will be applied.
ident - the NameIdentifier of the model to be alteredversion - the version number of the model version to be alteredchanges - one or more ModelVersionChange instances to applyModelVersion instanceNoSuchModelVersionException - if the specified model version does not existjava.lang.IllegalArgumentException - if any change is rejected by the implementationNoSuchModelExceptionModelVersion alterModelVersion(NameIdentifier ident, java.lang.String alias, ModelVersionChange... changes) throws NoSuchModelException, java.lang.IllegalArgumentException
changes to a model version identified by its
 alias.
 If any change is rejected by the implementation, no changes will be applied.
ident - the NameIdentifier of the model to be alteredalias - the alias of the model version to be alteredchanges - one or more ModelVersionChange instances to applyModelVersion instanceNoSuchModelVersionException - if the specified model version does not existjava.lang.IllegalArgumentException - if any change is rejected by the implementationNoSuchModelException