Class FacetGroupHelper
- Namespace
- Dynamicweb.Indexing.Querying.Faceting
- Assembly
- Dynamicweb.Indexing.dll
The Class FacetGroupHelper helps to work with facet groups
public static class FacetGroupHelper
- Inheritance
-
FacetGroupHelper
- Inherited Members
Methods
ConvertToFacets(JObject)
Converts json object into facet group
public static IFacetGroup ConvertToFacets(JObject obj)
Parameters
obj
JObject- The object to be converted into facet group
Returns
- IFacetGroup
- Facet group instance
ConvertToFacets(XElement)
Converts xml element into facet group
public static IFacetGroup ConvertToFacets(XElement obj)
Parameters
obj
XElement- The element to be converted into facet group
Returns
- IFacetGroup
- Facet group instance
ConvertToJson(IFacetGroup)
Converts facet group into json object
public static JObject ConvertToJson(IFacetGroup facets)
Parameters
facets
IFacetGroup- The facet group to be converted
Returns
- JObject
- Facet group in json object representation
ConvertToXml(IFacetGroup)
Converts facet group into xml element
public static XElement ConvertToXml(IFacetGroup facets)
Parameters
facets
IFacetGroup- The facet group to be converted
Returns
- XElement
- Facet group in xml element representation
GetValueMapper(IEnumerable<Type>, string)
public static ValueMapperBase GetValueMapper(IEnumerable<Type> valueMappers, string facetSource)
Parameters
valueMappers
IEnumerable<Type>facetSource
string
Returns
LoadFacets(IQueryService, string, RepositoryFileFormat)
Loads facet group
public static IFacetGroup LoadFacets(this IQueryService queryService, string fileName, RepositoryFileFormat fileFormat)
Parameters
queryService
IQueryService- Query service instance
fileName
string- Path to query file in file system
fileFormat
RepositoryFileFormat- Format of query
Returns
- IFacetGroup
- Query facet group
Merge(JObject, IFacetGroup)
Merges facet group to json object
public static void Merge(JObject json, IFacetGroup facets)
Parameters
json
JObject- Json object instance
facets
IFacetGroup- Facet group instance
Merge(XElement, IFacetGroup)
Merges facet group to xml element
public static void Merge(XElement element, IFacetGroup facets)
Parameters
element
XElement- Xml element instance
facets
IFacetGroup- Facet group instance
SaveFacets(IQueryService, string, IFacetGroup, RepositoryFileFormat)
Saves facet group
public static void SaveFacets(this IQueryService queryService, string fileName, IFacetGroup facets, RepositoryFileFormat fileFormat)
Parameters
queryService
IQueryService- Query service instance
fileName
string- Path to query file in file system
facets
IFacetGroup- The facet group
fileFormat
RepositoryFileFormat- Format of query