org.apache.avalon.repository.meta
Class ArtifactDescriptor

java.lang.Object
  extended byorg.apache.avalon.repository.meta.ArtifactDescriptor
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FactoryDescriptor

public class ArtifactDescriptor
extends Object
implements Serializable

An abstract descriptor holds attributes about an artifact.

Version:
$Revision: 1.2 $
Author:
Alex Karasulu, $Author: mcconnell $
See Also:
Serialized Form

Field Summary
static String BUILD_KEY
           
static String DOMAIN_KEY
           
static String VERSION_KEY
           
 
Constructor Summary
ArtifactDescriptor(Attributes attributes)
          Creates a new Meta descriptor.
 
Method Summary
 boolean equals(Object other)
          Test is the supplied object is equal to this object.
 String getBuild()
          Return the build identifier
 String getDomain()
          Return the meta data domain value.
protected  String getValue(Attributes attributes, String key)
           
 String getVersion()
          Return the meta data version
 int hashCode()
          Return the hashcode for the object.
 String toString()
          Return a stringified representation of the instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DOMAIN_KEY

public static final String DOMAIN_KEY
See Also:
Constant Field Values

VERSION_KEY

public static final String VERSION_KEY
See Also:
Constant Field Values

BUILD_KEY

public static final String BUILD_KEY
See Also:
Constant Field Values
Constructor Detail

ArtifactDescriptor

public ArtifactDescriptor(Attributes attributes)
                   throws MetaException
Creates a new Meta descriptor.

Parameters:
attributes - the metadata attributes
Throws:
NullPointerException - if the supplied attributes argument is null
MetaException - if an attribute is inconsitent
Method Detail

getDomain

public String getDomain()
Return the meta data domain value.

Returns:
the domain

getVersion

public String getVersion()
Return the meta data version

Returns:
the version

getBuild

public String getBuild()
Return the build identifier

Returns:
the identifier

equals

public boolean equals(Object other)
Test is the supplied object is equal to this object.

Parameters:
other - the obhject to compare this object with
Returns:
true if the objects are equivalent

hashCode

public int hashCode()
Return the hashcode for the object.

Returns:
the hashcode value

toString

public String toString()
Return a stringified representation of the instance.

Returns:
the string representation

getValue

protected String getValue(Attributes attributes,
                          String key)
                   throws NamingException,
                          NoSuchElementException
Throws:
NamingException
NoSuchElementException


Copyright © Apache Software Foundation. All Rights Reserved.