Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xml_plugin4rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
xml_plugin4rosetta
Commits
70e3e6af
Commit
70e3e6af
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- extracted find_by_ns()
- extracted find_by_systemid()
parent
cd8dc2e2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/org/slub/rosetta/dps/repository/plugin/ValidationResourceResolver.java
+16
-5
16 additions, 5 deletions
...tta/dps/repository/plugin/ValidationResourceResolver.java
with
16 additions
and
5 deletions
java/org/slub/rosetta/dps/repository/plugin/ValidationResourceResolver.java
+
16
−
5
View file @
70e3e6af
...
@@ -19,6 +19,21 @@ public class ValidationResourceResolver implements LSResourceResolver {
...
@@ -19,6 +19,21 @@ public class ValidationResourceResolver implements LSResourceResolver {
this
.
debug
=
debug
;
this
.
debug
=
debug
;
}
}
public
Optional
<
ValidationSchema
>
find_by_ns
(
String
nameSpaceUri
)
{
return
namespaceSchemaMap
.
stream
()
.
filter
(
entry
->
(
entry
.
nameSpace
.
equals
(
nameSpaceUri
))
)
.
findAny
();
}
public
Optional
<
ValidationSchema
>
find_by_systemid
(
String
SystemId
)
{
return
namespaceSchemaMap
.
stream
()
.
filter
(
entry
->
(
entry
.
schemaURI
.
equals
(
SystemId
))
)
.
findAny
();
}
@Override
@Override
public
LSInput
resolveResource
(
String
type
,
String
nameSpaceUri
,
String
publicId
,
String
systemId
,
String
baseURI
)
{
public
LSInput
resolveResource
(
String
type
,
String
nameSpaceUri
,
String
publicId
,
String
systemId
,
String
baseURI
)
{
if
(
debug
)
{
if
(
debug
)
{
...
@@ -37,11 +52,7 @@ public class ValidationResourceResolver implements LSResourceResolver {
...
@@ -37,11 +52,7 @@ public class ValidationResourceResolver implements LSResourceResolver {
}
}
LSInput
result
;
LSInput
result
;
/* TODO: check if uri in namespaceSchemaMap */
/* TODO: check if uri in namespaceSchemaMap */
Optional
<
ValidationSchema
>
validationSchemaOptional
=
namespaceSchemaMap
.
stream
()
Optional
<
ValidationSchema
>
validationSchemaOptional
=
find_by_ns
(
nameSpaceUri
);
.
filter
(
entry
->
(
entry
.
nameSpace
.
equals
(
nameSpaceUri
))
)
.
findAny
();
if
(
validationSchemaOptional
.
isEmpty
())
{
// not found
if
(
validationSchemaOptional
.
isEmpty
())
{
// not found
if
(
debug
)
{
if
(
debug
)
{
System
.
out
.
println
(
"--> No entry in schemacatalog found for "
+
nameSpaceUri
+
"!"
);
System
.
out
.
println
(
"--> No entry in schemacatalog found for "
+
nameSpaceUri
+
"!"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment