Skip to main content

Export & Extras

Export Your Data ​

Coming soon...

XPath Cheatsheet​

XPath is an expression language that is used to address the nodes in an XML tree. You do not need to have an in-depth understanding of XPath in order to use 3M, but you will need to know some basic XPath expressions in order to navigate around the source data XML file and select the correct values in the relevant nodes.

Here is a cheatsheet of the basic XPath expressions you will need to know:

@ = selecting an attribute

text() = selecting the value of an element

../ = moving up a node in the tree

../../ = moving up two nodes in the tree

Interface of a Mapping Project​

This section describes 3M mapping project components. It supplements the information for the Creating a Mapping Project in 3M page.

You may find it helpful to think about each component in the context of your own data. Consider what 3M will grab from your original data and where that piece of information will end up in your converted data. Recall from 3M Basic Principles that 3M takes XML and produces RDF triples as the converted data.

subject β†’ predicate β†’ object

The definitions below explain which 3M components create which parts of a triple.

Domain​

The domain is used to specify the source node and the corresponding XML element in your data, which acts as the subject in one or more new triples. The domain also includes a target entity, which defines the class for that subject. Each mapping has one domain.

Generator Definition​

Generator definitions are templates for constructing instance and label generators. They are established in the generatory policy. Read the Generator Policy Manual for more information. Note: Although the Generator Policy Manual references an older version of 3M than the version used by LINCS, the information still applies.

Generator Policy​

The generator policy is an XML file with all the generator definitions for the project. The LINCS 3M instance comes preloaded with generator policy files, but you can construct your own generator policy by following the Generator Policy Manual . Note: Although the Generator Policy Manual references an older version of 3M than the version used by LINCS, the information still applies.

Instance Generator​

An instance generator creates a URI or a literal for an entity. Every entity must have an instance generator. For examples and use cases, see Generators .

Intermediate​

Intermediates are intermediate entities that create an additional target relation and target entity within a link. By default, a link will have (a) a source relation with an accompanying target relation, and (b) a source node with an accompanying target entity. Intermediates are often used to produce a triple where the object of the initial triple becomes the subject of an additional tripleβ€”like a chain of triples. There can be multiple intermediates in a link depending on the complexity of the initial conceptual mapping and the structure of your XML. For an example of intermediates in use, see intermediate sample .

Label Generator​

A label generator creates a label for an entity. An entity can have no labels, one label, or multiple labels. When mapping data to publish with LINCS, each entity must have at least one label as the label assigns meaning to the entity and allows it to be distinguished from other similar entities.

A link defines the predicates and objects that connect to the subject you defined in the domain. Each mapping only has one domain but can have multiple links.

Mapping​

A mapping is a panel within a mapping project with one domain element and one or more link elements. A mapping project can contain multiple mappings. Because a mapping only has one domain, you typically create a new mapping each time you want a new domain. The number of mappings you need in your mapping project depends on the structure of the source input XML, the types of entities within that XML, and the outcome of the work done during the conceptual mapping stage. For an example of a mapping project with multiple mappings and an example of a mapping project with only one mapping, see.

Mapping Project​

A mapping project is a project in 3M created by a specific user (author) with a unique ID (HRID). Mapping projects are located on the mapping projects page. Each mapping project converts either one XML file or multiple XML files that share the same XML schema. Mapping projects are made up of one or more mappings.

Source Node​

The source node identifies from where in your XML file the subjects or objects of your new triples will be pulled. The source node in the domain identifies the subject of all the triples in your mapping. The source node in the link identifies the object of the triple you are creating in that link. Each mapping has one domain, and each domain has one source node. Each mapping can have one or more links, and each link has one source node. The source node lists all of the possible node choices as XPath values. The available values are based on the structure of your XML file.

Source Relation​

The source relation identifies from where in your XML file the predicates of your new triples will be pulled. The options will be XML elements nested within your choice of source node. Often, the source relation will be the same as the source node in the link. By default, 3M will automatically fill in the source node with whatever XML element was chosen in the source relation of the link. Each mapping can have one or more links. Each link has one source relation.

Target Entity​

The target entity field uses classes given in a target schema to define the class of the subjects or objects in a mapping. Every source node has a target entity field. There can be multiple target entity fields in a link if the link has intermediates.

Target Relation​

The target relation field uses the properties from the target schema to define the relationship between subjects and objects. Every source relation has a target relation. There can be multiple target relations in a link if the link has intermediates.

Variable​

A variable is a user-created tag that is added to an entity so that the generated value can be reused on another entity in the same mapping project. A variable establishes two entities as the same conceptual thing within the mapping project. Variables are used by LINCS when a single entity has multiple properties. Variables will not appear in the converted data, but are built into the internal logic of 3M and should be used. .