-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aleksei Litkovetc
committed
Apr 8, 2017
1 parent
e02dc47
commit e0d3017
Showing
25 changed files
with
3,812 additions
and
4,597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Class ikra.Dictionary.Category Extends %Persistent | ||
{ | ||
|
||
Property CtgName As %String; | ||
|
||
Storage Default | ||
{ | ||
<Data name="CategoryDefaultData"> | ||
<Value name="1"> | ||
<Value>%%CLASSNAME</Value> | ||
</Value> | ||
<Value name="2"> | ||
<Value>CtgName</Value> | ||
</Value> | ||
</Data> | ||
<DataLocation>^ikra.Dictionary.CategoryD</DataLocation> | ||
<DefaultData>CategoryDefaultData</DefaultData> | ||
<IdLocation>^ikra.Dictionary.CategoryD</IdLocation> | ||
<IndexLocation>^ikra.Dictionary.CategoryI</IndexLocation> | ||
<StreamLocation>^ikra.Dictionary.CategoryS</StreamLocation> | ||
<Type>%Library.CacheStorage</Type> | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Class ikra.Dictionary.Domains Extends %Persistent | ||
{ | ||
|
||
Property dmnName As %String; | ||
|
||
Index indDmnNm On dmnName [ Unique ]; | ||
|
||
Storage Default | ||
{ | ||
<Data name="DomainsDefaultData"> | ||
<Value name="1"> | ||
<Value>%%CLASSNAME</Value> | ||
</Value> | ||
<Value name="2"> | ||
<Value>dmnName</Value> | ||
</Value> | ||
</Data> | ||
<DataLocation>^ikra.Dictionary.DomainsD</DataLocation> | ||
<DefaultData>DomainsDefaultData</DefaultData> | ||
<IdLocation>^ikra.Dictionary.DomainsD</IdLocation> | ||
<IndexLocation>^ikra.Dictionary.DomainsI</IndexLocation> | ||
<StreamLocation>^ikra.Dictionary.DomainsS</StreamLocation> | ||
<Type>%Library.CacheStorage</Type> | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Class ikra.Dictionary.EMarker Extends %Persistent | ||
{ | ||
|
||
Property EName As %String; | ||
|
||
Property EValue As %Integer; | ||
|
||
Storage Default | ||
{ | ||
<Data name="EMarkerDefaultData"> | ||
<Value name="1"> | ||
<Value>%%CLASSNAME</Value> | ||
</Value> | ||
<Value name="2"> | ||
<Value>EName</Value> | ||
</Value> | ||
<Value name="3"> | ||
<Value>EValue</Value> | ||
</Value> | ||
</Data> | ||
<DataLocation>^ikra.Dictionary.EMarkerD</DataLocation> | ||
<DefaultData>EMarkerDefaultData</DefaultData> | ||
<IdLocation>^ikra.Dictionary.EMarkerD</IdLocation> | ||
<IndexLocation>^ikra.Dictionary.EMarkerI</IndexLocation> | ||
<StreamLocation>^ikra.Dictionary.EMarkerS</StreamLocation> | ||
<Type>%Library.CacheStorage</Type> | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Class ikra.Dictionary.Fmarker Extends %Persistent | ||
{ | ||
|
||
Property FName As %String; | ||
|
||
Property CtgID As %Integer; | ||
|
||
Storage Default | ||
{ | ||
<Data name="FmarkerDefaultData"> | ||
<Value name="1"> | ||
<Value>%%CLASSNAME</Value> | ||
</Value> | ||
<Value name="2"> | ||
<Value>FName</Value> | ||
</Value> | ||
<Value name="3"> | ||
<Value>CtgID</Value> | ||
</Value> | ||
</Data> | ||
<DataLocation>^ikra.Dictionary.FmarkerD</DataLocation> | ||
<DefaultData>FmarkerDefaultData</DefaultData> | ||
<IdLocation>^ikra.Dictionary.FmarkerD</IdLocation> | ||
<IndexLocation>^ikra.Dictionary.FmarkerI</IndexLocation> | ||
<StreamLocation>^ikra.Dictionary.FmarkerS</StreamLocation> | ||
<Type>%Library.CacheStorage</Type> | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Class ikra.Dictionary.Load Extends %Persistent | ||
{ | ||
|
||
ClassMethod LoadFunctional(sFolder As %String = "C:\InterSystems\Cache\CSP\ikra\Load\Fmarkers.txt") | ||
{ | ||
set cid = 0 | ||
set stream = ##class(%Stream.FileCharacter).%New() | ||
set sc = stream.LinkToFile(sFolder) | ||
while 'stream.AtEnd { | ||
set str = stream.ReadLine() | ||
if (($piece(str, "#", 1) = "i") && ($piece(str, "#", 2) '= "END")) { | ||
set cName = $piece(str, "#", 2) | ||
&sql(INSERT INTO ikra_Dictionary.Category(CtgName) VALUES(:cName)) | ||
&sql(SELECT ID INTO :cid FROM ikra_Dictionary.Category WHERE CtgName = :cName) | ||
} | ||
elseif ($piece(str, "#", 1) = "t") { | ||
set fName = $piece(str, "#", 2) | ||
&sql(INSERT INTO ikra_Dictionary.Fmarker(FName, CtgID) VALUES(:fName, :cid)) | ||
} | ||
} | ||
} | ||
|
||
ClassMethod LoadEmotion(sFolder As %String = "C:\InterSystems\Cache\CSP\ikra\Load\Emarkers.txt") | ||
{ | ||
set stream = ##class(%Stream.FileCharacter).%New() | ||
set sc = stream.LinkToFile(sFolder) | ||
while 'stream.AtEnd { | ||
set str = stream.ReadLine() | ||
set eVal = $piece(str, "#", 1) | ||
set cName = $piece(str, "#", 2) | ||
set i = 1 | ||
while ($piece(cName, ",", i) '= "") { | ||
set eName = $piece(cName, ",", i) | ||
set i = i + 1 | ||
&sql(INSERT INTO ikra_Dictionary.EMarker(EName, EValue) VALUES(:eName, :eVal)) | ||
} | ||
} | ||
} | ||
|
||
ClassMethod DellFunctional() | ||
{ | ||
do ##class(ikra.Dictionary.Category).%KillExtent() | ||
do ##class(ikra.Dictionary.Fmarker).%KillExtent() | ||
/*&sql(DELETE FROM ikra_Dictionary.Category) | ||
&sql(DELETE FROM ikra_Dictionary.FMarker)*/ | ||
} | ||
|
||
ClassMethod DellEmotion() | ||
{ | ||
do ##class(ikra.Dictionary.EMarker).%KillExtent() | ||
/*&sql(DELETE FROM ikra_Dictionary.EMarker)*/ | ||
} | ||
|
||
Storage Default | ||
{ | ||
<Data name="LoadDefaultData"> | ||
<Value name="1"> | ||
<Value>%%CLASSNAME</Value> | ||
</Value> | ||
</Data> | ||
<DataLocation>^ikra.Dictionary.LoadD</DataLocation> | ||
<DefaultData>LoadDefaultData</DefaultData> | ||
<IdLocation>^ikra.Dictionary.LoadD</IdLocation> | ||
<IndexLocation>^ikra.Dictionary.LoadI</IndexLocation> | ||
<StreamLocation>^ikra.Dictionary.LoadS</StreamLocation> | ||
<Type>%Library.CacheStorage</Type> | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Class ikra.Dictionary.MarksReview Extends %Persistent | ||
{ | ||
|
||
Property DomainID As %Integer; | ||
|
||
Property UID As %Integer; | ||
|
||
Property RID As %Integer; | ||
|
||
Property CtgID As %Integer; | ||
|
||
Property Mark As %Numeric; | ||
|
||
Index fkMR On (DomainID, UID, RID, CtgID) [ PrimaryKey, Unique ]; | ||
|
||
Storage Default | ||
{ | ||
<Data name="MarksReviewDefaultData"> | ||
<Value name="1"> | ||
<Value>%%CLASSNAME</Value> | ||
</Value> | ||
<Value name="2"> | ||
<Value>DomainID</Value> | ||
</Value> | ||
<Value name="3"> | ||
<Value>UID</Value> | ||
</Value> | ||
<Value name="4"> | ||
<Value>RID</Value> | ||
</Value> | ||
<Value name="5"> | ||
<Value>CtgID</Value> | ||
</Value> | ||
<Value name="6"> | ||
<Value>Mark</Value> | ||
</Value> | ||
</Data> | ||
<DataLocation>^ikra.DictioD092.MarksReviewD</DataLocation> | ||
<DefaultData>MarksReviewDefaultData</DefaultData> | ||
<IdLocation>^ikra.DictioD092.MarksReviewD</IdLocation> | ||
<IndexLocation>^ikra.DictioD092.MarksReviewI</IndexLocation> | ||
<StreamLocation>^ikra.DictioD092.MarksReviewS</StreamLocation> | ||
<Type>%Library.CacheStorage</Type> | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Class ikra.Dictionary.MarksUnit Extends %Persistent | ||
{ | ||
|
||
Property DomainID As %Integer; | ||
|
||
Property UID As %Integer; | ||
|
||
Property UName As %String; | ||
|
||
Property CtgID As %Integer; | ||
|
||
Property Mark As %Numeric; | ||
|
||
Index fkMU On (DomainID, UID, CtgID) [ PrimaryKey, Unique ]; | ||
|
||
Storage Default | ||
{ | ||
<Data name="MarksUnitDefaultData"> | ||
<Value name="1"> | ||
<Value>%%CLASSNAME</Value> | ||
</Value> | ||
<Value name="2"> | ||
<Value>DomainID</Value> | ||
</Value> | ||
<Value name="3"> | ||
<Value>UID</Value> | ||
</Value> | ||
<Value name="4"> | ||
<Value>UName</Value> | ||
</Value> | ||
<Value name="5"> | ||
<Value>CtgID</Value> | ||
</Value> | ||
<Value name="6"> | ||
<Value>Mark</Value> | ||
</Value> | ||
</Data> | ||
<DataLocation>^ikra.Dictionary.MarksUnitD</DataLocation> | ||
<DefaultData>MarksUnitDefaultData</DefaultData> | ||
<IdLocation>^ikra.Dictionary.MarksUnitD</IdLocation> | ||
<IndexLocation>^ikra.Dictionary.MarksUnitI</IndexLocation> | ||
<StreamLocation>^ikra.Dictionary.MarksUnitS</StreamLocation> | ||
<Type>%Library.CacheStorage</Type> | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.