Loading...
 
  • World
    • No language is assigned to this page.

MINT TUTORIAL-CREATE MAPPING-LIDO

10. Create New Mapping

  • Select the “Mappings” for the “Dataset Options” from my “Workspace”. This opens the “Mappings” pane in which you can create a new mapping, upload a mapping on an XSL and manage the existing mappings.

Image

 

  • By selecting “Create new mapping” the “New Mapping” pane appears. Give a Name to the box “Mapping Name”, Select the schema you which you want to transform your metadata click “submit”

Image

 

  • after clicking the button “submit”, the mapping with the specified name the mapping editor appears

Image

Exercise 1 - Create new mappings

  • Create a new mapping to the LIDO shema with the following title:
    • your Name_Surname_Mapping


VIDEO FOLLOWS


 

11. Mapping Editor

Image

 

11.1 Input Schema Area

  • The structure that corresponds to a user's specific import is visualized in the mapping interface as an interactive tree that appears on the left hand side of the editor. The tree represents the snapshot of the XML schema that is used as input for the mapping process. The user is able to navigate and access element statistics and also to search the tree by using the text field on the top.Elements in green color show that they have unique values.

Image Image

 

11.2 Mapping Area

  • Mapping area visualized in the middle part of the screen as a tree structure of embedded boxes, representing the internal structure of the complex element. The user is able to interact with this structure by clicking to collapse and expand every embedded box that represents an element, along with all relevant information (attributes, annotations) defined in the XML schema document.

Image

 

  • On the right hand side, buttons correspond to high-level elements of the target schema (if not visible click on Image button on the top right of the ingestion platform) and are used to access their corresponding sub-element

Image

 

  • A user can set / unset a bookmark to an element by clicking on the star( Image ) on its right.

