Problem:
How to add a ToolTip to an entity?
Solution:
We make use of entity attribute called "TooltipPattern" to assign ToolTip to entities.
"dataTooltipPattern" is used to build the entity object's tooltip. It can include static text as well as patterns-attributes in curly brackets.
Note: If "dataTooltipPattern" is not specified, then the label is used.
Example -
{
"uri": "configuration/entityTypes/GPO",
"label": "GPO",
"abstract": true,
"skipValidationForAbstractType": true,
"dataTooltipPattern": "configuration/entityTypes/GPO",
"typeColor": "#AB8800",
"typeIcon": "images/base_type/house.png",
"typeImage": "images/defaultImage/no-loc.png",
"typeGraphIcon": "images/graphIcon/location-icon.png",
"extendsTypeURI": "configuration/entityTypes/Organization",
"attributes": [...],
"geoLocationAttributes": [...],
"dataLabelPattern": "{Name}",
"secondaryLabelPattern": "{businessCardAttributes}",
"survivorshipGroups": [...],
"imageAttributeURIs": [...],
"analyticsAttributes": [...]
}How to send data values to "dataTooltipPattern" -
To send data to "dataTooltipPattern" you have to pass the value as "tooltip": "value"
For Example -
{
"URI": "entities/e1",
"roles": [
"configuration/roles/Client",
"configuration/roles/Prospect"
],
"tags": [
"sport",
"movies"
],
"createdTime": 1351899105569,
"createdBy": "admin",
"updatedTime": 1353933493738,
"updatedBy": "fadler",
"activeness": {
"startDate": 270431852
},
"type": "configuration/entityTypes/Individual",
"label": "Ivan",
"tooltip": "Ivan",
"attributes": {
"URI": "entities/e1/attributes",
"FirstName": [{
"URI": "entities/e1/attributes/FirstName/1",
"type": "configuration/entityTypes/Individual/attributes/FirstName",
"value": "Ivan"
},
{
"URI": "entities/e1/attributes/FirstName/2",
"type": "configuration/entityTypes/Individual/attributes/FirstName",
"value": "John"
}
],
"Education": [{
"URI": "entities/e1/attributes/Education/3",
"type": "configuration/entityTypes/Individual/attributes/Education",
"value": {
"University": [{
"URI": "entities/e1/attributes/Education/3/University/4",
"type": "configuration/entityTypes/Individual/attributes/Education/University",
"value": "UCSF"
},
{
"URI": "entities/e1/attributes/Education/3/University/5",
"type": "configuration/entityTypes/Individual/attributes/Education/University",
"value": "SPbGU"
}
]
}
}],
"Address": [{
"URI": "entities/e1/attributes/Address/6",
"entityURI": "entities/e2",
"type": "configuration/entityTypes/Individual/attributes/Address",
"value": {
"City": [{
"URI": "entities/e1/attributes/Address/6/City/7",
"type": "configuration/entityTypes/Location/attributes/City",
"value": "New York"
}],
"AddressType": [{
"URI": "entities/e1/attributes/Address/6/AddressType/8",
"type": "configuration/relationshipTypes/HasAddress/attributes/AddressType",
"value": "Home"
}]
}
}]
},
"crosswalks": [{
"URI": "entities/e1/crosswalks/1",
"type": "configuration/sources/MDM",
"value": "Person.781",
"attributeURIs": [
"entities/e1/attributes/FirstName/1",
"entities/e1/attributes/FirstName/2",
"entities/e1/attributes/Education/3/University/4",
"entities/e1/attributes/Education/3/University/5"
]
}]
}
Comments
Please sign in to leave a comment.