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
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
Merge requests
!77
Fix: Correct encoding
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix: Correct encoding
dev
into
master
Overview
0
Commits
2
Pipelines
1
Changes
1
Merged
Sirieam Marie Hunke
requested to merge
dev
into
master
1 year ago
Overview
0
Commits
2
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
a1dc9b53
2 commits,
1 year ago
1 file
+
6
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Metadata/MetadataRdfStoreConnector.cs
+
6
−
3
Options
@@ -7,7 +7,6 @@ using VDS.RDF.Parsing;
using
VDS.RDF.Query
;
using
VDS.RDF
;
using
System.Threading.Tasks
;
using
System.Web
;
namespace
Coscine.Metadata
{
@@ -49,7 +48,9 @@ namespace Coscine.Metadata
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
pathGraphUri
=
path
!=
null
?
$"
{
resourceGraphUri
}
/
{
HttpUtility
.
UrlPathEncode
(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
:
""
;
var
pathGraphUri
=
path
!=
null
?
new
Uri
(
$"
{
resourceGraphUri
}
/
{(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
).
AbsoluteUri
:
""
;
var
query
=
$@"
{{
" + ((resourceId != null) ? $"
@resource
<{
Uris
.
DcatCatalog
}>*
?
g
.
" : "") + $@"
@@ -130,7 +131,9 @@ namespace Coscine.Metadata
public
List
<
string
>
GetMetadataIds
(
string
?
resourceId
=
null
,
string
?
path
=
null
,
bool
extracted
=
false
)
{
var
resourceGraphUri
=
$"https://purl.org/coscine/resources/
{
resourceId
}
"
;
var
pathGraphUri
=
path
!=
null
?
$"
{
resourceGraphUri
}
/
{
HttpUtility
.
UrlPathEncode
(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
:
""
;
var
pathGraphUri
=
path
!=
null
?
new
Uri
(
$"
{
resourceGraphUri
}
/
{(
path
.
StartsWith
(
"/"
)
?
path
[
1
..]
:
path
)}
/"
).
AbsoluteUri
:
""
;
var
query
=
$@"
{{
" + ((resourceId != null) ? $"
@resource
<{
Uris
.
DcatCatalog
}>*
?
g
.
" : "") + $@"
Loading