Class XDSMetaClassTransformer<E extends EbXMLRegistryObject,C extends XDSMetaClass>

java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.transform.ebxml.XDSMetaClassTransformer<E,C>
Type Parameters:
E - the ebXML type.
C - the XDSMetaClass type.
Direct Known Subclasses:
DocumentEntryTransformer, FolderTransformer, SubmissionSetTransformer

public abstract class XDSMetaClassTransformer<E extends EbXMLRegistryObject,C extends XDSMetaClass> extends Object
Base class for transformers of XDSMetaClass and ebXML representations.
Author:
Jens Riemschneider
  • Constructor Details

    • XDSMetaClassTransformer

      protected XDSMetaClassTransformer(String patientIdExternalId, String patientIdLocalizedString, String uniqueIdExternalId, String uniqueIdLocalizedString, String limitedMetadataAttributeName, EbXMLFactory factory)
      Constructs the transformer using various constants from Vocabulary.
      Parameters:
      patientIdExternalId - the external ID of the patient ID.
      patientIdLocalizedString - the localized string of the patient ID.
      uniqueIdExternalId - the external ID of the unique ID.
      uniqueIdLocalizedString - the localized string of the unique ID.
      limitedMetadataAttributeName - the classification defining the limitedMetadata.
  • Method Details

    • toEbXML

      public E toEbXML(C metaData, EbXMLObjectLibrary objectLibrary)
      Transforms the given XDSMetaClass into its ebXML representation.
      Parameters:
      metaData - the meta data to transform. Can be null.
      objectLibrary - the object library.
      Returns:
      the ebXML representation. null if the input was null.
    • fromEbXML

      public C fromEbXML(E ebXML)
      Transforms an ebXML representation into its XDSMetaClass.
      Parameters:
      ebXML - the ebXML representation. Can be null.
      Returns:
      the meta data. null if the input was null.
    • createEbXMLInstance

      protected abstract E createEbXMLInstance(String id, EbXMLObjectLibrary objectLibrary)
      Called by the base class to create a new instance of the ebXML type.
      Parameters:
      id - the id of the object to create.
      objectLibrary - the object library.
      Returns:
      a new instance of the ebXML type.
    • createMetaClassInstance

      protected abstract C createMetaClassInstance()
      Called by the base class to create a new instance of the XDSMetaClass.
      Returns:
      a new instance of the meta data type.
    • addAttributes

      protected void addAttributes(C metaData, E ebXML, EbXMLObjectLibrary objectLibrary)
      Called by the base class to add attributes to the ebXML instance.
      Parameters:
      metaData - the meta data instance containing the attributes.
      ebXML - the ebXML instance receiving the attributes.
      objectLibrary - the object library.
    • addAttributesFromEbXML

      protected void addAttributesFromEbXML(C metaData, E ebXML)
      Called by the base class to add attributes to the meta data.
      Parameters:
      metaData - the meta data instance receiving the attributes.
      ebXML - the ebXML instance containing the attributes.
    • addSlots

      protected void addSlots(C metaData, E ebXML, EbXMLObjectLibrary objectLibrary)
      Called by the base class to add slots to the ebXML instance.
      Parameters:
      metaData - the meta data instance containing the slots.
      ebXML - the ebXML instance receiving the slots.
      objectLibrary - the object library.
    • addSlotsFromEbXML

      protected void addSlotsFromEbXML(C metaData, E ebXML)
      Called by the base class to add slots to the meta data.
      Parameters:
      metaData - the meta data instance receiving the slots.
      ebXML - the ebXML instance containing the slots.
    • addClassifications

      protected void addClassifications(C metaData, E ebXML, EbXMLObjectLibrary objectLibrary)
      Called by the base class to add classifications to the ebXML instance.
      Parameters:
      metaData - the meta data instance containing the classifications.
      ebXML - the ebXML instance receiving the classifications.
      objectLibrary - the object library.
    • addClassificationsFromEbXML

      protected void addClassificationsFromEbXML(C metaData, E ebXML)
      Called by the base class to add classifications to the meta data.
      Parameters:
      metaData - the meta data instance receiving the classifications.
      ebXML - the ebXML instance containing the classifications.
    • addExternalIdentifiers

      protected void addExternalIdentifiers(C metaData, E ebXML, EbXMLObjectLibrary objectLibrary)
      Called by the base class to add external identifiers to the ebXML instance.
      Parameters:
      metaData - the meta data instance containing the external identifiers.
      ebXML - the ebXML instance receiving the external identifiers.
      objectLibrary - the object library.
    • addExternalIdentifiersFromEbXML

      protected void addExternalIdentifiersFromEbXML(C metaData, E ebXML)
      Called by the base class to add external identifiers to the meta data.
      Parameters:
      metaData - the meta data instance receiving the external identifiers.
      ebXML - the ebXML instance containing the external identifiers.