public class Artifact
extends java.lang.Object
Artifact
is a set of data files such as a model or dataset.Repository
Modifier and Type | Class and 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 and Description |
---|
Artifact() |
Modifier and Type | Method and Description |
---|---|
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() |
public java.lang.String getMetadataVersion()
public void setMetadataVersion(java.lang.String metadataVersion)
metadataVersion
- the new versionpublic java.lang.String getVersion()
Version
public void setVersion(java.lang.String version)
version
- the new versionVersion
public boolean isSnapshot()
Version
public void setSnapshot(boolean snapshot)
snapshot
- true to make the artifact a snapshotVersion
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the new namepublic java.util.Map<java.lang.String,java.lang.String> getProperties()
Repository
public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- the new propertiesRepository
public java.util.Map<java.lang.String,java.lang.Object> getArguments(java.util.Map<java.lang.String,java.lang.Object> override)
override
- the override configurations to the default argumentsRepository
public void setArguments(java.util.Map<java.lang.String,java.lang.Object> arguments)
arguments
- the new argumentsRepository
public java.util.Map<java.lang.String,java.lang.String> getOptions(java.util.Map<java.lang.String,java.lang.String> override)
override
- the override options to the default optionspublic void setOptions(java.util.Map<java.lang.String,java.lang.String> options)
options
- the new argumentspublic Metadata getMetadata()
Repository
public void setMetadata(Metadata metadata)
metadata
- the new metadataRepository
public java.net.URI getResourceUri()
public java.util.Map<java.lang.String,Artifact.Item> getFiles()
public void setFiles(java.util.Map<java.lang.String,Artifact.Item> files)
files
- the replacement file itemspublic boolean hasProperties(java.util.Map<java.lang.String,java.lang.String> filter)
filter
- the values to check against the propertiesRepository
public java.lang.String toString()
toString
in class java.lang.Object