package org.osgi.framework.wiring;

import java.util.List;


/**
 * A resource is the representation of a uniquely identified and typed data.
 * 
 * A resources can be wired together via capabilities and requirements.
 * 
 * @ThreadSafe
 * @Immutable
 *  
 * @version $Id$
 */
public interface Resource {
  /**
   * The identity capability of this resource. All resources have an identity capability
   * defined with the following attributes:
   * 
   * <pre>capability osgi.identity {
   *  osgi.identity=&lt;name&gt;
   *  version=&lt;version&gt;
   *  type=&lt;type&gt;
   *}</pre>
   *
   * <p>
   * This method is a convenience and is equivalent to calling <code>getCapabilities(ResourceConstants.IDENTITY_NAMESPACE).get(0)</code>
   * 
   * @return the Capability of this resource in the <code>osgi.identity</code> namespace 
   */
  Capability getIdentity();
  
	/**
	 * Returns the capabilities declared by this resource.
	 * 
	 * @param namespace
	 *            The name space of the declared capabilities to return or
	 *            {@code null} to return the declared capabilities from all name
	 *            spaces.
	 * @return A list containing a snapshot of the declared {@link Capability}s,
	 *         or an empty list if this resource declares no capabilities in the
	 *         specified name space.
	 */
	List<Capability> getCapabilities(String namespace);

	/**
	 * Returns the requirements declared by this bundle resource.
	 * 
	 * @param namespace
	 *            The name space of the declared requirements to return or
	 *            {@code null} to return the declared requirements from all name
	 *            spaces.
	 * @return A list containing a snapshot of the declared {@link Requirement}
	 *         s, or an empty list if this resource declares no requirements in
	 *         the specified name space.
	 */
	List<Requirement> getRequirements(String namespace);
}

@@ -302,91 +302,78 @@
 e %7B%0A
-  
+%09
 /**%0A
-  
+%09
  * The 
-identity capability of this resource. All resources have an 
+%7B@link ResourceConstants#IDENTITY_NAMESPACE osgi.
 identity
  cap
@@ -368,16 +368,17 @@
 identity
+%7D
  capabil
@@ -385,212 +385,29 @@
 ity%0A
-   * defined with the following attributes:%0A   * %0A   * %3Cpre%3Ecapability osgi.identity %7B%0A   *  osgi.identity=&lt;name&gt;%0A   *  version=&lt;version&gt;%0A   *  type=&lt;type&gt;%0A   *%7D%3C/pre%3E%0A   *%0A   * %3Cp%3E%0A   *
+%09 * of this resource.
  Thi
@@ -456,16 +456,20 @@
 t to
+%0A%09 *
  calling
  %3Cco
@@ -464,16 +464,36 @@
  calling
+:%0A%09 * %0A%09 * %3Cpre%3E%0A%09 *
  %3Ccode%3Eg
@@ -555,16 +555,17 @@
 t(0)
+;
 %3C/code%3E%0A
    *
@@ -564,106 +564,350 @@
 de%3E%0A
-   * %0A   * @return the Capability of this resource in the %3Ccode%3Eosgi.identity%3C/code%3E namespace %0A  
+%09 * %3C/pre%3E%0A%09 * %0A%09 * &#8224; A resource with no symbolic name must not provide an identity%0A%09 * capability.%0A%09 * %0A%09 * @return the Capability of this resource in the%0A%09 *         %7B@link ResourceConstants#IDENTITY_NAMESPACE osgi.identity%7D name%0A%09 *         space or %3Ccode%3Enull%3C/code%3E if this resource has no%0A%09 *         identity%3Csup%3E&#8224;%3C/sup%3E.%0A%09
  */%0A

Fix javadoc to remove repeated information from ResourceConstants and allow null return value for R3 bundles.