no.ntnu.ime.xmlconverter.client.ui
Class ManualConversionPanel

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by no.ntnu.ime.xmlconverter.client.ui.ManualConversionPanel
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class ManualConversionPanel
extends com.google.gwt.user.client.ui.Composite

User interface for manually mappping xml-elements to their meaning in an OpenFEIDE context.

Author:
Kristian Klette

Relation management

The mapper support three (3) kinds of relationship mappings:
  • organization <-- group
  • organization <-- person
  • group <-- person
  • In addition to pure affiliations, the mappings might add additional affiliations to the FEIDE predefined roles:
    • MEMBER
      • STUDENT
      • EMPLOYEE
        • FACULTY
        • STAFF
    • AFFILIATE
    • ALUM
    • LIBRARY-WALK-IN
    These roles are added if the user selects the appropriate fields in the "Ekstra:"-list when defining the membership element.

Nested Class Summary
(package private)  class ManualConversionPanel.ElementTypeListChangeHandler
           
(package private)  class ManualConversionPanel.SaveSelectionButtonClickHandler
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
private  com.google.gwt.user.client.ui.ListBox additionalAffiliations
           
 no.ntnu.ime.xmlconverter.client.models.TreeNodeValidationItem currentSelectedTreeNodeValidationItem
           
private  com.google.gwt.user.client.ui.ListBox elementSpecificTypesList
           
private  com.google.gwt.user.client.ui.ListBox elementTypesList
           
private static java.lang.String GROUP_TYPE_IDENTIFIER
           
private  java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> groups
           
private  java.lang.String groupsNodePath
           
private static java.lang.String MEMBERSHIP_TYPE_IDENTIFIER
           
private static java.lang.String ORGANIZATION_TYPE_IDENTIFIER
           
private static java.lang.String ORGANIZATION_UNIT_TYPE_IDENTIFIER
           
private  java.util.HashMap<java.lang.String,java.lang.String> pathToTypeMap
           
private static java.lang.String PERSON_TYPE_IDENTIFIER
           
private  java.lang.String personNodePath
           
private  java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> persons
           
private  com.google.gwt.user.client.ui.Label selectedElementAttributes
           
private  com.google.gwt.user.client.ui.Label selectedElementName
           
private  com.google.gwt.user.client.ui.Label selectedElementTypeLabel
           
private  com.google.gwt.user.client.ui.Label selectedElementValue
           
private  java.util.HashMap<java.lang.String,java.lang.String[]> typeToElementMap
           
private  com.google.gwt.user.client.ui.VerticalPanel verticalPanel
           
private  com.google.gwt.user.client.ui.HTML xlstPreview
           
private  java.util.HashMap<java.lang.String,com.google.gwt.user.client.ui.TreeItem> xmlPathCache
           
private  com.google.gwt.user.client.ui.Tree xmlTreeRepresentation
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ManualConversionPanel(com.google.gwt.xml.client.Node sourceXML)
           
 
Method Summary
private  void addGroupTypeToList(com.google.gwt.user.client.ui.ListBox listBox)
           
private  void addPersonTypesToList(com.google.gwt.user.client.ui.ListBox listBox)
           
private  void addRelationTypesToList(com.google.gwt.user.client.ui.ListBox listBox)
           
private  void buildTreeRepresentation(com.google.gwt.xml.client.Node node, com.google.gwt.user.client.ui.TreeItem parentTreeNode, java.lang.String currentPath)
           
private  java.lang.String generateXLST()
           
private  java.lang.String get_tree_path(com.google.gwt.user.client.ui.TreeItem selectedItem)
           
private  java.util.HashMap<java.lang.String,java.lang.String> getAttributeMapForNode(com.google.gwt.xml.client.Node child)
           
private  java.lang.String getAttributeXPathString(no.ntnu.ime.xmlconverter.client.models.TreeNodeValidationItem item)
           
 com.google.gwt.user.client.ui.VerticalPanel getManualConversionPanel()
           
