Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Data Flow
Data Enrichment
wks
Commits
63501491
Commit
63501491
authored
Feb 06, 2021
by
harshit aggarwal
Browse files
Merge branch 'master' into haaggarw/UsingQueryApi
parents
cc365d61
85c15576
Changes
30
Hide whitespace changes
Inline
Side-by-side
wks-core/src/main/java/org/opengroup/osdu/wks/util/WksIdGenerator.java
View file @
63501491
...
...
@@ -26,7 +26,7 @@ public class WksIdGenerator {
targetSchemaKindInMapping
=
targetSchemaKindInMapping
.
replace
(
Constants
.
COLON_SEPARATOR
,
Constants
.
POINT
);
String
[]
kindStrArr
=
targetSchemaKind
.
split
(
Constants
.
COLON_SEPARATOR
);
return
idStrArr
[
0
]
+
Constants
.
COLON_SEPARATOR
+
Constants
.
WKS_KIND
+
Constants
.
COLON_SEPARATOR
+
kindStrArr
[
2
]
return
idStrArr
[
0
]
+
Constants
.
COLON_SEPARATOR
+
kindStrArr
[
2
]
+
Constants
.
COLON_SEPARATOR
+
Constants
.
WKS_KIND
+
Constants
.
DASH
+
uniqueId
+
Constants
.
POINT
+
targetSchemaKindInMapping
;
}
}
\ No newline at end of file
wks-core/src/test/java/org/opengroup/osdu/wks/util/RelationshipBlockHandlerTest.java
View file @
63501491
...
...
@@ -230,7 +230,7 @@ class RelationshipBlockHandlerTest {
UpdatedRelationshipBlock
response
=
relationshipBlockHandler
.
updateRelationshipBlockWithWksIds
(
rawRelationshipsBlockTree
,
TARGET_SCHEMA_KIND
);
String
expectedWksRecordId
=
"part1:
wks:
wellbore-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.3"
;
String
expectedWksRecordId
=
"part1:wellbore
:wks
-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.3"
;
String
actualWksRecordId
=
response
.
getRelationshipTree
().
get
(
"wellbore"
).
get
(
"id"
).
toString
().
replace
(
"\""
,
""
);
assertNotNull
(
response
);
...
...
@@ -260,7 +260,7 @@ class RelationshipBlockHandlerTest {
UpdatedRelationshipBlock
response
=
relationshipBlockHandler
.
updateRelationshipBlockWithWksIds
(
rawRelationshipsBlockTree
,
TARGET_SCHEMA_KIND
);
String
expectedWksRecordId
=
"part1:
wks:
wellbore-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.7"
;
String
expectedWksRecordId
=
"part1:wellbore
:wks
-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.7"
;
String
actualWksRecordId
=
response
.
getRelationshipTree
().
get
(
"wellbore"
).
get
(
"id"
).
toString
().
replace
(
"\""
,
""
);
assertNotNull
(
response
);
...
...
wks-core/src/test/resources/unit_test_resources/search_results_multiple_wks_generated_within_different_universe.json
View file @
63501491
{
"results"
:
[
{
"id"
:
"part1:
wks:
wellbore-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.differentUniverse.wks.wellbore.5"
,
"id"
:
"part1:wellbore
:wks
-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.differentUniverse.wks.wellbore.5"
,
"kind"
:
"part1:wks:wellbore:1.0.0"
,
"version"
:
123456789
},
{
"id"
:
"part1:
wks:
wellbore-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.7"
,
"id"
:
"part1:wellbore
:wks
-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.7"
,
"kind"
:
"part1:wks:wellbore:3.0.0"
,
"version"
:
123456789
}
...
...
wks-core/src/test/resources/unit_test_resources/search_results_multiple_wks_generated_within_same_universe.json
View file @
63501491
{
"results"
:
[
{
"id"
:
"part1:
wks:
wellbore-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.1"
,
"id"
:
"part1:wellbore
:wks
-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.1"
,
"kind"
:
"part1:wks:wellbore:1.0.0"
,
"version"
:
123456789
},
{
"id"
:
"part1:
wks:
wellbore-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.3"
,
"id"
:
"part1:wellbore
:wks
-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.3"
,
"kind"
:
"part1:wks:wellbore:3.0.0"
,
"version"
:
123456789
}
...
...
wks-core/src/test/resources/unit_test_resources/search_results_wks_generated_record.json
View file @
63501491
{
"results"
:
[
{
"id"
:
"part1:
wks:
wellbore-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.1"
,
"id"
:
"part1:wellbore
:wks
-5512187e645eda7f7b3b02ebbd0a5cbbe68770fb.part1.wks.wellbore.1"
,
"kind"
:
"part1:wks:wellbore:1.0.0"
,
"version"
:
123456789
}
...
...
wks-core/src/test/resources/unit_test_resources/search_results_wks_not_found.json
View file @
63501491
{
"results"
:
[
{
"id"
:
"part1:
wks:
wellbore:notCreatedByWKS"
,
"id"
:
"part1:wellbore:
wks:
notCreatedByWKS"
,
"kind"
:
"part1:wks:wellbore:1.0.0"
,
"version"
:
123456789
}
...
...
wks-core/src/test/resources/unit_test_resources/transformed_record.json
View file @
63501491
...
...
@@ -51,7 +51,7 @@
"persistableReference"
:
"{
\"
lateBoundCRS
\"
:{
\"
wkt
\"
:
\"
GEOGCS[
\\\"
GCS_European_1950
\\\"
,DATUM[
\\\"
D_European_1950
\\\"
,SPHEROID[
\\\"
International_1924
\\\"
,6378388.0,297.0]],PRIMEM[
\\\"
Greenwich
\\\"
,0.0],UNIT[
\\\"
Degree
\\\"
,0.0174532925199433],AUTHORITY[
\\\"
EPSG
\\\"
,4230]]
\"
,
\"
ver
\"
:
\"
PE_10_3_1
\"
,
\"
name
\"
:
\"
GCS_European_1950
\"
,
\"
authCode
\"
:{
\"
auth
\"
:
\"
EPSG
\"
,
\"
code
\"
:
\"
4230
\"
},
\"
type
\"
:
\"
LBC
\"
},
\"
singleCT
\"
:{
\"
wkt
\"
:
\"
GEOGTRAN[
\\\"
ED_1950_To_WGS_1984_23
\\\"
,GEOGCS[
\\\"
GCS_European_1950
\\\"
,DATUM[
\\\"
D_European_1950
\\\"
,SPHEROID[
\\\"
International_1924
\\\"
,6378388.0,297.0]],PRIMEM[
\\\"
Greenwich
\\\"
,0.0],UNIT[
\\\"
Degree
\\\"
,0.0174532925199433]],GEOGCS[
\\\"
GCS_WGS_1984
\\\"
,DATUM[
\\\"
D_WGS_1984
\\\"
,SPHEROID[
\\\"
WGS_1984
\\\"
,6378137.0,298.257223563]],PRIMEM[
\\\"
Greenwich
\\\"
,0.0],UNIT[
\\\"
Degree
\\\"
,0.0174532925199433]],METHOD[
\\\"
Position_Vector
\\\"
],PARAMETER[
\\\"
X_Axis_Translation
\\\"
,-116.641],PARAMETER[
\\\"
Y_Axis_Translation
\\\"
,-56.931],PARAMETER[
\\\"
Z_Axis_Translation
\\\"
,-110.559],PARAMETER[
\\\"
X_Axis_Rotation
\\\"
,0.893],PARAMETER[
\\\"
Y_Axis_Rotation
\\\"
,0.921],PARAMETER[
\\\"
Z_Axis_Rotation
\\\"
,-0.917],PARAMETER[
\\\"
Scale_Difference
\\\"
,-3.52],AUTHORITY[
\\\"
EPSG
\\\"
,1612]]
\"
,
\"
ver
\"
:
\"
PE_10_3_1
\"
,
\"
name
\"
:
\"
ED_1950_To_WGS_1984_23
\"
,
\"
authCode
\"
:{
\"
auth
\"
:
\"
EPSG
\"
,
\"
code
\"
:
\"
1612
\"
},
\"
type
\"
:
\"
ST
\"
},
\"
ver
\"
:
\"
PE_10_3_1
\"
,
\"
name
\"
:
\"
ED50 * EPSG-Nor N62 2001 [4230,1612]
\"
,
\"
authCode
\"
:{
\"
auth
\"
:
\"\"
,
\"
code
\"
:
\"
4230023
\"
},
\"
type
\"
:
\"
EBC
\"
}"
,
"propertyNames"
:
[
"wksAttribute2.y"
]
}
],
"id"
:
"part1:
wks:
entity-3b9edab584ccc863c1dec7f1f5cf89c70d312020.part1.wks.entity.1"
,
"id"
:
"part1:entity
:wks
-3b9edab584ccc863c1dec7f1f5cf89c70d312020.part1.wks.entity.1"
,
"ancestry"
:
{
"parents"
:
[
"part1:source:entity-uniqueId:39429347234"
]
},
...
...
wks-core/src/test/resources/unit_test_resources/transformed_record_without_meta.json
View file @
63501491
...
...
@@ -35,7 +35,7 @@
},
"Wks Attribute 18 (CDE)"
:
2246.5
},
"id"
:
"part1:
wks:
entity-3b9edab584ccc863c1dec7f1f5cf89c70d312020.part1.wks.entity.1"
,
"id"
:
"part1:entity
:wks
-3b9edab584ccc863c1dec7f1f5cf89c70d312020.part1.wks.entity.1"
,
"ancestry"
:
{
"parents"
:
[
"part1:source:entity-uniqueId:39429347234"
]
},
...
...
wks-core/src/test/resources/unit_test_resources/transformed_tree_with_relationship.json
View file @
63501491
{
"id"
:
"part1:
wks:
entity-066f2079ed2f81f02a550b91140d4d7d68b1adf0.part1.wks.entity.1"
,
"id"
:
"part1:entity
:wks
-066f2079ed2f81f02a550b91140d4d7d68b1adf0.part1.wks.entity.1"
,
"ancestry"
:
{
"parents"
:
[
"part1:source:wellbore-dGVzdFdlbGxfYXV0b19hdHRlbXB0Ng:1568075751408965"
]
},
...
...
wks-core/src/test/resources/unit_test_resources/wks_record.json
View file @
63501491
...
...
@@ -2,7 +2,7 @@
"data"
:
{
"field1"
:
"abc"
},
"id"
:
"part1:
wks:
wellbore-cGFydDE6c291cmNlOmVudGl0eS0xMjM"
,
"id"
:
"part1:wellbore
:wks
-cGFydDE6c291cmNlOmVudGl0eS0xMjM"
,
"version"
:
1568075751408965
,
"kind"
:
"part1:wks:wellbore:1.0.0"
,
"acl"
:
{
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment