Class Connector

    • Constructor Summary

      Constructors 
      Constructor Description
      Connector​(de.unirostock.sems.xmlutils.ds.TreeDocument docA, de.unirostock.sems.xmlutils.ds.TreeDocument docB)
      Instantiates a new connector.
      Connector​(de.unirostock.sems.xmlutils.ds.TreeDocument docA, de.unirostock.sems.xmlutils.ds.TreeDocument docB, boolean allowDifferentIds, boolean careAboutNames, boolean stricterNames)
      Instantiates a new connector.
    • Field Detail

      • allowDifferentIds

        protected boolean allowDifferentIds
        Are mappings of nodes with different ids allowed? see Diff.ALLOW_DIFFERENT_IDS
      • stricterNames

        protected boolean stricterNames
        Should we handle names very strictly? see Diff.STRICTER_NAMES
      • docA

        protected de.unirostock.sems.xmlutils.ds.TreeDocument docA
        The original document.
      • docB

        protected de.unirostock.sems.xmlutils.ds.TreeDocument docB
        The modified document.
    • Constructor Detail

      • Connector

        public Connector​(de.unirostock.sems.xmlutils.ds.TreeDocument docA,
                         de.unirostock.sems.xmlutils.ds.TreeDocument docB,
                         boolean allowDifferentIds,
                         boolean careAboutNames,
                         boolean stricterNames)
        Instantiates a new connector.
        Parameters:
        docA - the original document
        docB - the modified document
        allowDifferentIds - may mapped entities have different ids? see Diff.ALLOW_DIFFERENT_IDS
        careAboutNames - should we care about names? see Diff.CARE_ABOUT_NAMES
        stricterNames - should we handle the names very strictly? see Diff.STRICTER_NAMES
      • Connector

        public Connector​(de.unirostock.sems.xmlutils.ds.TreeDocument docA,
                         de.unirostock.sems.xmlutils.ds.TreeDocument docB)
        Instantiates a new connector. Uses default values for the mapping, see Diff.ALLOW_DIFFERENT_IDS, Diff.CARE_ABOUT_NAMES, and Diff.STRICTER_NAMES.
        Parameters:
        docA - the original document
        docB - the modified document
    • Method Detail

      • getDocA

        public de.unirostock.sems.xmlutils.ds.TreeDocument getDocA()
        Gets the original document.
        Returns:
        the original document
      • getDocB

        public de.unirostock.sems.xmlutils.ds.TreeDocument getDocB()
        Gets the modified document.
        Returns:
        the modified document
      • getConnections

        public final SimpleConnectionManager getConnections()
        Gets the connections.
        Returns:
        the connections
      • nodeAssign

        protected boolean nodeAssign​(de.unirostock.sems.xmlutils.ds.TreeNode a,
                                     de.unirostock.sems.xmlutils.ds.TreeNode b)
                              throws BivesConnectionException
        Assign two nodes to each other, as long as they don't have a connection.
        Parameters:
        a - the node from the original tree
        b - the node from the modified tree
        Returns:
        true, if successfully connected
        Throws:
        BivesConnectionException - the bives connection exception