SemanticSearchImplementation
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SemanticSearchImplementation.DataTypeParser Class Reference

Contains methods to parse the objects of a metadata graph according to the mapping type. More...

Public Member Functions

 DataTypeParser (RdfClient RDFClient)
 
JObject Parse (string label, INode node, ElasticsearchIndexMapper indexMapper, SpecificApplicationProfile profile)
 Parses the node given the mapping and profile. More...
 
JObject ParseDate (string label, ILiteralNode literalNode)
 Parses a literal node into a date and adds fields for day, month and year. More...
 
JObject ParseString (string label, ILiteralNode literalNode)
 Parses a literal node into a string. More...
 
JObject ParseInt (string label, ILiteralNode literalNode)
 Parses a literal node into an integer. More...
 

Private Member Functions

JObject ParseLiteralNode (string label, string type, ILiteralNode literalNode)
 Parses literal nodes depending on the needed Elasticsearch type specified in the mapping for a label. More...
 
JObject ParseBoolean (string label, ILiteralNode literalNode)
 Parses a literal node into a boolean and adds second field for a written representation of the label and boolean value. More...
 

Private Attributes

RdfClient _RDFClient
 

Detailed Description

Contains methods to parse the objects of a metadata graph according to the mapping type.

Constructor & Destructor Documentation

◆ DataTypeParser()

SemanticSearchImplementation.DataTypeParser.DataTypeParser ( RdfClient  RDFClient)
inline

Member Function Documentation

◆ Parse()

JObject SemanticSearchImplementation.DataTypeParser.Parse ( string  label,
INode  node,
ElasticsearchIndexMapper  indexMapper,
SpecificApplicationProfile  profile 
)
inline

Parses the node given the mapping and profile.

Parameters
labelThe label of the field.
nodeThe node which needs to be converted into a (list of) literal.
indexMapperThe ElasticsearchIndexMapper.
profileThe specific applicationprofile the node belongs to.
Returns
A JSON object containing the label (key) and the corresponding literal/list of literals (value).

◆ ParseBoolean()

JObject SemanticSearchImplementation.DataTypeParser.ParseBoolean ( string  label,
ILiteralNode  literalNode 
)
inlineprivate

Parses a literal node into a boolean and adds second field for a written representation of the label and boolean value.

Parameters
labelThe label of the property which is used as field.
literalNodeThe literal node which needs to be parsed.
Returns
A JSON object containing the label (key) and the corresponding boolean (value) as well as a written variant.

◆ ParseDate()

JObject SemanticSearchImplementation.DataTypeParser.ParseDate ( string  label,
ILiteralNode  literalNode 
)
inline

Parses a literal node into a date and adds fields for day, month and year.

Parameters
labelThe label of the property which is used as field.
literalNodeThe literal node which needs to be parsed.
Returns
A JSON object containing the label (key) and the corresponding date (value) as well as pairs for day, year and month.

◆ ParseInt()

JObject SemanticSearchImplementation.DataTypeParser.ParseInt ( string  label,
ILiteralNode  literalNode 
)
inline

Parses a literal node into an integer.

Parameters
labelThe label of the property which is used as field.
literalNodeThe literal node which needs to be parsed.
Returns
A JSON object containing the label (key) and the corresponding integer (value).

◆ ParseLiteralNode()

JObject SemanticSearchImplementation.DataTypeParser.ParseLiteralNode ( string  label,
string  type,
ILiteralNode  literalNode 
)
inlineprivate

Parses literal nodes depending on the needed Elasticsearch type specified in the mapping for a label.

Parameters
labelThe label of the property which is used as field.
typeThe type specified in the Elasticsearch mapping for the label.
literalNodeThe literal node which needs to be parsed.
Returns
A JSON object containing the label (key) and the corresponding literal (value).

◆ ParseString()

JObject SemanticSearchImplementation.DataTypeParser.ParseString ( string  label,
ILiteralNode  literalNode 
)
inline

Parses a literal node into a string.

Parameters
labelThe label of the property which is used as field.
literalNodeThe literal node which needs to be parsed.
Returns
A JSON object containing the label (key) and the corresponding string (value).

Member Data Documentation

◆ _RDFClient

RdfClient SemanticSearchImplementation.DataTypeParser._RDFClient
private

The documentation for this class was generated from the following file: