org.apache.archiva.metadata.model
Class FacetedMetadata

java.lang.Object
  extended by org.apache.archiva.metadata.model.FacetedMetadata
Direct Known Subclasses:
ArtifactMetadata, ProjectVersionMetadata

public abstract class FacetedMetadata
extends Object

Base class for metadata that is contains facets for storing extensions by various plugins.


Field Summary
private  Map<String,MetadataFacet> facets
          The facets to store, keyed by the Facet ID of the metadata.
 
Constructor Summary
FacetedMetadata()
           
 
Method Summary
 void addFacet(MetadataFacet metadataFacet)
          Add a new facet to the metadata.
 MetadataFacet getFacet(String facetId)
          Get a particular facet of metadata.
 Collection<String> getFacetIds()
          Get all the keys of the facets available on this metadata.
 Collection<MetadataFacet> getFacetList()
          Get all the facets available on this metadata.
 Map<String,MetadataFacet> getFacets()
          Get all available facets as a Map (typically used by bean rendering, such as in Archiva's JSPs).
 MetadataFacet removeFacet(String facetId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

facets

private Map<String,MetadataFacet> facets
The facets to store, keyed by the Facet ID of the metadata.

Constructor Detail

FacetedMetadata

public FacetedMetadata()
Method Detail

addFacet

public void addFacet(MetadataFacet metadataFacet)
Add a new facet to the metadata. If it already exists, it will be replaced.

Parameters:
metadataFacet - the facet to add

getFacet

public MetadataFacet getFacet(String facetId)
Get a particular facet of metadata.

Parameters:
facetId - the facet ID
Returns:
the facet of the metadata.

removeFacet

public MetadataFacet removeFacet(String facetId)

getFacetList

public Collection<MetadataFacet> getFacetList()
Get all the facets available on this metadata.

Returns:
the facets of the metadata

getFacetIds

public Collection<String> getFacetIds()
Get all the keys of the facets available on this metadata.

Returns:
the collection of facet IDs.

getFacets

public Map<String,MetadataFacet> getFacets()
Get all available facets as a Map (typically used by bean rendering, such as in Archiva's JSPs).

Returns:
the map of facets
See Also:
facets


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