Class TermTransformator
Inherited Members
Namespace: PnP.Framework.Modernization.Transform
Assembly: PnP.Framework.dll
Syntax
public class TermTransformator : BaseTransform
Constructors
TermTransformator(BaseTransformationInformation, ClientContext, ClientContext, IList<ILogObserver>)
Constructor for the Term Transformator class
Declaration
public TermTransformator(BaseTransformationInformation baseTransformationInformation, ClientContext sourceContext, ClientContext targetContext, IList<ILogObserver> logObservers = null)
Parameters
BaseTransformationInformation
baseTransformationInformation
|
ClientContext
sourceContext
|
ClientContext
targetContext
|
IList<ILogObserver>
logObservers
|
Fields
TermGroupUnknownName
Declaration
public const string TermGroupUnknownName = null
Field Value
System.String
|
TermNodeDelimiter
Declaration
public const string TermNodeDelimiter = null
Field Value
System.String
|
Methods
CacheTermsFromTermStore(Guid, Guid, Guid, Boolean)
Sets the cache for contents of the term store to be used when getting terms for fields
Declaration
public void CacheTermsFromTermStore(Guid sourceTermSetId, Guid targetTermSetId, Guid sourceSspId, bool isSP2010)
Parameters
Guid
sourceTermSetId
|
Guid
targetTermSetId
|
Guid
sourceSspId
|
System.Boolean
isSP2010
|
CallTaxonomyWebServiceFindChildTerms(ClientContext, Guid, Guid, Guid, String)
Finds the child terms using the fall back web services
Declaration
public static Dictionary<Guid, TermData> CallTaxonomyWebServiceFindChildTerms(ClientContext context, Guid sspId, Guid termSetId, Guid termId, string subTermPath)
Parameters
ClientContext
context
|
Guid
sspId
|
Guid
termSetId
|
Guid
termId
|
System.String
subTermPath
|
Returns
Dictionary<Guid, TermData>
|
CallTaxonomyWebServiceFindTermSetId(ClientContext, Guid, Guid)
Calls the web services to get the termset details
Declaration
public static Dictionary<Guid, TermData> CallTaxonomyWebServiceFindTermSetId(ClientContext context, Guid sspId, Guid termSetId)
Parameters
ClientContext
context
|
Guid
sspId
|
Guid
termSetId
|
Returns
Dictionary<Guid, TermData>
|
ExtractTermSetIdOrSspIdFromXmlSchema(String, Boolean)
Extracts the term set id from the xml schema
Declaration
public static string ExtractTermSetIdOrSspIdFromXmlSchema(string xmlfieldSchema, bool findSspId = false)
Parameters
System.String
xmlfieldSchema
XML Schema |
System.Boolean
findSspId
If true the SspId will be returned, otherwise the TermSetId will be |
Returns
System.String
TermSetId or SspId depending on |
GetAllTermsFromTermSet(Guid, ClientContext)
Extract all the terms from a termset for caching and quicker processing
Declaration
public static Dictionary<Guid, TermData> GetAllTermsFromTermSet(Guid termSetId, ClientContext context)
Parameters
Guid
termSetId
|
ClientContext
context
|
Returns
Dictionary<Guid, TermData>
|
ParseSubTerms(String, Term, Guid, ClientRuntimeContext)
Gets the term labels within a term recursively
Declaration
public static Dictionary<Guid, TermData> ParseSubTerms(string subTermPath, Term term, Guid termSetId, ClientRuntimeContext clientContext)
Parameters
System.String
subTermPath
|
Term
term
|
Guid
termSetId
|
ClientRuntimeContext
clientContext
|
Returns
Dictionary<Guid, TermData>
|
ResolveTermInCache(ClientContext, Guid)
Validate the source term contains the GUID and is recognised in the term store
Declaration
public TermData ResolveTermInCache(ClientContext context, Guid termId)
Parameters
ClientContext
context
|
Guid
termId
|
Returns
TermData
|
ResolveTermInCache(ClientContext, String)
Validate the source term contains the path and is recognised in the term store
Declaration
public TermData ResolveTermInCache(ClientContext context, string termPath)
Parameters
ClientContext
context
|
System.String
termPath
|
Returns
TermData
|
Transform(TermData)
Main entry method for transforming terms
Declaration
public TermData Transform(TermData inputSourceTerm)
Parameters
TermData
inputSourceTerm
|
Returns
TermData
|
TransformCollection(TaxonomyFieldValueCollection)
Transforms a collection of terms in a dictionary
Declaration
public Tuple<TaxonomyFieldValueCollection, List<TaxonomyFieldValue>> TransformCollection(TaxonomyFieldValueCollection taxonomyFieldValueCollection)
Parameters
TaxonomyFieldValueCollection
taxonomyFieldValueCollection
|
Returns
Tuple<TaxonomyFieldValueCollection, List<TaxonomyFieldValue>>
Tuple<TaxonomyFieldValueCollection,List<TaxonomyFieldValue>> TaxonomyFieldValueCollection - Original Array List<TaxonomyFieldValue> - Items to remove as they are not resolved |