Image

 

  • By clicking on ( Image Mandatory elements that are not mapped.

Note that mandatory elements area appearing when the user starts the Xpath mapping.

Image

 

  • By using the search fields Image user can search the target schema

Image

 

11.3.2 Mapping Editor Notation

Image  


As we can observe on the top of each element in the mapping area – the schema prefix and the element name are shown – (eg. edm: ProvidedCHO) there are some indicators e.g Image , Image , Image , these indicators are described in the following table.

Image

Image



If you leave the cursor above the mapping the following shortcuts to the input tree and xpaths values appear.

Image

 

  • By clicking on the question mark (?) appearing the documentation about the mapping.

Image

 

  • By clicking on the indicator Image on the right side the user can duplicate an element

Image



Exercise 2- Navigation

  • Navigate through the three different areas:
    • On the input schema area browse through the metadata and using the search button highlight the metadata field of title
    • On the mapping area browse through the target metadata schema by using the appropriate buttons (+, -, @)
    • Use the four tabs on the navigation area in order to navigate through fields, exam bookmarked fields, find mandatory elements that are unmapped and search for elements

 

12. Mappings

Image

 

12.1 MAPPINGS - Xpath Mapping

To perform an actual (one to one) mapping between the input and the target schema, a user has to simply drag a source element (x-path) from the input tree and dropping it to the desired element (with the area named unmapped) of the mapping area. The source elements will be underlined after mapped to the target schema.

Image



Exercise 3 - Xpaths Mappings Using the navigation tab create the following X paths Mappings:

Source ElementBookmarkTarget Element
tns:identifierIdentifierlido:recordID
 Descriptive Metadata Languagelido:descriptiveMetadata/@xml:lang
 Admiministrative Metadata Languagelido:administrativeMetadata/@xml:lang
tns:TitleObject title/namelido:appellationValue
tns: DescriptionObject Descriptionlido:descriptiveNoteValue
tns:DimensionDimensionlido:displayObjectMeasurements
tns:DateProduction Datelido:displayDate
tns:LocationProduction Place Namelido:namePlaceSet/lido:appellationValue
tns:MaterialMateriallido:termMaterialsTech/lido:term
tns:Photographic TechniqueTechniquelido:termMaterialsTech/lido:term
tns:SubjectSubjectlido:subjectConcept/lido:term
tns:OrganizationRepositorylido:repositoryName/lido:legalBodyName/lido:appellationValue
tns:OrganizationRights information for Worklido:rightsHolder/lido:legalBodyName/lido:appelationValue
"IMAGE"Record Typelido:recordType
tns:OrganizationRecord Sourcelido:appellationValue
tns:OrganizationRecord Linklido:recordInfoLink
tns:MetadataUriLink DCHO (master)lido:linkResource (master)
tns:PhotoUriLink DCHO (thumb)lido:linkResource (thumb)
   


VIDEO FOLLOWS

 

 

 

 

 

12.1.1 Mappings - Enumerated Mapping

  • By double click on an element that takes values from an enumerated list

Image

 

Exercise 4- Enumerated Mappings

Using the navigation tab create the following Enumerated mappings:

BookMarkTarget ElementsValue
Europeana Typelido:classification (Europana)/lido:termIMAGE
Resource Rights Typelido:rights Type/lido:termhttp://www.europena.eu/rights/rr-f/


VIDEO FOLLOWS

  

 

12.1.2 Mapping - Constant Mapping

  • By double clicking on the unmapped area you can define a constant value mapping. You can type a constant value in the provided text field. The value appears in the mapping area and in the resulting XML files. This type of mapping is useful for text that is intended to appear in all transformed items.

Image  

 

Exercise 5 - Constant Mappings

Source ElementTarget ElementConstant Valueq
Object/Work typelido:objectWorkType/lido:termPhotography


VIDEO FOLLOWS

 

12.1.3 Mappings - Concatenate Mapping

  • By clicking on the icon Image you can perform a concatenate mapping i.e to combine more than one mappings for producing a new mapping.

Image

 

Exercise 6 - Concatenate Mapping

The target field of the navigation lido:recordWrap/lido:recordSource/lido:legalBodyName/lido:appellationValue should take its value as a concatenate mapping between the source element: tns: Organization and the static text “Image Video and Multimedia Systems Laboratory”

VIDEO FOLLOWS

 

12.1.4 MAPPINGS - FUNCTIONAL MAPPINGS

  • By clicking on the Image button you can perform a functional mapping i.e to modify the value from an input xpath by applying a string manipulation function to it.

Image

  • Substring - You set the start and the end index.
  • Substring after - You set the substring of the original string after which the value is taken.
  • Substring before - You set the substring of the original string before which the value is taken
  • Substring between - You set the substrings of the original string after and before which the value is taken.
  • Replace string - You set a string to be replaced with the replacement
  • Trim – Trims spaces
  • Replace with regex - Replace all occurrences matching the regular expression (first argument) with the second argument (string)
  • Split - You set the delimiter for tokenization and the start index of the original string
  • Tokenize content and generate an element per content - You set the delimiter for tokenization
  • Custom function – You can set a custom XSLT function

Examples are given below

Image Image

 

Exercise 7 - Functional Mapping Create a functional mapping from the source element: tns:Identifier to the Bookmark/Target Element: lido:recordWrap/lido:recordId such that the following transformations take place (use the substring after function):

Source Element ValueTarget Element Value
108_0851b0851b
108_08530853
108_08680868
108_0874b0874b
108_0874f0874f


VIDEO FOLLOWS

 

12.1.5 Mapping - Conditional Mapping

  • By clicking on the button Image you can perform a conditional mapping i.e. to transform the value from an input xpath by using conditions. On the left the drop down menu with the type of condition appears that can be AND or OR. A condition is set using one of the following functions.
    • Is equal to – sets a condition that is satisfied when the given xpath is equal to the given value.
    • Is not equal to – sets a condition that is satisfied when the given xpath is not equal to the given value.
    • Exists – sets a condition that is satisfied if the given xpath exists. It is important to note at this point that the fact the xpath of an element exists in the input tree does not mean that it exists for all the data in the imported collection. (In other words the input tree shown on the left aggregates all the possible xpaths found in the input data).
    • Does not exist – sets a condition that is satisfied if the given xpath does not exist. It is important to note at this point that the fact the xpath of an element exists in the input tree does not mean that it exists for all the data in the imported collection. (In other words the input tree shown on the left aggregates all the possible xpaths found in the input data).
    • Contains – sets a condition that is satisfied if the given xpath contains the given value.
    • Does not contain – sets a condition that is satisfied if the given xpath does not contain the given value.
    • Starts with – sets a condition that is satisfied if the given xpath starts with the given value.
    • Does not start with – sets a condition that is satisfied if the given xpath does not start with the given value.
    • Ends with – sets a condition that is satisfied if the given xpath ends with the given value.
    • Does not end with – sets a condition that is satisfied if the given xpath does not end with the given value.

 

  • If the value of xpath tns:Description contains the word “picture” and the Value of the xpath ths: Photographer is equal to the word "Petros Katsaros" then lido:descriptiveNoteValue is the concatenation between the tns:Description and the Sring "by Petros Katsaros"

Image

 
Exercise 8 - Conditional Mapping

Using the source elements tns:Title and tns:Photographer create the following conditional mapping for the Object Title/Name (Bookmark) lido:appellationValue target field:

  • If the value of tns:Title contains the word “Parthenon” and the tns:Photographer value is Petros Katsaros then the lidο:appellationValue is the concatenation between tns:Title and the String “by Petros Katsaros”
  • Otherwise the lidoappellationValue  is the same as tns:Title

 

VIDEO FOLLOWS

 

 

12.1.6 Mappings - Structural Mapping

  • Structural mappings are a special category of mapping. As you may have noticed in the complex types of the target schema illustrated in the mapping area text structural appears instead of unmapped. At this area you can map complex elements of your input metadata.
  • Let’s assume you have a complex element named “B” in your metadata – having “C” as a child – and B appears 3 times in only one record. Also assume complex element “BTarget” – having “CTarget” as a child – in the target schema. If you make a structural mapping of B (by dragging it and dropping it) to “BTarget” and then you map “C” to “CTarget” 3 “BTarget” complex elements will appear in the output XML having “CTarget” as child and having the values of “C”.

 

Exercise 9 - Structural mapping

Create the following structural mapping:

Image  

 

VIDEO FOLLOWS

 

12.1.7 Mapping - Value Mappings

  • By clicking on the icon Image you can perform a value mapping i.e. to map specific values of your input metadata to specific values that you set.

Image



Exercise 10- Value Mappings

Create the following Xpath mapping

Source ElementTarget Element
tns:Subjectlido:subjectConcept/lido:term (bookmark:Subject / Theme (Concept))

Based on the previous create the following value mappings

Target ElementInitial ValueNew Value
lido:subjectConcept/lido:termAncient GreeceArchaic period, Ancient Greece
 The ParthenonThe Parthenon, Monument
 CaryatidsCaryatids, Statue





VIDEO FOLLOWS


 

13. Preview Items

After having performed a mapping you can preview the input files, the XSL created so far, the output files, the Europeana preview and a report of the unmapped elements or mistakes by clicking on the button Image on the top of the mapping tool.

  • Select the previews you like in each tab, click on Remember “selected views” Click on an item

Image


In the below figure the output preview with an error highlighted

Image

 

  • Click on the red line. More information about the error is shown in the ‘”Report pane”.

Image


The following figure shows the Europeana preview that is very useful since it simulates the view of your items on the Europeana portal. Note that by clicking on the Image button next to the item title on the top you can switch the preview to other items.

Image

 

Exercise 11 - Preview Items

For the mapping you have created click on the Preview button

  • On the item views for the first column set: imported Item, item
  • On the item views for the second column set: Mapped Item, Europeana
  • Then click to one of the items (e.g. Parthenon) and check the initial item, its transformation to the EDM schema and how this item is displayed by the Europeana portal
  • Check the mapped item for possible errors. In case of an error detect it and make the necessary changes based on the previous exercises



Exercise 12 - Preview Items

In case that the mapped item created in the previews step contained no errors then:

  • Deliberately create an error by removing a mandatory value
  • For once again check the mapped item for possible errors. Alternatively check in the navigation bar for mandatory elements that are unmapped
  • Restore the mapping to its previous form



VIDEO FOLLOWS

14. TRANSFORM ITEMS

  • After having performed a mapping from “Dataset options” select transform. The “Transform pane appears that allow the user to select the mapping to be used for transformation.

Image

 

  • After that, the transformation icon Image appears next to the dataset and the derived dataset appears under the transformation

Image

Exercise 13 - Transform Items

Transform the elements in your initianl dataset (Euphoto - Extended.zip) based on the mapping you have created.

VIDEO FOLLOWS

The previous step creates the transformations to LIDO. If there ane no errors in them then you can proceed with the puplication  by clicking on Publish to MORE

Image