Class DatasetMetadata
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.DatasetMetadata
- All Implemented Interfaces:
NewerNewStyleService
,STService
This class provides services for exporting metadata about the dataset associated with the current project.
- Author:
- Manuel Fiorelli
-
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetadataToDataset
(PluginSpecification exporterSpecification) Add the metadata about the dataset associated with the currently used project to the dataset itself.void
export
(jakarta.servlet.http.HttpServletResponse oRes, PluginSpecification exporterSpecification, org.eclipse.rdf4j.rio.RDFFormat outputFormat) Exports the metadata about the dataset associated with the currently used project.getMetadataVocabularySettings
(String componentID, Scope scope) Gets the settings about metadata vocabularyimportMetadataVocabulariesFromMetadataRegistry
(PluginSpecification exporterSpecification, Scope scope) Imports the settings for a metadata vocabulary from the metadata registry.void
storeMetadataVocabularySettings
(String componentID, Scope scope, com.fasterxml.jackson.databind.node.ObjectNode settings) Stores the settings about metadata vocabularyMethods inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
addValue, checkNotLocallyDefined, createQueryBuilder, generateIRI, generateNatureSPARQLSelectPart, generateNatureSPARQLWherePart, generateResourceWithCustomConstructor, getCodaLexModeForSearchFromLexicalizationModel, getDeleteGraph, getGraphFromNature, getInitializedCodaCore, getManagedConnection, getMetadataGraph, getOptionalProject, getPlatformTransactionManager, getProject, getRepository, getRoleFromNature, getUserNamedGraphs, getWorkingGraph, instantiateSearchStrategy, instantiateSearchStrategy, parseReference, publishResourceDeleted, publishResourceDeleted, removeReifiedValue, retrieveResources, shutDownCodaCore, updateTriplePredicate
-
Constructor Details
-
DatasetMetadata
public DatasetMetadata()
-
-
Method Details
-
export
@STServiceOperation(method=POST) @Read public void export(jakarta.servlet.http.HttpServletResponse oRes, PluginSpecification exporterSpecification, @Optional(defaultValue="TURTLE") org.eclipse.rdf4j.rio.RDFFormat outputFormat) throws ClassNotFoundException, WrongPropertiesException, IOException, STPropertyAccessException, IllegalArgumentException, NoSuchExtensionException, InvalidConfigurationException, DatasetMetadataExporterException Exports the metadata about the dataset associated with the currently used project.- Parameters:
oRes
-exporterSpecification
- a specification of theDatasetMetadataExporter
to be usedoutputFormat
- the output format. If it does not support graphs, the exported graph are merged into a single graph- Throws:
ClassNotFoundException
IOException
DatasetMetadataExporterException
STPropertyAccessException
InvalidConfigurationException
NoSuchExtensionException
IllegalArgumentException
Exception
WrongPropertiesException
-
addMetadataToDataset
@STServiceOperation(method=POST) @Write public void addMetadataToDataset(PluginSpecification exporterSpecification) throws ClassNotFoundException, WrongPropertiesException, IOException, STPropertyAccessException, IllegalArgumentException, NoSuchExtensionException, InvalidConfigurationException, DatasetMetadataExporterException Add the metadata about the dataset associated with the currently used project to the dataset itself.- Parameters:
exporterSpecification
- a specification of theDatasetMetadataExporter
to be used- Throws:
ClassNotFoundException
IOException
DatasetMetadataExporterException
STPropertyAccessException
InvalidConfigurationException
NoSuchExtensionException
IllegalArgumentException
Exception
WrongPropertiesException
-
storeMetadataVocabularySettings
@STServiceOperation(method=POST) public void storeMetadataVocabularySettings(String componentID, Scope scope, com.fasterxml.jackson.databind.node.ObjectNode settings) throws NoSuchSettingsManager, STPropertyAccessException, IllegalStateException, STPropertyUpdateException, WrongPropertiesException Stores the settings about metadata vocabulary- Parameters:
componentID
-settings
-- Throws:
NoSuchSettingsManager
STPropertyAccessException
IllegalStateException
STPropertyUpdateException
WrongPropertiesException
-
getMetadataVocabularySettings
@STServiceOperation public Settings getMetadataVocabularySettings(String componentID, Scope scope) throws NoSuchSettingsManager, STPropertyAccessException Gets the settings about metadata vocabulary- Parameters:
componentID
-- Returns:
- Throws:
NoSuchSettingsManager
STPropertyAccessException
-
importMetadataVocabulariesFromMetadataRegistry
@STServiceOperation public Settings importMetadataVocabulariesFromMetadataRegistry(PluginSpecification exporterSpecification, Scope scope) throws WrongPropertiesException, STPropertyAccessException, InvalidConfigurationException, it.uniroma2.art.semanticturkey.mdr.core.NoSuchDatasetMetadataException, it.uniroma2.art.semanticturkey.mdr.core.MetadataRegistryStateException Imports the settings for a metadata vocabulary from the metadata registry.- Parameters:
componentID
-- Returns:
- Throws:
WrongPropertiesException
STPropertyAccessException
InvalidConfigurationException
it.uniroma2.art.semanticturkey.mdr.core.NoSuchDatasetMetadataException
it.uniroma2.art.semanticturkey.mdr.core.MetadataRegistryStateException
-