ULAPI
8.0
Main Page
Classes
source
datasources
uljsondictionarydatasource.h
1
7
#ifndef ULJSONDICTIONARYDATASOURCE_H
8
#define ULJSONDICTIONARYDATASOURCE_H
9
10
#include "uldictionary.h"
11
#include "uldictionarydatasource.h"
12
#include "ulpartofspeechcategory.h"
13
#include "ulsegmentedfile.h"
14
#include "json/json.h"
15
22
class
ULJSONDictionaryDataSource
:
public
ULDictionaryDataSource
23
{
24
UL_TEST_FRIEND;
25
friend
class
ULJSONDictionaryIterator
;
26
27
public
:
28
ULJSONDictionaryDataSource
();
29
ULJSONDictionaryDataSource
(
const
ULJSONDictionaryDataSource
& other);
30
virtual
~ULJSONDictionaryDataSource
();
31
32
ULJSONDictionaryDataSource
&
operator=
(
const
ULJSONDictionaryDataSource
& other);
33
34
virtual
bool
operator==
(
const
ULDictionaryDataSource
& dataSource)
const
;
35
virtual
bool
operator==
(
const
ULJSONDictionaryDataSource
& dataSource)
const
;
36
37
// ULWorker operations.
38
virtual
bool
isServiceAvailable
(
const
ULServiceDescriptor
& service);
39
virtual
void
getAvailableServices
(
ULList<ULServiceDescriptor>
& serviceList);
40
41
// ULDataSource operations.
42
virtual
ULError
attach
(
const
ULString
& dataSourceIdentifier);
43
virtual
ULError
detach
();
44
virtual
ULError
load
();
45
virtual
ULError
close
();
46
virtual
ULString
getDataSourceIdentifier
();
47
virtual
ULDataSourceVersion
getVersion
();
48
49
// ULDictionary operations.
50
virtual
ULError
begin
(
const
ULLanguage
& searchLanguage,
51
uluint32 indexID,
52
ULDictionaryIterator
& iterator);
53
54
virtual
ULError
end
(
const
ULLanguage
& searchLanguage,
55
uluint32 indexID,
56
ULDictionaryIterator
& iterator);
57
58
virtual
ULError
find
(
const
ULString
& s,
59
const
ULLanguage
& searchLanguage,
60
uluint32 indexID,
61
ULDictionaryIterator
& iterator);
62
63
// ULDictionaryDataSource operations.
64
virtual
ULDictionaryDescriptor
getDictionaryDescriptor
();
65
virtual
const
ULLanguage
&
getFirstLanguage
();
66
virtual
const
ULLanguage
&
getSecondLanguage
();
67
virtual
const
ULLanguage
&
getOtherLanguage
(
const
ULLanguage
&
language
);
68
virtual
ULForestType
getForestType
();
69
virtual
ULForester *
getForester
();
70
virtual
void
setForester
(ULForester *newForester);
71
virtual
ULError
getFeatureNameList
(
ULList<ULString>
& featureNameList);
72
virtual
ULError
getLocalizationRuleList
(
const
ULLanguage
&
language
,
ULList<ULLocalizationRule>
& localizationRulesList);
73
virtual
bool
getULDAttribute
(
const
ULString
& key,
ULString
& value);
74
75
protected
:
76
ULString
jsonData
;
77
Json::Value
jsonRoot
;
78
uluint32
nNodes
;
79
ULLanguage
firstLanguage
;
80
ULLanguage
secondLanguage
;
81
ULForester *
forester
;
82
ULString
*
featureNames
;
83
84
bool
isOpen
()
const
;
85
void
clear
();
86
};
87
88
#endif
89
Generated on Sat Apr 13 2013 12:59:07 for ULAPI by
1.8.2