Class EbXMLObjectLibrary

java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.ebxml.EbXMLObjectLibrary

public class EbXMLObjectLibrary extends Object
A container of objects used for resolving object references and their ids.
Author:
Jens Riemschneider
  • Constructor Details

    • EbXMLObjectLibrary

      public EbXMLObjectLibrary()
  • Method Details

    • put

      public void put(String id, Object obj)
      Puts an object into the library.

      The object will only be added if both parameters are non-null.

      Parameters:
      id - the id of the object. Can be null.
      obj - the object. Can be null.
    • getById

      public Object getById(String id)
      Looks up an object via its ID.
      Parameters:
      id - the id. Can be null.
      Returns:
      the object or null if the input was null of if the library does not contain an object with the given id.
    • getByObj

      public String getByObj(Object obj)
      Looks up an ID via its object.
      Parameters:
      obj - the object. Can be null.
      Returns:
      the ID or null if the input was null or if the library does not contain the object.
    • getObjects

      public Collection<Object> getObjects()
      Returns:
      a read-only collection of all objects in the library.