This guide will show you how to add links to ORCID, Bionomia, and Wikidata using the Agent Identifier table.
First, make sure you have unhidden the identifiers
field in the Agent
table in the Schema Config so that this relationship and the fields within the Agent Identifier
table are accessible to you and other users within the current discipline.
Second, you will need to add the Agent Identifier subview to your Agent form, which you can do by following these instructions:
Adding Web Links
To add links to external sites like ORCID or Bionomia, you must first define a series of Web Links. Instructions to create a new app resource of web links can be found here.
If you do not yet have any web links and would like to use the above file as a starting point, you can download the following and use the Load File button in the top right of the editor to import it:
AgentIdentifier_WebLinks.xml (2.9 KB)
Essentially, you can define as many of these web links as you’d like, where you can build a formula for adding a static URL part (such as https://orcid.org/
) to the identifier
field in the Agent Identifier table.
Once these web links are established (and you can have as many as you’d like), you can add them to your Agent Identifier view definition.
Adding Web Links to Agent Identifier
Once you have configured several web links, you can add buttons on the Agent Identifier form to bring you to the appropriate destination for more information about that agent.
After making some simple modifications to the default Agent Identifier form, I have the following:
After creating a new view definition named AgentIdentifier
based on the default, I added several columns to the definition and added 3 new buttons. The modified row looks like this:
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="identifier" uitype="text"/>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="identifierType" uitype="text"/>
<cell type="field" id="ORCID" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=ORCID;icon=https://orcid.org/assets/vectors/orcid.logo.icon.svg"/>
<cell type="field" id="Bionomia" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Bionomia;icon=https://upload.wikimedia.org/wikipedia/commons/e/e4/Logo_for_Bionomia.png"/>
<cell type="field" id="Wikidata" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Wikidata;icon=https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/2560px-Wikidata-logo.svg.png"/>
</row>
Notice that I included links to URLs to add a custom icon to each button to make them visually distinct. I specified each web link in the XML by adding weblink={WebLinkName}
within the initialize
attribute.
Note: Feel free to copy the entire view definition into Specify by copying & pasting the following into a new AgentIdentifier
view definition:
<viewdef name="AgentIdentifiers" class="edu.ku.brc.specify.datamodel.AgentIdentifier" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj" useresourcelabels="true">
<desc>subform on the Agent form.</desc>
<enableRules/>
<columnDef>100px,2px,473px,5px,120px,2px,125px,0px,15px,p:g</columnDef>
<columnDef os="lnx">115px,2px,510px,5px,120px,2px,198px,2px,50px,2px,50px,2px,50px,0px,15px,p:g</columnDef>
<columnDef os="mac">130px,2px,530px,5px,105px,2px,218px,0px,15px,p:g</columnDef>
<columnDef os="exp">p,2px,473px,5px:g,p,2px,125px,0px,15px,p:g</columnDef>
<rowDef auto="true" cell="p" sep="2dlu"/>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="identifier" uitype="text"/>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="identifierType" uitype="text"/>
<cell type="field" id="ORCID" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=ORCID;icon=https://orcid.org/assets/vectors/orcid.logo.icon.svg"/>
<cell type="field" id="Bionomia" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Bionomia;icon=https://upload.wikimedia.org/wikipedia/commons/e/e4/Logo_for_Bionomia.png"/>
<cell type="field" id="Wikidata" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Wikidata;icon=https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/2560px-Wikidata-logo.svg.png"/>
</row>
<row>
<cell type="label" labelfor="7"/>
<cell type="field" id="7" name="remarks" uitype="textareabrief" rows="2" colspan="14"/>
</row>
</rows>
</viewdef>
Advanced Configuration
You can configure a pick list so that you can pre-define the types of identifiers:
I configured one for ‘ORCID’ and ‘Wikidata’ as ORCID is used as an identifier on Bionomia, though it can be resolved via the Q ID from Wikidata so you can display it in both cases if desired.
If you’d like to get really fancy with things, you can even set up a conditional form to show the appropriate button based on the ‘Identifier Type’ field.
See below for a demo:
Here’s the view definition shown in the above video:
<viewdef name="AgentIdentifiers" class="edu.ku.brc.specify.datamodel.AgentIdentifier" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj" useresourcelabels="true">
<desc>subform on the Agent form.</desc>
<enableRules/>
<columnDef>100px,2px,473px,5px,120px,2px,125px,0px,15px,p:g</columnDef>
<columnDef os="lnx">115px,2px,510px,5px,120px,2px,198px,2px,50px,2px,50px,2px,50px,0px,15px,p:g</columnDef>
<columnDef os="mac">130px,2px,530px,5px,105px,2px,218px,0px,15px,p:g</columnDef>
<columnDef os="exp">p,2px,473px,5px:g,p,2px,125px,0px,15px,p:g</columnDef>
<rowDef auto="true" cell="p" sep="2dlu"/>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="identifier" uitype="text"/>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="identifierType" uitype="combobox"/>
<cell type="panel">
<!-- Default state if no conditions are matched or using Specify 6 -->
<rows><!-- Nothing is shown --></rows>
<!-- Shown if the Identifier Type is ORCID -->
<rows condition="identifierType=ORCID">
<row>
<cell type="field" id="ORCID" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=ORCID;icon=https://orcid.org/assets/vectors/orcid.logo.icon.svg"/>
<cell type="field" id="Bionomia" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Bionomia;icon=https://upload.wikimedia.org/wikipedia/commons/e/e4/Logo_for_Bionomia.png"/>
</row>
</rows>
<!-- Shown if the Identifier Type is Wikidata -->
<rows condition="identifierType=Wikidata">
<row>
<cell type="field" id="Wikidata" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Wikidata;icon=https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/2560px-Wikidata-logo.svg.png"/>
</row>
</rows>
</cell>
</row>
<row>
<cell type="label" labelfor="7"/>
<cell type="field" id="7" name="remarks" uitype="textareabrief" rows="2" colspan="14"/>
</row>
</rows>
</viewdef>
Uploading data to Agent Identifier
Once this is configured, the next step is actually importing agent identifiers to existing agents. This can be accomplished using both the data entry forms and the WorkBench.
Forms
If you are using the data entry forms to create a new ‘Agent’ record or are updating existing ones, you can simply click the icon to the right of the Identifiers subview heading to add a new identifier.
WorkBench
If you are importing ‘Agent’ records for the first time using the WorkBench, you can include the ‘Agent Identifier’ fields in your mapping. Note that each identifier and type must be a pair of columns in the import, though you can have as many identifiers as you’d like:
If you are adding identifiers to existing agents, you will need to use ‘Agent Identifier’ as the base table for your data set plan. New agents will be created if they cannot be matched to existing ones using this approach.
To see this, you will need to check “Show All Tables” in the base table dialog:
Once selected, your mapping should look something like this:
Your new data set must include the following data:
Identifier
(this will be the ORCID ID, Wikidata ID, or other identifier associated with the agent)- Agent Information (This could be a single
GUID
field from Agent, or it could be several fields to help the WorkBench match records that already exist)
Identifier Type
is optional, though if you use the conditional form described above in the “Advanced Configuration” section, you will want to include it.
An example import data set would look something like this:
Note that you can import multiple identifiers for a single ‘Agent’, but they must be on different lines.
That’s it! Now you can begin importing and working with identifiers that enable you to link out to services like ORCID, Bionomia, Wikidata, and many others. If you have any questions, don’t be afraid to reach out!