Class ResourceImpl

    • Constructor Detail

      • ResourceImpl

        public ResourceImpl()
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getRepository

        public Repository getRepository()
      • setRepository

        public void setRepository​(Repository repository)
      • getProperties

        public java.util.Map getProperties()
        Description copied from interface: Resource
        Get all resource properties
        Specified by:
        getProperties in interface Resource
        Returns:
      • getPresentationName

        public java.lang.String getPresentationName()
        Description copied from interface: Resource
        Shortcut for {{getProperties().get(PRESENTATION_NAME)}}
        Specified by:
        getPresentationName in interface Resource
        Returns:
      • getSymbolicName

        public java.lang.String getSymbolicName()
        Description copied from interface: Resource
        Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}
        Specified by:
        getSymbolicName in interface Resource
        Returns:
      • getId

        public java.lang.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 java.lang.String getURI()
        Description copied from interface: Resource
        Shortcut for {{getProperties().get(URI)}}
        Specified by:
        getURI in interface Resource
        Returns:
      • getSize

        public java.lang.Long getSize()
        Description copied from interface: Resource
        Shortcut for {{getProperties().get(SIZE)}}
        Specified by:
        getSize in interface Resource
        Returns:
      • addRequire

        public void addRequire​(Requirement req)
      • addCapability

        public void addCapability​(Capability cap)
      • getCategories

        public java.lang.String[] getCategories()
        Description copied from interface: Resource
        Retrieve this resource categories
        Specified by:
        getCategories in interface Resource
        Returns:
      • addCategory

        public void addCategory​(java.lang.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 java.lang.Object put​(java.lang.Object key,
                                    java.lang.Object value)
        Default setter method when setting parsed data from the XML file.
      • put

        public void put​(java.lang.String key,
                        java.lang.String value,
                        java.lang.String type)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object