Class Artifact


  • public class Artifact
    extends java.lang.Object
    An Artifact is a set of data files such as a model or dataset.
    See Also:
    Repository
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Artifact.Item
      A file (possibly compressed) within an Artifact.
      static class  Artifact.VersionComparator
      A Comparator to compare artifacts based on their version numbers.
    • Constructor Summary

      Constructors 
      Constructor Description
      Artifact()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getArguments()
      Returns the artifact arguments.
      java.util.Map<java.lang.String,​java.lang.Object> getArguments​(java.util.Map<java.lang.String,​java.lang.Object> override)
      Returns the artifact arguments.
      java.util.Map<java.lang.String,​Artifact.Item> getFiles()
      Returns all the file items in the artifact.
      Metadata getMetadata()
      Returns the metadata containing this artifact.
      java.lang.String getMetadataVersion()
      Returns the metadata format version.
      java.lang.String getName()
      Returns the artifact name.
      java.util.Map<java.lang.String,​java.lang.String> getOptions​(java.util.Map<java.lang.String,​java.lang.String> override)
      Returns the artifact options.
      Version getParsedVersion()
      Returns the artifact version as a Version.
      java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Returns the artifact properties.
      java.net.URI getResourceUri()
      Returns the location of the resource directory.
      java.lang.String getVersion()
      Returns the artifact version.
      boolean hasProperties​(java.util.Map<java.lang.String,​java.lang.String> filter)
      Returns true if every filter matches the corresponding property.
      boolean isSnapshot()
      Returns true if the artifact is a snapshot.
      void setArguments​(java.util.Map<java.lang.String,​java.lang.Object> arguments)
      Sets the artifact arguments.
      void setFiles​(java.util.Map<java.lang.String,​Artifact.Item> files)
      Sets the file items.
      void setMetadata​(Metadata metadata)
      Sets the associated metadata.
      void setMetadataVersion​(java.lang.String metadataVersion)
      Sets the metadata format version.
      void setName​(java.lang.String name)
      Sets the artifact name.
      void setOptions​(java.util.Map<java.lang.String,​java.lang.String> options)
      Sets the artifact arguments.
      void setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Sets the artifact properties.
      void setSnapshot​(boolean snapshot)
      Sets if the artifact is a snapshot.
      void setVersion​(java.lang.String version)
      Sets the artifact version.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Artifact

        public Artifact()
    • Method Detail

      • getMetadataVersion

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

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

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

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

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

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

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

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

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Returns the artifact properties.
        Returns:
        the artifact properties
        See Also:
        Repository
      • setProperties

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

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

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

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

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

        public void setOptions​(java.util.Map<java.lang.String,​java.lang.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:
        Repository
      • setMetadata

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

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

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

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

        public boolean hasProperties​(java.util.Map<java.lang.String,​java.lang.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:
        Repository
      • getParsedVersion

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object