Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Adam Kučera
semanticBMS
Commits
610220b2
Commit
610220b2
authored
Jun 27, 2016
by
akucera
Browse files
added PublishedByDevice
parent
dd2fdc98
Changes
1
Hide whitespace changes
Inline
Side-by-side
SemanticBMSServer/src/main/java/cz/muni/fi/lasaris/sbms/model/ModelUpdater.java
View file @
610220b2
...
...
@@ -58,7 +58,19 @@ public class ModelUpdater {
if
(!
dp
.
hasProperty
(
p
))
{
dp
.
addProperty
(
p
,
obs
);
}
// ?dataPoint sbms:publishedByDevice ?publisher
if
(
d
.
getPublisher
()
!=
null
&&
d
.
getPublisher
().
getBimId
()
!=
null
)
{
if
(!
checkBIMId
(
d
.
getPublisher
().
getBimId
()))
{
return
failInsert
(
"Publisher: unknown BIM id"
);
}
p
=
m
.
createProperty
(
NS
.
sbms
+
"publishedByDevice"
);
if
(!
dp
.
hasProperty
(
p
))
{
dp
.
addProperty
(
p
,
NS
.
sbmsd
+
d
.
getPublisher
().
getResourceId
());
}
}
if
(
d
.
getProperty
()
!=
null
&&
d
.
getProperty
().
getDomain
()
!=
null
&&
d
.
getProperty
().
getQuality
()
!=
null
&&
d
.
getScope
()
!=
null
&&
d
.
getScope
().
getBimId
()
!=
null
)
{
...
...
@@ -91,7 +103,7 @@ public class ModelUpdater {
m
.
createResource
(
NS
.
sbms
+
d
.
getProperty
().
getDomain
()));
// ?property sbms:isPropertyOf ?scope.
op
.
addProperty
(
m
.
createProperty
(
NS
.
sbms
+
"isPropertyOf"
),
m
.
createResource
(
NS
.
sbmsd
+
d
.
getScope
().
get
Bim
Id
()));
m
.
createResource
(
NS
.
sbmsd
+
d
.
getScope
().
get
Resource
Id
()));
}
if
(
d
.
getSource
()
!=
null
&&
d
.
getSource
().
getBimId
()
!=
null
)
{
...
...
@@ -100,7 +112,7 @@ public class ModelUpdater {
}
// ?observation sbms:observedBy ?source.
obs
.
addProperty
(
m
.
createProperty
(
NS
.
sbms
+
"observedBy"
),
m
.
createResource
(
NS
.
sbmsd
+
d
.
getSource
().
get
Bim
Id
()));
m
.
createResource
(
NS
.
sbmsd
+
d
.
getSource
().
get
Resource
Id
()));
}
if
(
d
.
getScope
()
!=
null
&&
d
.
getScope
().
getBimId
()
!=
null
)
{
if
(!
checkBIMId
(
d
.
getScope
().
getBimId
()))
{
...
...
@@ -108,7 +120,7 @@ public class ModelUpdater {
}
// ?observation sbms:featureOfInterest ?scope.
obs
.
addProperty
(
m
.
createProperty
(
NS
.
sbms
+
"featureOfInterest"
),
m
.
createResource
(
NS
.
sbmsd
+
d
.
getScope
().
get
Bim
Id
()));
m
.
createResource
(
NS
.
sbmsd
+
d
.
getScope
().
get
Resource
Id
()));
}
if
(
d
.
getSensing
()
!=
null
&&
d
.
getSensing
().
getType
()
!=
null
)
{
...
...
@@ -321,6 +333,8 @@ public class ModelUpdater {
// ?dataPoint sbms:hasBMSId ?bmsId.
Property
p
=
null
;
dp
.
removeAll
(
m
.
createProperty
(
NS
.
sbms
+
"hasBMSId"
));
dp
.
removeAll
(
m
.
createProperty
(
NS
.
sbms
+
"publishedByDevice"
));
// ?dataPoint sbms:expressesObservation ?observation.
dp
.
removeAll
(
m
.
createProperty
(
NS
.
sbms
+
"expressesObservation"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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