org.apache.archiva.metadata.model
Class ArtifactMetadata

java.lang.Object
  extended by org.apache.archiva.metadata.model.FacetedMetadata
      extended by org.apache.archiva.metadata.model.ArtifactMetadata

public class ArtifactMetadata
extends FacetedMetadata

Metadata stored in the content repository for a particular artifact. Information that is shared between different artifacts of a given project version can be found in the ProjectVersionMetadata class. The metadata is faceted to store information about particular types of artifacts, for example Maven 2.x artifact specific information. For more information, see the Metadata Content Model.


Field Summary
private  Date fileLastModified
          The last modified date of the artifact file, if known.
private  String id
          The artifact ID uniquely identifies an artifact within a given namespace, project and project version.
private  String md5
          The MD5 checksum of the artifact, if calculated.
private  String namespace
          The namespace of the project within the repository.
private  String project
          The identifier of the project within the repository and namespace.
private  String projectVersion
          The version of the project.
private  String repositoryId
          The repository that the artifact is stored in within the content repository.
private  String sha1
          The SHA-1 checksum of the artifact, if calculated.
private  long size
          The file size of the artifact, if known.
private  String version
          The artifact version, if different from the project version.
private  Date whenGathered
          When the artifact was found in the repository storage and added to the metadata content repository.
 
Constructor Summary
ArtifactMetadata()
           
 
Method Summary
 boolean equals(Object o)
           
 Date getFileLastModified()
           
 String getId()
           
 String getMd5()
           
 String getNamespace()
           
 String getProject()
           
 String getProjectVersion()
           
 String getRepositoryId()
           
 String getSha1()
           
 long getSize()
           
 String getVersion()
           
 Date getWhenGathered()
           
 int hashCode()
           
 void setFileLastModified(long fileLastModified)
           
 void setId(String id)
           
 void setMd5(String md5)
           
 void setNamespace(String namespace)
           
 void setProject(String project)
           
 void setProjectVersion(String projectVersion)
           
 void setRepositoryId(String repositoryId)
           
 void setSha1(String sha1)
           
 void setSize(long size)
           
 void setVersion(String version)
           
 void setWhenGathered(Date whenGathered)
           
 String toString()
           
 
Methods inherited from class org.apache.archiva.metadata.model.FacetedMetadata
addFacet, getFacet, getFacetIds, getFacetList, getFacets, removeFacet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private String id
The artifact ID uniquely identifies an artifact within a given namespace, project and project version. For example, archiva-1.4-20100201.345612-2.jar


repositoryId

private String repositoryId
The repository that the artifact is stored in within the content repository.


namespace

private String namespace
The namespace of the project within the repository.

See Also:
ProjectMetadata.namespace

project

private String project
The identifier of the project within the repository and namespace.

See Also:
ProjectMetadata.id

projectVersion

private String projectVersion
The version of the project. This may be more generalised than @{link #version}.

See Also:
ProjectVersionMetadata.id

version

private String version
The artifact version, if different from the project version. Note that the metadata does not do any calculation of this based on the project version - the calling code must be sure to set and check it appropriately if null.


fileLastModified

private Date fileLastModified
The last modified date of the artifact file, if known.


size

private long size
The file size of the artifact, if known.


md5

private String md5
The MD5 checksum of the artifact, if calculated.


sha1

private String sha1
The SHA-1 checksum of the artifact, if calculated.


whenGathered

private Date whenGathered
When the artifact was found in the repository storage and added to the metadata content repository.

Constructor Detail

ArtifactMetadata

public ArtifactMetadata()
Method Detail

getId

public String getId()

setId

public void setId(String id)

getSize

public long getSize()

setSize

public void setSize(long size)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

getProjectVersion

public String getProjectVersion()

setProjectVersion

public void setProjectVersion(String projectVersion)

setFileLastModified

public void setFileLastModified(long fileLastModified)

setWhenGathered

public void setWhenGathered(Date whenGathered)

setMd5

public void setMd5(String md5)

setSha1

public void setSha1(String sha1)

getWhenGathered

public Date getWhenGathered()

getMd5

public String getMd5()

getSha1

public String getSha1()

getFileLastModified

public Date getFileLastModified()

getNamespace

public String getNamespace()

setNamespace

public void setNamespace(String namespace)

setProject

public void setProject(String project)

getProject

public String getProject()

getRepositoryId

public String getRepositoryId()

setRepositoryId

public void setRepositoryId(String repositoryId)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.