This plugin handles all of Naviga supported Concept types. The plugin itself will handle any type it's
configured to handle, but is dependent on external config and templates to enable create/edit actions.
As of now these are the supported types (External link)
The plugin can be configured to handle one or many types, it can also be configured to handle one or many subtypes and/or owning concept type through associatedWith.
(e.g type x-im/place, subtypes, position, polygon).
Property | Type | Required | Description |
---|---|---|---|
label |
String | true |
The label to use above the plugin |
name |
String | true |
The main concept type to be used by the plugin instance |
enableHierarchy |
Boolean | false |
If the plugin should display broader relations |
associatedWith |
String | false |
Parent, or owning concept-type used to filter search results |
editable |
Boolean | false |
If the concepts should be editable from the Writer, defaults to true |
creatable |
Boolean | false |
If the concepts should be creatable from the Writer, defaults to true |
allowSimpleAuthors |
Boolean | false |
If it should be allowed to insert a concept with a Nil-UUID (concept will not be saved to repository). Only available for type x-im/author , defaults to false |
placeholderText |
String | false |
The search form placeholder |
icon |
String | false |
Font-awesome icon to use with this type |
appendDataToLink |
Boolean | false |
If data should be added to article xml link, also depends on remote concept config |
provider |
String | false |
Used when a new concept is created from the writer, defaults to "writer" |
pubStatus |
String | false |
Used when a new concept is created from the writer, defaults to "imext:draft" |
googleMapAPIKey |
String | false |
API-key used to populate maps when plugin is used with type x-im/place |
types |
Object | false |
A list of types that will be used by the plugin, if this is set, name wont be used. See Types config example |
subtypes |
Array | false |
A list of subtypes that are allowed |
rel |
String | false |
Forces the rel -attribute for the concept XML to be set to the specified value. Useful when using concepts as tags ("name": "x-im/tag" ). See Tags example |
searchOnFocus |
Boolean | false |
If a search should be performed when the input-field gets focused. Defaults value is true |
allowedConceptStatuses |
Array | false |
Array with statuses to look for when searching for concepts. If omitted all statuses will be included. Supported statuses are: draft , usable , done , withheld and canceled |
customQuery |
String | false |
Define a custom query to be included in all searches. Example: "Active: true" |
singleValue |
String | false |
If you only can choose one value, default false |
categorizeSectionView |
Boolean | true |
If the value is true it will categorized the sections on the basis of channels else it it's false it will only show sections, default true |
Property | Type | Required | Description |
---|---|---|---|
name |
String | true |
Name of the type |
editable |
Boolean | true |
If the concepts should be editable from Writer |
icon |
String | false |
Font-awesome icon to use with this type |
"x-im/person": {
"name": "Person",
"editable": true,
"icon": "fa-superpowers"
}
{
"id": "io.infomaker.concept.section",
"name": "im-concept",
"url": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/index.js",
"style": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/style.css",
"enabled": true,
"mandatory": false,
"data": {
"label": "Section",
"name": "x-im/section",
"enableHierarchy": true,
"associatedWith": "x-im/channel",
"editable": false,
"placeholderText": "Search for section",
"icon": "fa-superpowers",
"singleValue": true,
"appendDataToLink": false,
"provider": "writer",
"pubStatus": "imext:draft",
"searchOnFocus": true,
"allowedConceptStatuses": ["draft", "usable"],
"categorizeSectionView": true
}
}
{
"id": "io.infomaker.concept.place",
"name": "im-concept",
"url": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/index.js",
"style": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/style.css",
"enabled": true,
"mandatory": false,
"data": {
"label": "Places",
"name": "x-im/place",
"enableHierarchy": false,
"editable": true,
"appendDataToLink": true,
"placeholderText": "Search for places",
"googleMapAPIKey": "AIzaSyAdlr4ZwU9U8kD9ophla29QaHboNIiyj5c",
"subtypes": [
"position",
"polygon"
]
}
}
{
"id": "io.infomaker.concept.author",
"name": "im-concept",
"url": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/index.js",
"style": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/style.css",
"enabled": true,
"mandatory": false,
"data": {
"label": "Author",
"name": "x-im/author",
"enableHierarchy": false,
"editable": false,
"creatable": true,
"placeholderText": "Search for author",
"appendDataToLink": true,
"provider": "writer",
"pubStatus": "imext:draft"
}
}
This configuration searches many types of concepts, but since "rel"
is set to "subject"
, it will override the rel values used by x-im/channel
("channel"
) and x-im/author
("author"
) and set it to "subject"
instead.
{
"id": "io.infomaker.concept",
"name": "im-concept",
"url": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/index.js",
"style": "https://plugins.writer.infomaker.io/v1/infomaker/im-concept/{PLUGIN_VERSION}/style.css",
"enabled": true,
"mandatory": false,
"data": {
"label": "Tags",
"name": "x-im/tag",
"enableHierarchy": true,
"editable": true,
"placeholderText": "Search for tags",
"rel": "subject",
"searchOnFocus": false,
"types": {
"x-im/person": {
"name": "Person",
"editable": true,
"icon": "fa-superpowers"
},
"x-im/organisation": {
"name": "Organisation",
"editable": true
},
"x-im/category": {
"name": "Category",
"editable": false
},
"x-im/channel": {
"name": "Channel",
"editable": false
}
}
}
}
To enable Concepts, the "contentHost"
property needs to be present in Naviga Writer configuration.
"conceptServiceConfig"
is optional, and should only include properties that need to be changed from their default values.
"contentHost": {
"protocol": "https://",
"credentials": "include",
"hostName": "xlibris.XX.XX.opencontent.infomaker.io",
"port": "7777",
"healthPath": "/opencontent/health",
"queryPath": "/opencontent/search",
"objectPath": "/opencontent/objects"
},
"conceptServiceConfig": {
"conceptPath": "https://s3-eu-west-1.amazonaws.com/concepts-config-prod/writer/",
"contenttype": "Concept",
"broaderLimit": 3,
"relatedGeoFunction": "Contains",
"relatedGeoExludeSelf": false,
"associationLimit": 50,
"searchLimit": 50,
"sortField": "ConceptNameString",
"titleSearchField": "ConceptNameString",
"allowedConceptStatuses": ["draft", "usable"],
"propertyMap": {
...
}
}
All properties are optional, and if the configuration is omitted, the following default values will be used.
Property | Type | Default | Description |
---|---|---|---|
conceptPath |
String | "https://s3-eu-west-1.amazonaws.com/concepts-config-prod/writer/" |
Optionally override the remote path from where ConceptService can load concept config and templates |
contenttype |
String | "Concept" |
Optionally override Concepts contentType in OC |
broaderLimit |
Number | 3 |
How many steps ConceptService should follow Broader links |
relatedGeoFunction |
String | "Contains" |
Function to use when adding related geo zones to article ("Contains" , "Intersects" , "IsWithin" ) |
relatedGeoExludeSelf |
Boolean | false |
If added geo concepts should be excluded from related-geo tag |
associationLimit |
Number | 50 |
How many association of e.g. ConceptAssociatedWithMeRelations will be connected to the Concept |
searchLimit |
Number | 50 |
Sets the search limit for concept searches |
sortField |
String | "ConceptNameString" |
Sets which index field to sort by |
titleSearchField |
String | "ConceptNameString" |
Optional property to set the OC property used for Concept title search |
allowedConceptStatuses |
Array | All statuses | Optional array with strings to look for when searching for concepts. Supported statuses are: draft , usable , done , withheld and canceled |
propertyMap |
Object | See Propery map | See Propery map |
Optional configuration to use if current Open Content does not use the default configuration for Concepts. The property map is used to translate different kinds of OC configurations into prop names that ConceptService can use.
The left hand side will be used by ConceptService, fill in the property-names from OC on the right hand side. Only properties that differ from the default configuration are required, when using default configuration propertyMap
can be omitted.
"propertyMap": {
"uuid": "uuid",
"ConceptName": "ConceptName",
"ConceptNameString": "ConceptNameString",
"ConceptStatus": "ConceptStatus",
"ConceptDefinitionShort": "ConceptDefinitionShort",
"ConceptDefinitionLong": "ConceptDefinitionLong",
"ConceptImTypeFull": "ConceptImTypeFull",
"ConceptImSubTypeFull": "ConceptImSubTypeFull",
"ConceptGeometry": "ConceptGeometry",
"ConceptAvatarUuid": "ConceptAvatarUuid",
"ConceptAssociatedWith": "ConceptAssociatedWith",
"ConceptAuthorFirstname": "ConceptAuthorFirstname",
"ConceptAuthorLastname": "ConceptAuthorLastname",
"ConceptAuthorEmail": "ConceptAuthorEmail",
"ConceptImIdSubjectId": "ConceptImIdSubjectId",
"ConceptBroaderRelation": "ConceptBroaderRelation",
"ConceptAssociatedWithRelations": "ConceptAssociatedWithRelations",
"ConceptAssociatedWithMeRelations": "ConceptAssociatedWithMeRelations",
"ConceptReplacedByRelation": "ConceptReplacedByRelation"
}
Each selected or created concept will generate a link inside the article's itemMeta
element.
<link rel="subject" title="Cool corp." type="x-im/organisation" uuid="63d5dcc1-28f1-4892-9f44-142043541de1"/>
If the plugin config appendDataToLink
is set to true
, concept data will be added as data to the link. The article data instructions are read from a remote config file that is unique per concept type.
Please note! There is a appendDataToLink
-setting in the User Byline-plugin too. To get the same output of articleData on author (which is set by User Byline-plugin) and added authors (set by the Concept plugin), the setting appendDataToLink
needs to be the same in the Userbyline and Concept-author plugin configurations.
<link rel="author" title="Rob Zombie!" type="x-im/author" uuid="ccdbcf5a-4fba-4d61-bb2f-8469a7c5d357">
<data>
<email>robert@demonoid.nu</email>
<firstName>Rob</firstName>
<lastName>Zombie</lastName>
<facebookUrl>https://www.facebook.com/RobZombie/</facebookUrl>
<shortDescription>Testar</shortDescription>
<longDescription>Testar</longDescription>
</data>
</link>
Concepts with a rel broader
will be decorated with data about the concepts hierarchical chain to the depth
specified in ConcepService Config:
"broaderLimit": 3,
<link rel="subject" title="Elitserien" type="x-im/category" uuid="b3c8f46f-00db-4e23-a98f-69494582aacc">
<links>
<link rel="subject" title="Ishockey" type="x-im/category" uuid="72addee2-b68d-4f39-9e5f-0f1c45c0637e"/>
<link rel="subject" title="Sport" type="x-im/category" uuid="45f12bb9-3cfc-494a-aeb5-49008812bb47"/>
</links>
</link>
Concepts that are associated with other concepts will decorate the article with information about this relationship
<links>
<link title="Channel A" rel="subject" type="x-im/channel" uuid="a9991f43-665b-4b5f-aa5e-fce55bd27f6b"/>
<link title="Channel B" rel="subject" type="x-im/channel" uuid="14c21e49-da94-42f9-84db-dc2f464b3cb0"/>
<!-- This Concept has the associated-with set to uuid of concept "Channel A" -->
<link title="Section A" rel="subject" type="x-im/section" uuid="ed299eb3-1f7d-4863-ad8e-51b6ac260689">
<links>
<link title="Channel A" rel="associated-with" type="x-im/channel" uuid="a9991f43-665b-4b5f-aa5e-fce55bd27f6b"/>
</links>
</link>
<!-- This Concept has the associated-with set to uuid of concept "Channel B" -->
<link title="Section B" rel="subject" type="x-im/section" uuid="41cd1eef-ca70-4d8f-8e74-e6834f310837">
<links>
<link title="Channel B" rel="associated-with" type="x-im/channel" uuid="14c21e49-da94-42f9-84db-dc2f464b3cb0"/>
</links>
</link>
<!-- This Concept has the associated-with set to uuids of concept "Channel A" and "Channel B" -->
<link title="Section C" rel="subject" type="x-im/section" uuid="9fab0f64-16bb-4eeb-891e-5da87a923339">
<links>
<link title="Channel A" rel="associated-with" type="x-im/channel" uuid="a9991f43-665b-4b5f-aa5e-fce55bd27f6b"/>
<link title="Channel B" rel="associated-with" type="x-im/channel" uuid="14c21e49-da94-42f9-84db-dc2f464b3cb0"/>
</links>
</link>
</links>
If a concept has been marked with "replaced by", the new concept will be added if selected:
If the ConceptService config property relatedGeoFunction
is set, a background check will be made to look up areas
that correlates with selected polygon. The correlating areas will be added to the article as a related-geo link
tag.
Available functions are: "Contains"
, "Intersects"
, "IsWithin"
. These links are not displayed to the user but are
to be considered as an extension available for searching.
<link rel="subject" title="Oxhagen" type="x-im/place" uuid="952adffb-1a8e-492c-b5b1-175df1f91874">
<data>
<geometry>POLYGON((16.337724687158243 56.67353746432897,
16.34029960781254 56.674952121793844,
16.339870454370157 56.67806418123245,
16.337724687158243 56.67820563237095,
16.333690644799844 56.677922729562766,
16.330171586572305 56.677781277361916,
16.3298282638184 56.67627242083415,
16.32776832729496 56.67551796990587,
16.327854157983438 56.67443342022474,
16.33480644375004 56.67363177647931,
16.337724687158243 56.67353746432897))</geometry>
</data>
</link>
<link rel="related-geo">
<data>
<uuid title="Kalmar">320938f8-db94-11e5-b5d2-0a1d41d68578</uuid>
<uuid title="Oxhagen">952adffb-1a8e-492c-b5b1-175df1f91874</uuid>
</data>
</link>