private  void populateTypeToElementMap()
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ORGANIZATION_UNIT_TYPE_IDENTIFIER

private static final java.lang.String ORGANIZATION_UNIT_TYPE_IDENTIFIER
See Also:
Constant Field Values

ORGANIZATION_TYPE_IDENTIFIER

private static final java.lang.String ORGANIZATION_TYPE_IDENTIFIER
See Also:
Constant Field Values

MEMBERSHIP_TYPE_IDENTIFIER

private static final java.lang.String MEMBERSHIP_TYPE_IDENTIFIER
See Also:
Constant Field Values

GROUP_TYPE_IDENTIFIER

private static final java.lang.String GROUP_TYPE_IDENTIFIER
See Also:
Constant Field Values

PERSON_TYPE_IDENTIFIER

private static final java.lang.String PERSON_TYPE_IDENTIFIER
See Also:
Constant Field Values

verticalPanel

private com.google.gwt.user.client.ui.VerticalPanel verticalPanel

persons

private final java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> persons

groups

private final java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.String>> groups

personNodePath

private java.lang.String personNodePath

groupsNodePath

private java.lang.String groupsNodePath

xmlPathCache

private final java.util.HashMap<java.lang.String,com.google.gwt.user.client.ui.TreeItem> xmlPathCache

typeToElementMap

private final java.util.HashMap<java.lang.String,java.lang.String[]> typeToElementMap

pathToTypeMap

private java.util.HashMap<java.lang.String,java.lang.String> pathToTypeMap

elementTypesList

private com.google.gwt.user.client.ui.ListBox elementTypesList

selectedElementTypeLabel

private com.google.gwt.user.client.ui.Label selectedElementTypeLabel

selectedElementAttributes

private com.google.gwt.user.client.ui.Label selectedElementAttributes

selectedElementValue

private com.google.gwt.user.client.ui.Label selectedElementValue

selectedElementName

private com.google.gwt.user.client.ui.Label selectedElementName

elementSpecificTypesList

private com.google.gwt.user.client.ui.ListBox elementSpecificTypesList

currentSelectedTreeNodeValidationItem

public no.ntnu.ime.xmlconverter.client.models.TreeNodeValidationItem currentSelectedTreeNodeValidationItem

xmlTreeRepresentation

private com.google.gwt.user.client.ui.Tree xmlTreeRepresentation

xlstPreview

private com.google.gwt.user.client.ui.HTML xlstPreview

additionalAffiliations

private com.google.gwt.user.client.ui.ListBox additionalAffiliations
Constructor Detail

ManualConversionPanel

public ManualConversionPanel(com.google.gwt.xml.client.Node sourceXML)
Method Detail

getManualConversionPanel

public com.google.gwt.user.client.ui.VerticalPanel getManualConversionPanel()

addGroupTypeToList

private void addGroupTypeToList(com.google.gwt.user.client.ui.ListBox listBox)

addPersonTypesToList

private void addPersonTypesToList(com.google.gwt.user.client.ui.ListBox listBox)

addRelationTypesToList

private void addRelationTypesToList(com.google.gwt.user.client.ui.ListBox listBox)

buildTreeRepresentation

private void buildTreeRepresentation(com.google.gwt.xml.client.Node node,
                                     com.google.gwt.user.client.ui.TreeItem parentTreeNode,
                                     java.lang.String currentPath)

generateXLST

private java.lang.String generateXLST()

get_tree_path

private java.lang.String get_tree_path(com.google.gwt.user.client.ui.TreeItem selectedItem)

getAttributeXPathString

private java.lang.String getAttributeXPathString(no.ntnu.ime.xmlconverter.client.models.TreeNodeValidationItem item)

getAttributeMapForNode

private java.util.HashMap<java.lang.String,java.lang.String> getAttributeMapForNode(com.google.gwt.xml.client.Node child)

populateTypeToElementMap

private void populateTypeToElementMap()