Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFDS-register-front
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dad
FFDS-register-front
Commits
afbaef4e
Commit
afbaef4e
authored
4 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
list dataset description in search page width keyword plein text search + DOI
parent
d69c77a9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/search/search.component.html
+6
-4
6 additions, 4 deletions
src/app/search/search.component.html
src/app/search/search.component.ts
+9
-3
9 additions, 3 deletions
src/app/search/search.component.ts
with
15 additions
and
7 deletions
src/app/search/search.component.html
+
6
−
4
View file @
afbaef4e
<form
class=
"form-inline "
>
<input
class=
"form-control"
type=
"text"
placeholder=
"Search"
aria-label=
"Search"
>
<form
class=
"form-inline
"
[formGroup]=
"Form
"
>
<input
class=
"form-control"
type=
"text"
placeholder=
"Search"
aria-label=
"Search"
formControlName=
"keyword"
>
<button
type=
"submit"
(click)=
"simpleSearch()"
>
Search
</button>
</form>
...
...
@@ -7,13 +7,15 @@
<div
*ngIf=
"!isXmlItemsEmpty()"
class=
"w3-container"
>
<table
class=
"w3-table-all w3-card-4"
>
<thead>
<th
style=
"text-align: center;"
>
Uri (DOI)
</th>
<th
style=
"text-align: center;"
>
Title
</th>
<th
style=
"text-align: center;"
>
Description
</th>
</thead>
<tbody>
<tr
*ngFor=
"let item of xmlItems"
>
<tr
*ngFor=
"let item of xmlItems"
>
<td><a
href=
"{{item.uri.value}}"
target=
"blank"
>
{{item.uri.value}}
</a></td>
<td>
{{item.title.value}}
</td>
<td>
{{item.description.value
}}
</td>
<td>
{{item.description.value
.substr(0,250) }}...
</td>
</tr>
</tbody>
</table>
...
...
This diff is collapsed.
Click to expand it.
src/app/search/search.component.ts
+
9
−
3
View file @
afbaef4e
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
HttpClient
,
HttpHeaders
}
from
'
@angular/common/http
'
;
import
{
ParseXmlService
}
from
'
../services/parse-xml.service
'
;
import
{
FormControl
,
FormGroup
}
from
'
@angular/forms
'
;
@
Component
({
...
...
@@ -16,6 +17,10 @@ export class SearchComponent implements OnInit {
public
xmlItems
:
string
[][]
=
[];
Form
=
new
FormGroup
({
keyword
:
new
FormControl
()
});
constructor
(
private
http
:
HttpClient
,
private
parserService
:
ParseXmlService
...
...
@@ -36,12 +41,13 @@ export class SearchComponent implements OnInit {
query
=
'
query=PREFIX dcat: <http://www.w3.org/ns/dcat#>
\n\
PREFIX dcterms: <http://purl.org/dc/terms/>
\n\
SELECT ?title ?description
\n\
SELECT ?title ?description
?uri
\n\
where {
\n\
?dataset a dcat:Dataset ;
\n\
dcterms:title ?title ;
\n\
dcterms:description ?description
\n\
FILTER (contains( ?description, "Northern") || contains( ?title, "Northern"))
\n\
dcterms:description ?description;
\n\
dcat:keyword ?uri ;
\n\
FILTER (contains( ?description, "
'
+
this
.
Form
.
value
.
keyword
+
'
") || contains( ?title, "
'
+
this
.
Form
.
value
.
keyword
+
'
"))
\n\
.
\n\
}
'
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment