Class Download
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.Download
- All Implemented Interfaces:
NewerNewStyleService
,STService
- Author:
- Andrea Turbati
-
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, exptManager, stServiceContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createAlignmentDownload
(String targetUriPrefix, List<org.eclipse.rdf4j.model.IRI> mappingProperties, String fileName, org.eclipse.rdf4j.model.Literal localizedLabel, org.eclipse.rdf4j.rio.RDFFormat format, boolean zipFile, boolean overwrite) void
createDownload
(String fileName, org.eclipse.rdf4j.model.Literal localizedLabel, org.eclipse.rdf4j.rio.RDFFormat format, boolean zipFile, boolean overwrite) List<org.eclipse.rdf4j.rio.RDFFormat>
void
Downloads a filevoid
removeDownload
(String fileName) void
updateLocalized
(String fileName, String localized, String lang) void
updateLocalizedMap
(String fileName, Map<String, String> localizedMap) void
updateLocalizedMapInternal
(String fileName, Map<String, String> localizedMap) Methods inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
addValue, checkNotLocallyDefined, createQueryBuilder, generateIRI, generateNatureSPARQLSelectPart, generateNatureSPARQLWherePart, generateResourceWithCustomConstructor, getCodaLexModeForSearchFromLexicalizationModel, getDeleteGraph, getGraphFromNature, getInitializedCodaCore, getManagedConnection, getMetadataGraph, getPlatformTransactionManager, getProject, getRepository, getRoleFromNature, getUserNamedGraphs, getWorkingGraph, instantiateSearchStrategy, instantiateSearchStrategy, parseReference, publishResourceDeleted, publishResourceDeleted, removeReifiedValue, retrieveResources, shutDownCodaCore, updateTriplePredicate
-
Constructor Details
-
Download
public Download()
-
-
Method Details
-
createDownload
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, downloads)\', \'C\')") @Read public void createDownload(String fileName, org.eclipse.rdf4j.model.Literal localizedLabel, org.eclipse.rdf4j.rio.RDFFormat format, @Optional(defaultValue="true") boolean zipFile, @Optional(defaultValue="false") boolean overwrite) throws IOException, NoSuchSettingsManager - Throws:
IOException
NoSuchSettingsManager
-
createAlignmentDownload
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, downloads)\', \'C\')") @Read public void createAlignmentDownload(@Optional String targetUriPrefix, @Optional(defaultValue="") List<org.eclipse.rdf4j.model.IRI> mappingProperties, String fileName, org.eclipse.rdf4j.model.Literal localizedLabel, @Optional(defaultValue="TURTLE") org.eclipse.rdf4j.rio.RDFFormat format, @Optional(defaultValue="true") boolean zipFile, @Optional(defaultValue="false") boolean overwrite) throws IOException, NoSuchSettingsManager - Throws:
IOException
NoSuchSettingsManager
-
getAvailableFormats
-
removeDownload
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, downloads)\', \'D\')") public void removeDownload(String fileName) throws IOException, NoSuchSettingsManager - Throws:
IOException
NoSuchSettingsManager
-
getDownloadInfoList
@STServiceOperation public DownloadProjectSettings getDownloadInfoList() throws NoSuchSettingsManager- Throws:
NoSuchSettingsManager
-
getFile
@STServiceOperation public void getFile(jakarta.servlet.http.HttpServletResponse oRes, String fileName) throws IOException Downloads a file- Parameters:
oRes
- the response object to which the file will be written tofileName
- the name of the file to download from this project- Throws:
IOException
-
updateLocalized
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, downloads)\', \'U\')") public void updateLocalized(String fileName, String localized, String lang) throws NoSuchSettingsManager - Throws:
NoSuchSettingsManager
-
updateLocalizedMap
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(project, downloads)\', \'U\')") public void updateLocalizedMap(String fileName, Map<String, String> localizedMap) throws NoSuchSettingsManager- Throws:
NoSuchSettingsManager
-
updateLocalizedMapInternal
public void updateLocalizedMapInternal(String fileName, Map<String, String> localizedMap) throws NoSuchSettingsManager- Throws:
NoSuchSettingsManager
-