Skip to content

Commit a484aeb

Browse files
committed
no autonum
1 parent f033cbb commit a484aeb

File tree

5 files changed

+31
-52
lines changed

5 files changed

+31
-52
lines changed

module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
Trench
9898
<!--@SOURCE: vocabs/area-code.xml-->
9999
</AreaCode>
100-
<Context_Context_ID f="notnull autonum">
100+
<Context_Context_ID f="notnull">
101101
Context Code
102102
<desc>Every archaeological context (negative element (cut), deposit, structure, skeleton, artefact cluster) is given a unique 3 or 4 letter context code. Each trench is designated with a separate letter which starts the code, so it is immediately obvious to which trench a context belongs. For example context HAA belongs to Trench H, context MQP to Trench M etc.
103103
The contexts are labelled consecutively in alphabetical order using the letters following the trench letter. For Trench H the first context would be HAA, the second HAB, the third HAB and so on. In addition sets of letters can denote parts of trenches, buildings etc. E.g. HFs might denote contexts from a specific building.

module/data.tar.gz

3.9 KB
Binary file not shown.

module/ui_logic.bsh

+27-34
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ REF_TO_TYPE.put("Control/Contexts/Create_New_Context_Group", "button");
158158
REF_TO_TYPE.put("Control/Contexts/Create_New_Diary", "button");
159159
REF_TO_TYPE.put("Control/Contexts/Create_New_Legacy", "button");
160160
REF_TO_TYPE.put("Control/Contexts/Team_Members", "input");
161-
REF_TO_TYPE.put("Control/Contexts/Next_Context_Context_ID", "input");
162161
REF_TO_TYPE.put("Control/Contexts/Next_Context_Group_ID", "input");
163162
REF_TO_TYPE.put("Control/Contexts/Next_Sample_ID", "input");
164163
REF_TO_TYPE.put("Control/Contexts/GPS_Diagnostics", "gpsdiag");
@@ -757,7 +756,6 @@ HashSet getTabsAsHashSet() {
757756

758757
List getStartingIdRefs() {
759758
List l = new ArrayList();
760-
l.add("Control/Contexts/Next_Context_Context_ID");
761759
l.add("Control/Contexts/Next_Context_Group_ID");
762760
l.add("Control/Contexts/Next_Sample_ID");
763761
return l;
@@ -1479,44 +1477,44 @@ void timedPopulateCursorList(String ref, String q, int limit) {
14791477

14801478
void setUpTypeHierarchy() {
14811479
//-
1482-
// - Diary
1483-
// - Context Group
1484-
// - Photograph Log
1485-
// - Matrix
1486-
// - Legacy
14871480
// - Context
14881481
// - Height
14891482
// - Matrix
14901483
// - Special Find
14911484
// - Sample
14921485
// - Photograph Log
1486+
// - Diary
1487+
// - Matrix
1488+
// - Legacy
1489+
// - Context Group
1490+
// - Photograph Log
14931491

14941492
n0 = Tree("", 1);
1495-
n1 = Tree("Diary", 1);
1496-
n2 = Tree("Context Group", 1);
1497-
n3 = Tree("Photograph Log", 1);
1498-
n4 = Tree("Matrix", 1);
1499-
n5 = Tree("Legacy", 1);
1500-
n6 = Tree("Context", 1);
1501-
n7 = Tree("Height", 1);
1493+
n1 = Tree("Context", 1);
1494+
n2 = Tree("Height", 1);
1495+
n3 = Tree("Matrix", 1);
1496+
n4 = Tree("Special Find", 1);
1497+
n5 = Tree("Sample", 1);
1498+
n6 = Tree("Photograph Log", 1);
1499+
n7 = Tree("Diary", 1);
15021500
n8 = Tree("Matrix", 1);
1503-
n9 = Tree("Special Find", 1);
1504-
n10 = Tree("Sample", 1);
1501+
n9 = Tree("Legacy", 1);
1502+
n10 = Tree("Context Group", 1);
15051503
n11 = Tree("Photograph Log", 1);
15061504

15071505
n0.addChild(n1);
1508-
n0.addChild(n2);
1509-
n0.addChild(n4);
1510-
n0.addChild(n5);
1511-
n0.addChild(n6);
1506+
n0.addChild(n7);
1507+
n0.addChild(n8);
1508+
n0.addChild(n9);
1509+
n0.addChild(n10);
15121510

1513-
n2.addChild(n3);
1511+
n1.addChild(n2);
1512+
n1.addChild(n3);
1513+
n1.addChild(n4);
1514+
n1.addChild(n5);
1515+
n1.addChild(n6);
15141516

1515-
n6.addChild(n7);
1516-
n6.addChild(n8);
1517-
n6.addChild(n9);
1518-
n6.addChild(n10);
1519-
n6.addChild(n11);
1517+
n10.addChild(n11);
15201518

15211519

15221520
PERF_TYPE_TREE = n0;
@@ -2883,7 +2881,6 @@ String validateFields(List fields, String format) {
28832881

28842882
void validateControl() {
28852883
List f = new ArrayList(); // Fields to be validated
2886-
f.add(fieldPair("Control/Contexts/Next_Context_Context_ID", "{Context_Code}"));
28872884
f.add(fieldPair("Control/Contexts/Next_Context_Group_ID", "{Feature_ID}"));
28882885
f.add(fieldPair("Control/Contexts/Next_Sample_ID", "{Next_Sample_ID}"));
28892886

@@ -3583,16 +3580,13 @@ void newContext(String parent){
35833580
parentTabgroup = parent;
35843581
parentTabgroup__ = parent;
35853582
}
3586-
if (isNull("Control/Contexts/Next_Context_Context_ID")) {
3587-
showWarning("{Alert}", "{A_next_ID_has_not_been_entered_please_provide_one}");
3588-
return;
3589-
}
3583+
35903584

35913585
setUuid(tabgroup, null);
35923586
newTabGroup(tabgroup);
35933587
populateAuthorAndTimestamp(tabgroup);
35943588
populateEntityListsInTabGroup(tabgroup);
3595-
incAutoNum("Context/General/Context_Context_ID");
3589+
35963590

35973591
executeOnEvent(tabgroup, "create");
35983592
}
@@ -3787,7 +3781,7 @@ void duplicateContext(){
37873781
String uuidOld = getUuid(tabgroup);
37883782
setUuid(tabgroup, "");
37893783
disableAutoSave(tabgroup);
3790-
incAutoNum("Context/General/Context_Context_ID");
3784+
37913785
clearGpsInTabGroup(tabgroup);
37923786
populateAuthorAndTimestamp(tabgroup);
37933787
populateEntityListsInTabGroup(tabgroup);
@@ -4613,7 +4607,6 @@ for (String ref : getStartingIdRefs())
46134607

46144608
void incAutoNum(String destPath) {
46154609
Map destToSource = new HashMap();
4616-
destToSource.put("Context/General/Context_Context_ID", "Control/Contexts/Next_Context_Context_ID");
46174610
destToSource.put("Context_Group/Gen/Context_Group_ID", "Control/Contexts/Next_Context_Group_ID");
46184611
destToSource.put("Sample/Deposit_Samples/Sample_ID", "Control/Contexts/Next_Sample_ID");
46194612

module/ui_schema.xml

-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
<Create_New_Diary/>
3838
<Create_New_Legacy/>
3939
<Team_Members/>
40-
<Next_Context_Context_ID/>
4140
<Next_Context_Group_ID/>
4241
<Next_Sample_ID/>
4342
<GPS_Diagnostics/>
@@ -675,7 +674,6 @@
675674
</Context_Group_Relationship>
676675
</faims>
677676
</instance>
678-
<bind nodeset="/faims/Control/Contexts/Next_Context_Context_ID" type="decimal"/>
679677
<bind nodeset="/faims/Control/Contexts/Next_Context_Group_ID" type="decimal"/>
680678
<bind nodeset="/faims/Control/Contexts/Next_Sample_ID" type="decimal"/>
681679
<bind nodeset="/faims/Context/General/Colgroup_2/Col_1/Grid_X" type="decimal"/>
@@ -801,9 +799,6 @@
801799
<input ref="Team_Members">
802800
<label>{Team_Members}</label>
803801
</input>
804-
<input ref="Next_Context_Context_ID" faims_style_class="required">
805-
<label>{Context_Code}</label>
806-
</input>
807802
<input ref="Next_Context_Group_ID" faims_style_class="required">
808803
<label>{Feature_ID}</label>
809804
</input>

tests/ModuleUtil.java

+3-12
Original file line numberDiff line numberDiff line change
@@ -1939,15 +1939,6 @@ public static EditText get_ContextGroupRelationship_Relationships_ContextID(Solo
19391939
return (android.widget.EditText) solo.getView((Object) ref);
19401940
}
19411941

1942-
/*
1943-
Type: input
1944-
Ref: Control/Contexts/Next_Context_Context_ID
1945-
*/
1946-
public static EditText get_Control_Contexts_NextContextContextID(Solo solo) {
1947-
String ref = "Control/Contexts/Next_Context_Context_ID";
1948-
return (android.widget.EditText) solo.getView((Object) ref);
1949-
}
1950-
19511942
/*
19521943
Type: input
19531944
Ref: Control/Contexts/Next_Context_Group_ID
@@ -2310,10 +2301,10 @@ public static View get_Context_Relationships_ExistingRelationshipstoThisContext(
23102301

23112302
/*
23122303
Type: list
2313-
Ref: Context/Samples/List_of_Sample
2304+
Ref: Context/Samples/List_of_Samples
23142305
*/
2315-
public static View get_Context_Samples_ListofSample(Solo solo) {
2316-
String ref = "Context/Samples/List_of_Sample";
2306+
public static View get_Context_Samples_ListofSamples(Solo solo) {
2307+
String ref = "Context/Samples/List_of_Samples";
23172308
return (android.view.View) solo.getView((Object) ref);
23182309
}
23192310

0 commit comments

Comments
 (0)