Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
45
Issues
45
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
642febc2
Commit
642febc2
authored
Oct 03, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill the 'metadata' sheet of Datasets
- Template updated
parent
6ba4b18c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
222 additions
and
133 deletions
+222
-133
src/main/java/org/genesys/catalog/service/impl/DatasetServiceImpl.java
.../org/genesys/catalog/service/impl/DatasetServiceImpl.java
+5
-2
src/main/java/org/genesys2/server/service/impl/DownloadServiceImpl.java
...org/genesys2/server/service/impl/DownloadServiceImpl.java
+217
-131
src/main/resources/template/download/CATALOG-DATASET.xlsx
src/main/resources/template/download/CATALOG-DATASET.xlsx
+0
-0
src/main/resources/template/download/genesys_catalog_metadata.xlsx
...resources/template/download/genesys_catalog_metadata.xlsx
+0
-0
No files found.
src/main/java/org/genesys/catalog/service/impl/DatasetServiceImpl.java
View file @
642febc2
...
...
@@ -482,15 +482,18 @@ public class DatasetServiceImpl implements DatasetService {
// generate file with metadata and add it to the dataset
try
(
final
ByteArrayOutputStream
bos
=
new
ByteArrayOutputStream
())
{
downloadService
.
writeXlsxDatasetMetadata
(
loaded
,
bos
);
final
String
fileName
=
"
genesys_catalog_m
etadata.xlsx"
;
final
String
fileName
=
"
M
etadata.xlsx"
;
final
String
contentType
=
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
;
try
{
final
RepositoryFile
datasetFile
=
repositoryService
.
getFile
(
Paths
.
get
(
datasetRepositoryPath
,
loaded
.
getUuid
().
toString
()),
fileName
);
repositoryService
.
updateBytes
(
datasetFile
,
contentType
,
bos
.
toByteArray
());
}
catch
(
final
NoSuchRepositoryFileException
|
InvalidRepositoryPathException
e
)
{
try
{
RepositoryFile
metadata
=
new
RepositoryFile
();
metadata
.
setTitle
(
"Dataset metadata"
);
metadata
.
setDescription
(
"Auto-generated by Genesys"
);
final
RepositoryFile
addedFile
=
repositoryService
.
addFile
(
Paths
.
get
(
datasetRepositoryPath
,
loaded
.
getUuid
().
toString
()).
toAbsolutePath
(),
fileName
,
contentType
,
bos
.
toByteArray
(),
null
);
fileName
,
contentType
,
bos
.
toByteArray
(),
metadata
);
loaded
.
getRepositoryFiles
().
add
(
addedFile
);
loaded
=
lazyLoad
(
datasetRepository
.
save
(
loaded
));
}
catch
(
final
InvalidRepositoryPathException
|
InvalidRepositoryFileDataException
e1
)
{
...
...
src/main/java/org/genesys2/server/service/impl/DownloadServiceImpl.java
View file @
642febc2
This diff is collapsed.
Click to expand it.
src/main/resources/template/download/CATALOG-DATASET.xlsx
0 → 100644
View file @
642febc2
File added
src/main/resources/template/download/genesys_catalog_metadata.xlsx
deleted
100644 → 0
View file @
6ba4b18c
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment