Example Taxonomy Connector configurations

The examples provided illustrate some different configurations of the Taxonomy Connector.

Configuration file with default values

The connector comes with the following sample configuration file with the recommended default values for numerous settings:

{
  "configuration": {
    "PoolPartyConnector": {
      "configuration": {
        "baseUrl": "",
        "userName": "",
        "password": "",
        "projectId": "",
        "conceptSchemeUri": "",
        "useLanguage": "UserLanguage",
        "cacheLifetimeSeconds": 300,
        "extractConcepts": {
          "minimumScoreThreshold": 0.0,
          "maximumConceptsPerField": 0
        },
        "connectionPolicies": {
          "timeoutMilliseconds": 2000,
          "longTimeoutSeconds": 60,
          "responseTimeWarningMilliseconds": 2000,
          "circuitBreaker": {
            "minimumThroughput": 5,
            "failureThresholdPercentage": 50,
            "samplingDurationSeconds": 15,
            "breakDurationSeconds": 30
          }
        },
        "customProperties": []
      },
      "namespaces": {
        "pparty": {
          "displayName": "PoolParty",
          "stubCategories": [ "" ],
          "useFeature": "Taxonomy"
        }
      }
    }
  },
  "sitesCm": {
    "isEnabled": true,
    "configuration": {
      "useLanguage": "PublicationLanguage"
    }
  },
  "staging": {
    "isEnabled": true
  },
  "live": {
    "isEnabled": true
  }
}

Example file for a single taxonomy

The following sample code illustrates the configuration file for a single taxonomy:

{ 
"configuration": { 
  "PoolPartyConnector": { 
    "configuration": { 
      "baseUrl": "https://rws.poolparty.biz/", 
      "userName": "TridionUser", 
      "password": "FakeP@ssw0rd!", 
      "projectId": "1E26021B-1C2E-0001-A0C3-17E0FDDD13B6", 
      "useLanguage": "UserLanguage", 
      "cacheLifetimeSeconds": 300, 
      "customProperties": [ 
        { 
        "propertyUri": "http://e-learning.poolparty.biz/Cocktails/preparation", 
        "fieldName": "Preparation", 
        "description": "How to prepare the cocktail", 
        "fieldType": "String", 
        "isReadOnly": true, 
        "isList": false 
        }, 
	       { 
        "propertyUri": "http://purl.org/dc/terms/created", 
        "fieldName": "CreationDate", 
        "description": "Creation date", 
        "fieldType": "DateTimeOffset", 
        "isReadOnly": true, 
        "isList": false 
        }, 
        { 
        "propertyUri": "http://purl.org/dc/terms/modified", 
        "fieldName": "LastModified", 
        "description": "Last modified", 
        "fieldType": "DateTimeOffset", 
        "isReadOnly": true, 
        "isList": false 
        }, 
        { 
        "propertyUri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", 
        "fieldName": "RdfsTypes", 
        "description": "Concept type(s)", 
        "fieldType": "String", 
        "isReadOnly": true, 
        "isList": true 
        } 
      ], 
      "connectionPolicies": { 
        "timeoutMilliseconds": 1000, 
        "longTimeoutSeconds": 60, 
        "responseTimeWarningMilliseconds": 1000, 
        "circuitBreaker": { 
           "minimumThroughput": 5, 
           "failureThresholdPercentage": 50, 
           "samplingDurationSeconds": 15, 
           "breakDurationSeconds": 30 
        } 
      }, 
      "namespaces": { 
        "namespace1": { 
          "displayName": "Cocktails", 
          "stubCategories": [ "tcm:1-1378-512" ], 
          "useFeature": "Taxonomy" 
		        "configuration" : {
		          "conceptSchemeUri": "http://e-learning.poolparty.biz/cocktails/8d052dfc"
	      	  }
        }  
      } 
    } 
  } 
  "sitesCm": {
    "isEnabled": true,
    "configuration": {
      "useLanguage": "PublicationLanguage"
    }
  },
  "staging": {
    "isEnabled": true
  },
  "live": {
    "isEnabled": true
  }
}

Notice that the namespaces section includes a single namespace called "namespace1" and it defines both the concept scheme from the Taxonomy Space project and also the stub Category from Content Manager.

Example file for multiple taxonomies

The following sample code illustrates a configuration file that defines two taxonomies:

{
  "configuration": {
    "PoolPartyConnector": {
      "configuration": {
        "baseUrl": "https://rws.poolparty.biz/",
        "userName": "superadmin",
        "password": "FakeP@ssw0rd!",
        "useUserLanguage": true,
        "cacheLifetimeSeconds": 300,
        "extractConcepts": {
          "minimumScoreThreshold": 50.0,
          "maximumConceptsPerField": 5
        },
        "connectionPolicies": {
          "timeoutMilliseconds": 2000,
          "longTimeoutSeconds": 60,
          "responseTimeWarningMilliseconds": 2000,
          "circuitBreaker": {
            "minimumThroughput": 5,
            "failureThresholdPercentage": 50,
            "samplingDurationSeconds": 15,
            "breakDurationSeconds": 30
          }
        },
        "customProperties": []
      },
      "namespaces": {
        "namespace1": {
          "displayName": "Politics",
          "stubCategories": [ "tcm:3-145-512" ],
          "useFeature": "Taxonomy",
          "configuration" : {
		          "projectId": "1018dab6-d5aa-4323-8032-98ca303558bd",
		          "conceptSchemeUri": "http://eurovoc.europa.eu/100142"
		        }

        },
		      "namespace2": {
          "displayName": "Relations",
          "stubCategories": [ "tcm:3-146-512" ],
          "useFeature": "Taxonomy",
		        "configuration" : {
				  "projectId": "1018dab6-d5aa-4323-8032-98ca303558dv",
		          "conceptSchemeUri": "http://eurovoc.europa.eu/100143"
	      	  }
        }
      }
    }
  },
  "sitesCm": {
    "isEnabled": true,
    "configuration": {
      "useLanguage": "PublicationLanguage"
    }
  },
  "staging": {
    "isEnabled": true
  },
  "live": {
    "isEnabled": true
  }
}

In this example, the namespaces section now includes two namespace definitions, one for each of the two taxonomies. As before, each namespace section maps one taxonomy (identified by its conceptSchemeUri) to one stub Category ( identified by its TCM URI).