Class MdibMapper

  • All Implemented Interfaces:

    
    public class MdibMapper
    
                        

    Maps MDIB entities from MdibAccess to an Mdib object.

    Use ModificationsBuilder to map from an Mdib to org.somda.sdc.biceps.common.MdibDescriptionModifications in order to add MDIB elements to org.somda.sdc.biceps.consumer.access.RemoteMdibAccess and org.somda.sdc.biceps.provider.access.LocalMdibAccess.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Mdib mapMdib() Maps to an Mdib instance.
      MdState mapMdState(List<String> handleFilter) Maps to an MdState instance.
      MdDescription mapMdDescription(List<String> handleFilter) Maps to an MdDescription instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • mapMdib

         Mdib mapMdib()

        Maps to an Mdib instance.

        All information is copied from the MdibAccess given to the MdibMapper on construction.

        Returns:

        a fully populated Mdib instance.

      • mapMdState

         MdState mapMdState(List<String> handleFilter)

        Maps to an MdState instance.

        Parameters:
        handleFilter - a filter to limit the result:
        • If the handle reference list is empty, all states in the MDIB are included in the result list.
        • If a handle reference does match a multi-state handle, the corresponding multi-state is included in the result list.
        • If a handle reference does match a descriptor handle, all states that belong to the corresponding descriptor are included in the result list.
        Returns:

        the mapped instance.

      • mapMdDescription

         MdDescription mapMdDescription(List<String> handleFilter)

        Maps to an MdDescription instance.

        Parameters:
        handleFilter - a filter to limit the result:
        • If the handle reference list is empty, all MDS descriptors are included in the result list.
        • If a handle reference does match an MDS descriptor, it is included in the result list.
        • If a handle reference does not match an MDS descriptor (i.e., any other descriptor), the MDS descriptor that is in the parent tree of the handle reference is included in the result list.
        Returns:

        the mapped instance.