Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
daia-model
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
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
SUBHH
Public
daia-model
Commits
d8054091
Commit
d8054091
authored
1 year ago
by
Maus, David
Browse files
Options
Downloads
Patches
Plain Diff
Add helper class with service URIs as constants
parent
49b3d5e1
Branches
dev
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/php/JsonSerializer.php
+5
-5
5 additions, 5 deletions
src/main/php/JsonSerializer.php
src/main/php/Service.php
+38
-0
38 additions, 0 deletions
src/main/php/Service.php
with
43 additions
and
5 deletions
src/main/php/JsonSerializer.php
+
5
−
5
View file @
d8054091
...
...
@@ -191,19 +191,19 @@ class JsonSerializer implements Visitor
$data
=
array
();
$serviceId
=
$availability
->
getService
();
switch
((
string
)
$serviceId
)
{
case
'http://purl.org/ontology/dso#Presentation'
:
case
Service
::
PRESENTATION
:
$data
[
'service'
]
=
'presentation'
;
break
;
case
'http://purl.org/ontology/dso#Loan'
:
case
Service
::
LOAN
:
$data
[
'service'
]
=
'loan'
;
break
;
case
'http://purl.org/ontology/dso#Interloan'
:
case
Service
::
INTERLOAN
:
$data
[
'service'
]
=
'interloan'
;
break
;
case
'http://purl.org/ontology/dso#Remote'
:
case
Service
::
REMOTE
:
$data
[
'service'
]
=
'remote'
;
break
;
case
'http://purl.org/ontology/dso#Openaccess'
:
case
Service
::
OPENACCESS
:
$data
[
'service'
]
=
'openaccess'
;
break
;
default
:
...
...
This diff is collapsed.
Click to expand it.
src/main/php/Service.php
0 → 100644
+
38
−
0
View file @
d8054091
<?php
/*
* This file is part of DAIA Model.
*
* DAIA Model is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* DAIA Model is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with DAIA Model. If not, see <https://www.gnu.org/licenses/>.
*
* @author David Maus <david.maus@sub.uni-hamburg.de>
* @copyright (c) 2023 by Staats- und Universitätsbibliothek Hamburg
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3 or higher
*/
declare
(
strict_types
=
1
);
namespace
SUBHH\DAIA\Model
;
final
class
Service
{
const
PRESENTATION
=
"http://purl.org/ontology/dso#Presentation"
;
const
OPENACCESS
=
"http://purl.org/ontology/dso#Openaccess"
;
const
INTERLOAN
=
"http://purl.org/ontology/dso#Interloan"
;
const
REMOTE
=
"http://purl.org/ontology/dso#Remote"
;
const
LOAN
=
"http://purl.org/ontology/dso#Loan"
;
private
function
__construct
()
{}
}
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