Class Artifact

java.lang.Object
ai.djl.repository.Artifact

public class Artifact extends Object
An Artifact is a set of data files such as a model or dataset.
See Also:
  • Constructor Details

    • Artifact

      public Artifact()
  • Method Details

    • getMetadataVersion

      public String getMetadataVersion()
      Returns the metadata format version.
      Returns:
      the metadata format version
    • setMetadataVersion

      public void setMetadataVersion(String metadataVersion)
      Sets the metadata format version.
      Parameters:
      metadataVersion - the new version
    • getVersion

      public String getVersion()
      Returns the artifact version.
      Returns:
      the artifact version
      See Also:
    • setVersion

      public void setVersion(String version)
      Sets the artifact version.
      Parameters:
      version - the new version
      See Also:
    • isSnapshot

      public boolean isSnapshot()
      Returns true if the artifact is a snapshot.
      Returns:
      true if the artifact is a snapshot
      See Also:
    • setSnapshot

      public void setSnapshot(boolean snapshot)
      Sets if the artifact is a snapshot.
      Parameters:
      snapshot - true to make the artifact a snapshot
      See Also:
    • getName

      public String getName()
      Returns the artifact name.
      Returns:
      the artifact name
    • setName

      public void setName(String name)
      Sets the artifact name.
      Parameters:
      name - the new name
    • getProperties

      public Map<String,String> getProperties()
      Returns the artifact properties.
      Returns:
      the artifact properties
      See Also:
    • setProperties

      public void setProperties(Map<String,String> properties)
      Sets the artifact properties.
      Parameters:
      properties - the new properties
      See Also:
    • getArguments

      public Map<String,Object> getArguments(Map<String,Object> override)
      Returns the artifact arguments.
      Parameters:
      override - the override configurations to the default arguments
      Returns:
      the artifact arguments
      See Also:
    • getArguments

      public Map<String,Object> getArguments()
      Returns the artifact arguments.
      Returns:
      the artifact arguments
    • setArguments

      public void setArguments(Map<String,Object> arguments)
      Sets the artifact arguments.
      Parameters:
      arguments - the new arguments
      See Also:
    • getOptions

      public Map<String,String> getOptions(Map<String,String> override)
      Returns the artifact options.
      Parameters:
      override - the override options to the default options
      Returns:
      the artifact options
    • setOptions

      public void setOptions(Map<String,String> options)
      Sets the artifact arguments.
      Parameters:
      options - the new arguments
    • getMetadata

      public Metadata getMetadata()
      Returns the metadata containing this artifact.
      Returns:
      the metadata containing this artifact
      See Also:
    • setMetadata

      public void setMetadata(Metadata metadata)
      Sets the associated metadata.
      Parameters:
      metadata - the new metadata
      See Also:
    • getResourceUri

      public URI getResourceUri()
      Returns the location of the resource directory.
      Returns:
      the location of the resource directory
    • getFiles

      public Map<String,Artifact.Item> getFiles()
      Returns all the file items in the artifact.
      Returns:
      all the file items in the artifact
    • setFiles

      public void setFiles(Map<String,Artifact.Item> files)
      Sets the file items.
      Parameters:
      files - the replacement file items
    • hasProperties

      public boolean hasProperties(Map<String,String> filter)
      Returns true if every filter matches the corresponding property.
      Parameters:
      filter - the values to check against the properties
      Returns:
      true if every filter matches the corresponding property
      See Also:
    • getParsedVersion

      public Version getParsedVersion()
      Returns the artifact version as a Version.
      Returns:
      the artifact version as a Version
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object