Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metadata
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
libraries
Metadata
Commits
f360f157
Commit
f360f157
authored
2 years ago
by
Hanna Führ
Committed by
Petar Hristov
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Encoding the path
parent
563c1787
No related branches found
No related tags found
1 merge request
!66
Fix: Encoding the path
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Metadata.Tests/MetadataTests.cs
+0
-3
0 additions, 3 deletions
src/Metadata.Tests/MetadataTests.cs
src/Metadata/MetadataRdfStoreConnector.cs
+3
-2
3 additions, 2 deletions
src/Metadata/MetadataRdfStoreConnector.cs
with
3 additions
and
5 deletions
src/Metadata.Tests/MetadataTests.cs
+
0
−
3
View file @
f360f157
using
Coscine.Configuration
;
using
Coscine.Configuration
;
using
Coscine.Metadata.Util
;
using
Coscine.Metadata.Util
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
Microsoft.EntityFrameworkCore.Metadata.Internal
;
using
NUnit.Framework
;
using
NUnit.Framework
;
using
NUnit.Framework.Internal
;
using
NUnit.Framework.Internal
;
using
System
;
using
System
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
VDS.RDF
;
using
VDS.RDF
;
using
VDS.RDF.Parsing
;
using
VDS.RDF.Parsing
;
...
...
This diff is collapsed.
Click to expand it.
src/Metadata/MetadataRdfStoreConnector.cs
+
3
−
2
View file @
f360f157
...
@@ -7,6 +7,7 @@ using VDS.RDF.Parsing;
...
@@ -7,6 +7,7 @@ using VDS.RDF.Parsing;
using
VDS.RDF.Query
;
using
VDS.RDF.Query
;
using
VDS.RDF
;
using
VDS.RDF
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Web
;
namespace
Coscine.Metadata
namespace
Coscine.Metadata
{
{
...
@@ -48,7 +49,7 @@ namespace Coscine.Metadata
...
@@ -48,7 +49,7 @@ namespace Coscine.Metadata
public
List
<
string
>
GetDataIds
(
string
?
resourceId
=
null
,
string
?
path
=
null
,
bool
extracted
=
false
,
bool
includeInvalidated
=
false
)
public
List
<
string
>
GetDataIds
(
string
?
resourceId
=
null
,
string
?
path
=
null
,
bool
extracted
=
false
,
bool
includeInvalidated
=
false
)
{
{
var
resourceGraphUri
=
$"https://purl.org/coscine/resources/
{
resourceId
}
"
;
var
resourceGraphUri
=
$"https://purl.org/coscine/resources/
{
resourceId
}
"
;
var
pathGraphUri
=
path
!=
null
?
$"
{
resourceGraphUri
}
/
{(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
:
""
;
var
pathGraphUri
=
path
!=
null
?
$"
{
resourceGraphUri
}
/
{
HttpUtility
.
UrlPathEncode
(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
:
""
;
var
query
=
$@"
{{
var
query
=
$@"
{{
" + ((resourceId != null) ? $"
@resource
<{
Uris
.
DcatCatalog
}>*
?
g
.
" : "") + $@"
" + ((resourceId != null) ? $"
@resource
<{
Uris
.
DcatCatalog
}>*
?
g
.
" : "") + $@"
...
@@ -129,7 +130,7 @@ namespace Coscine.Metadata
...
@@ -129,7 +130,7 @@ namespace Coscine.Metadata
public
List
<
string
>
GetMetadataIds
(
string
?
resourceId
=
null
,
string
?
path
=
null
,
bool
extracted
=
false
)
public
List
<
string
>
GetMetadataIds
(
string
?
resourceId
=
null
,
string
?
path
=
null
,
bool
extracted
=
false
)
{
{
var
resourceGraphUri
=
$"https://purl.org/coscine/resources/
{
resourceId
}
"
;
var
resourceGraphUri
=
$"https://purl.org/coscine/resources/
{
resourceId
}
"
;
var
pathGraphUri
=
path
!=
null
?
$"
{
resourceGraphUri
}
/
{(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
:
""
;
var
pathGraphUri
=
path
!=
null
?
$"
{
resourceGraphUri
}
/
{
HttpUtility
.
UrlPathEncode
(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
:
""
;
var
query
=
$@"
{{
var
query
=
$@"
{{
" + ((resourceId != null) ? $"
@resource
<{
Uris
.
DcatCatalog
}>*
?
g
.
" : "") + $@"
" + ((resourceId != null) ? $"
@resource
<{
Uris
.
DcatCatalog
}>*
?
g
.
" : "") + $@"
...
...
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