org.apache.felix.bundlerepository.impl
Class ResourceImpl

java.lang.Object
  extended by org.apache.felix.bundlerepository.impl.ResourceImpl
All Implemented Interfaces:
Resource
Direct Known Subclasses:
LocalResourceImpl

public class ResourceImpl
extends Object
implements Resource


Field Summary
 
Fields inherited from interface org.apache.felix.bundlerepository.Resource
CATEGORY, COPYRIGHT, DESCRIPTION, DOCUMENTATION_URI, ID, JAVADOC_URI, LICENSE_URI, MANIFEST_VERSION, PRESENTATION_NAME, SIZE, SOURCE_URI, SYMBOLIC_NAME, URI, VERSION
 
Constructor Summary
ResourceImpl()
           
 
Method Summary
 void addCapability(Capability cap)
           
 void addCategory(String category)
           
 void addRequire(Requirement req)
           
 boolean equals(Object o)
           
 Capability[] getCapabilities()
          Retrieve the capabilities
 String[] getCategories()
          Retrieve this resource categories
 String getId()
          Shortcut for {{getProperties().get(ID)}}
 String getPresentationName()
          Shortcut for {{getProperties().get(PRESENTATION_NAME)}}
 Map getProperties()
          Get all resource properties
 Repository getRepository()
           
 Requirement[] getRequirements()
          Retrieve the requirements
 Long getSize()
          Shortcut for {{getProperties().get(SIZE)}}
 String getSymbolicName()
          Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}
 String getURI()
          Shortcut for {{getProperties().get(URI)}}
 org.osgi.framework.Version getVersion()
          Shortcut for {{getProperties().get(VERSION)}}
 int hashCode()
           
 boolean isLocal()
          Returns whether this resource is a local one or not.
 Object put(Object key, Object value)
          Default setter method when setting parsed data from the XML file.
 void put(String key, String value, String type)
           
 void setRepository(Repository repository)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceImpl

public ResourceImpl()
Method Detail

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getRepository

public Repository getRepository()

setRepository

public void setRepository(Repository repository)

getProperties

public Map getProperties()
Description copied from interface: Resource
Get all resource properties

Specified by:
getProperties in interface Resource
Returns:

getPresentationName

public String getPresentationName()
Description copied from interface: Resource
Shortcut for {{getProperties().get(PRESENTATION_NAME)}}

Specified by:
getPresentationName in interface Resource
Returns:

getSymbolicName

public String getSymbolicName()
Description copied from interface: Resource
Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}

Specified by:
getSymbolicName in interface Resource
Returns:

getId

public String getId()
Description copied from interface: Resource
Shortcut for {{getProperties().get(ID)}}

Specified by:
getId in interface Resource
Returns:

getVersion

public org.osgi.framework.Version getVersion()
Description copied from interface: Resource
Shortcut for {{getProperties().get(VERSION)}}

Specified by:
getVersion in interface Resource
Returns:

getURI

public String getURI()
Description copied from interface: Resource
Shortcut for {{getProperties().get(URI)}}

Specified by:
getURI in interface Resource
Returns:

getSize

public Long getSize()
Description copied from interface: Resource
Shortcut for {{getProperties().get(SIZE)}}

Specified by:
getSize in interface Resource
Returns:

getRequirements

public Requirement[] getRequirements()
Description copied from interface: Resource
Retrieve the requirements

Specified by:
getRequirements in interface Resource
Returns:

addRequire

public void addRequire(Requirement req)

getCapabilities

public Capability[] getCapabilities()
Description copied from interface: Resource
Retrieve the capabilities

Specified by:
getCapabilities in interface Resource
Returns:

addCapability

public void addCapability(Capability cap)

getCategories

public String[] getCategories()
Description copied from interface: Resource
Retrieve this resource categories

Specified by:
getCategories in interface Resource
Returns:

addCategory

public void addCategory(String category)

isLocal

public boolean isLocal()
Description copied from interface: Resource
Returns whether this resource is a local one or not. Local resources are already available in the OSGi framework and thus will be preferred over other resources.

Specified by:
isLocal in interface Resource

put

public Object put(Object key,
                  Object value)
Default setter method when setting parsed data from the XML file.


put

public void put(String key,
                String value,
                String type)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.