Class STMetadataRegistryBackendImpl
java.lang.Object
it.uniroma2.art.semanticturkey.mdr.core.impl.MetadataRegistryBackendImpl
it.uniroma2.art.semanticturkey.mdr.bindings.impl.STMetadataRegistryBackendImpl
- All Implemented Interfaces:
STMetadataRegistryBackend,MetadataRegistryBackend
@Validated
public class STMetadataRegistryBackendImpl
extends MetadataRegistryBackendImpl
implements STMetadataRegistryBackend
Implementation of
STMetadataRegistryBackend.-
Field Summary
FieldsFields inherited from class it.uniroma2.art.semanticturkey.mdr.core.impl.MetadataRegistryBackendImpl
DEFAULT_BASEURI, DEFAULT_NS, DEFAULT_PROJECT_NS, mdrContext, mediationFramework, METADATA_REGISTRY_DIRECTORY, METADATA_REGISTRY_FILEFields inherited from interface it.uniroma2.art.semanticturkey.mdr.core.MetadataRegistryBackend
SHORT_NAME_PATTERN -
Constructor Summary
ConstructorsConstructorDescriptionSTMetadataRegistryBackendImpl(it.uniroma2.art.maple.orchestration.MediationFramework mediationFramework, ExtensionPointManager exptManager, org.springframework.context.ApplicationEventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeploymentAsLocalDataset(org.eclipse.rdf4j.model.IRI dataset, ProjectShardLocator locator, DeploymentActivity activity) voidBulk change all main shards as non-editabledeleteProject(String projectName) Deletes all metadata related to a given projectdeleteProjectInternal(String projectName, String shardName, boolean deleteOnlyShard) Internal method to delete a project or, if its id is provided, just a project version.deleteProjectVersion(String projectName, String shardName, boolean deleteOnlyShard) Deletes all metadata related to a given project versionorg.eclipse.rdf4j.model.IRIfindDatasetAbstractionForProject(Project project) Optional<org.eclipse.rdf4j.model.IRI>findDatasetRealizationForDistribution(org.eclipse.rdf4j.model.IRI datasetDistribution) Optional<org.eclipse.rdf4j.model.IRI>findDeployedDataset(Project project) Optional<org.eclipse.rdf4j.model.IRI>findDeployedDataset(Project project, String shard) Optional<org.eclipse.rdf4j.model.IRI>findDeployedDatasetVersion(Project project, String shard) org.eclipse.rdf4j.model.IRIfindDeployedDistributionForProject(Project project, String shard) Returns the dataset distribution deployed onto the provided project shard.Optional<org.eclipse.rdf4j.model.IRI>findDeployedVoidDataset(Project project) findProjectForDistribution(org.eclipse.rdf4j.model.IRI datasetDistribution) Returns the project associated with the given dataset distribution.findProjectForDistribution(org.eclipse.rdf4j.model.IRI datasetDistribution, boolean allowSubset) Returns the project associated with the given dataset distribution, optionally allowing the lookup of subsets.Optional<org.eclipse.rdf4j.model.IRI>org.eclipse.rdf4j.model.IRIgetCurrentVersionForProject(Project project) Returns the current version of the dataset hosted by the givenproject.getDatasetCatalogConnector(String extensionId, String catalogId) getDatasetDistributions(org.eclipse.rdf4j.model.IRI dataset, boolean includeLocalDeployments) getDatasetRealizationsForProject(Project project, boolean excludeMutable) Returns all dataset realizations deployed into a projectgetLocalDeploymentLocation(String datasetAbstractionShortName, String version) getLocalDeploymentLocationForDistribution(org.eclipse.rdf4j.model.IRI datasetDistribution, boolean allowSubset) getPatternForLocalDataset(String subjBinding) getProjectsForDatasetAbstraction(org.eclipse.rdf4j.model.IRI datasetAbstraction) protected List<org.eclipse.rdf4j.model.Literal>getProjectTitles(Locator projectLocator) protected org.eclipse.rdf4j.repository.Repositoryorg.eclipse.rdf4j.repository.RepositoryConnectionguessRepositoryImplConfiguration(Project project) voidprotected voidbooleanisLocallyDeployedVersion(org.eclipse.rdf4j.model.IRI datasetVersion) protected voidloadingCoreMetadataVocabularies(Project project) protected DeploymentparseLocatorToDeployment(org.eclipse.rdf4j.model.Literal locator) protected voidrecordProject(AbstractProject absProj, org.eclipse.rdf4j.repository.RepositoryConnection conn) protected voidrecordProjectIfAbsent(Project project) voidvoidsetAsCurrentVersion(org.eclipse.rdf4j.model.IRI dataset) voidsetColocatedST(org.eclipse.rdf4j.model.IRI dataService) Returns the colocated data serviceprotected voidvoidteardown()protected booleanverifyTargetProjectAccessibility(String sourceProjectName, Locator targetLocator) Methods inherited from class it.uniroma2.art.semanticturkey.mdr.core.impl.MetadataRegistryBackendImpl
addChangesetDistributionFile, addChangesetDistributionIfMissing, addConcreteDataset, addDeployment, addDeploymentForDistribution, addDistribution, addEmbeddedLexicalizationSet, addIdentifierToDatasetAbstraction, addLinksetDistribution, addSparqlEndpoint, bindingset2lexicalizationsetmetadata, checkLocallyDefined, checkNotLocallyDefined, checkShortNameExists, computeCatalogRecordIRI, computeRecordCreationActivityIRI, createChangeset, createChangesetVersion, createDatasetArchetype, createDatasetRealization, createLODRealization, deepReadDatasetVersionFromModel, deleteCatalogRecord, deleteChangesetDistribution, deleteChangesetDistributionFile, deleteDatasetAbstraction, deleteDatasetDistribution, deleteDeploymentForDistribution, deleteEmbeddedLexicalizationSet, deleteLinksetDistributionFile, discoverDataset, discoverDatasetMetadata, discoverDatasetMetadataInternal, discoverLexicalizationSets, evaluateQuery, exportDatasetAbstractionMetadata, exportDatasetVersionMetadata, extractDistributionProfile, filterRootDatasets, findCoreDatasetForResource, findCurrentVersionForResource, findDatasetForResourceInternal, findDatasetsForResourceInternal, findLODDatasetForResource, findMasterDatasetForResource, findOtherVersionsForResource, generateCatalogRecordIRI, generateDatasetArchetypeIRI, generateDatasetRealizationIRI, generateDeploymentIRI, generateDeploymnetActivityIRI, generateDistributionIRI, generateRecordCreationActivityIRI, getAbstractionForDataset, getCatalogRecord, getChangeset, getChangesetVersion, getClassPartitions, getComputedLexicalizationModel, getDatasetAbstractions, getDatasetChangesetDistributionFiles, getDatasetMetadata2, getDatasetVersion, getDatasetVersionForDistribution, getDatasetVersions, getDistributionMetadata, getEmbeddedLexicalizationSets, getEmbeddedLinksets, getLinksetDistributionFiles, getShortName, getSPARQLEndpointLimitations, importDatasetAbstractionMetadata, importDatasetVersionMetadata, listConnectedDatasets, listRootDatasets, mergeRootDatasets, removeSPARQLEndpointLimitation, setDatasetRealizationVersion, setDereferenciability, setSPARQLEndpointLimitation, updateDatasetRecordTimestamp, updateParentDatasetRecordTimestampMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.uniroma2.art.semanticturkey.mdr.core.MetadataRegistryBackend
addChangesetDistributionFile, addChangesetDistributionIfMissing, addConcreteDataset, addDeployment, addDeploymentForDistribution, addDistribution, addEmbeddedLexicalizationSet, addIdentifierToDatasetAbstraction, addLinksetDistribution, addSparqlEndpoint, checkShortNameExists, computeMainGraph, computeStatsGraph, computeSysGraph, createChangeset, createChangesetVersion, createDatasetArchetype, createDatasetRealization, createLODRealization, deleteCatalogRecord, deleteChangesetDistribution, deleteChangesetDistributionFile, deleteDatasetAbstraction, deleteDatasetDistribution, deleteDeploymentForDistribution, deleteEmbeddedLexicalizationSet, deleteLinksetDistributionFile, discoverDataset, discoverDatasetMetadata, discoverLexicalizationSets, encodeShortName, evaluateQuery, exportDatasetAbstractionMetadata, exportDatasetVersionMetadata, extractDistributionProfile, filterRootDatasets, findCoreDatasetForResource, findCurrentVersionForResource, findLODDatasetForResource, findMasterDatasetForResource, findOtherVersionsForResource, getAbstractionForDataset, getCatalogRecord, getChangeset, getChangesetVersion, getClassPartitions, getComputedLexicalizationModel, getDatasetAbstractions, getDatasetChangesetDistributionFiles, getDatasetMetadata2, getDatasetVersion, getDatasetVersionForDistribution, getDatasetVersions, getDistributionMetadata, getEmbeddedLexicalizationSets, getEmbeddedLinksets, getLinksetDistributionFiles, getSPARQLEndpointLimitations, importDatasetAbstractionMetadata, importDatasetVersionMetadata, listConnectedDatasets, listRootDatasets, mergeRootDatasets, removeSPARQLEndpointLimitation, setDatasetRealizationVersion, setDereferenciability, setSPARQLEndpointLimitation
-
Field Details
-
MDR_PROJECT_NAME
- See Also:
-
FIRST_RELEASE
-
-
Constructor Details
-
STMetadataRegistryBackendImpl
public STMetadataRegistryBackendImpl(it.uniroma2.art.maple.orchestration.MediationFramework mediationFramework, ExtensionPointManager exptManager, org.springframework.context.ApplicationEventPublisher eventPublisher) throws MetadataRegistryCreationException
-
-
Method Details
-
teardown
@PreDestroy public void teardown() -
initializeAfterPlugins
@EventListener(it.uniroma2.art.semanticturkey.pf4j.events.AllPluginsInitialized.class) public void initializeAfterPlugins() throws MetadataRegistryIntializationException -
startUpdateAndRepairRoutine
protected void startUpdateAndRepairRoutine() throws ProjectAccessException, MetadataRegistryException, IOException -
recordProjectIfAbsent
- Throws:
MetadataRegistryException
-
recordProject
protected void recordProject(AbstractProject absProj, org.eclipse.rdf4j.repository.RepositoryConnection conn) -
loadingCoreMetadataVocabularies
protected void loadingCoreMetadataVocabularies(Project project) throws IOException, NSPrefixMappingUpdateException -
getColocatedST
public org.eclipse.rdf4j.model.IRI getColocatedST()- Specified by:
getColocatedSTin interfaceSTMetadataRegistryBackend
-
getColocatedDataService
- Specified by:
getColocatedDataServicein interfaceMetadataRegistryBackend
-
setColocatedST
public void setColocatedST(org.eclipse.rdf4j.model.IRI dataService) Description copied from interface:STMetadataRegistryBackendReturns the colocated data service- Specified by:
setColocatedSTin interfaceSTMetadataRegistryBackend
-
reindexDatasetCatalogConnectors
public void reindexDatasetCatalogConnectors() throws NoSuchSettingsManager, STPropertyAccessException- Specified by:
reindexDatasetCatalogConnectorsin interfaceSTMetadataRegistryBackend- Throws:
NoSuchSettingsManagerSTPropertyAccessException
-
findDatasetAbstractionForProject
- Specified by:
findDatasetAbstractionForProjectin interfaceSTMetadataRegistryBackend
-
getRepository
protected org.eclipse.rdf4j.repository.Repository getRepository()- Specified by:
getRepositoryin classMetadataRegistryBackendImpl
-
getRepositoryConnection
public org.eclipse.rdf4j.repository.RepositoryConnection getRepositoryConnection()- Specified by:
getRepositoryConnectionin interfaceMetadataRegistryBackend- Specified by:
getRepositoryConnectionin classMetadataRegistryBackendImpl
-
getBaseURI
- Specified by:
getBaseURIin interfaceMetadataRegistryBackend- Overrides:
getBaseURIin classMetadataRegistryBackendImpl
-
getDefaultNamespace
- Specified by:
getDefaultNamespacein interfaceMetadataRegistryBackend- Overrides:
getDefaultNamespacein classMetadataRegistryBackendImpl
-
initializeCatalog
- Overrides:
initializeCatalogin classMetadataRegistryBackendImpl- Throws:
MetadataRegistryIntializationException
-
addDeploymentAsLocalDataset
public void addDeploymentAsLocalDataset(org.eclipse.rdf4j.model.IRI dataset, ProjectShardLocator locator, DeploymentActivity activity) throws MetadataRegistryException - Specified by:
addDeploymentAsLocalDatasetin interfaceSTMetadataRegistryBackend- Throws:
MetadataRegistryException
-
getProjectsForDatasetAbstraction
public ProjectSummary getProjectsForDatasetAbstraction(org.eclipse.rdf4j.model.IRI datasetAbstraction) - Specified by:
getProjectsForDatasetAbstractionin interfaceSTMetadataRegistryBackend
-
getDatasetDistributions
public List<DatasetDistribution> getDatasetDistributions(org.eclipse.rdf4j.model.IRI dataset, boolean includeLocalDeployments) - Specified by:
getDatasetDistributionsin interfaceMetadataRegistryBackend- Overrides:
getDatasetDistributionsin classMetadataRegistryBackendImpl
-
getLocalDeploymentLocation
public ProjectShardLocator getLocalDeploymentLocation(String datasetAbstractionShortName, String version) throws MetadataDiscoveryException - Specified by:
getLocalDeploymentLocationin interfaceSTMetadataRegistryBackend- Throws:
MetadataDiscoveryException
-
getLocalDeploymentLocationForDistribution
public ProjectShardLocator getLocalDeploymentLocationForDistribution(org.eclipse.rdf4j.model.IRI datasetDistribution, boolean allowSubset) throws MetadataDiscoveryException - Specified by:
getLocalDeploymentLocationForDistributionin interfaceSTMetadataRegistryBackend- Throws:
MetadataDiscoveryException
-
parseLocatorToDeployment
- Overrides:
parseLocatorToDeploymentin classMetadataRegistryBackendImpl
-
findDeployedVoidDataset
- Specified by:
findDeployedVoidDatasetin interfaceSTMetadataRegistryBackend
-
findDeployedDataset
- Specified by:
findDeployedDatasetin interfaceSTMetadataRegistryBackend
-
findDeployedDataset
- Specified by:
findDeployedDatasetin interfaceSTMetadataRegistryBackend
-
findDatasetRealizationForDistribution
public Optional<org.eclipse.rdf4j.model.IRI> findDatasetRealizationForDistribution(org.eclipse.rdf4j.model.IRI datasetDistribution) - Specified by:
findDatasetRealizationForDistributionin interfaceSTMetadataRegistryBackend
-
findDeployedDatasetVersion
public Optional<org.eclipse.rdf4j.model.IRI> findDeployedDatasetVersion(Project project, String shard) - Specified by:
findDeployedDatasetVersionin interfaceSTMetadataRegistryBackend
-
findDeployedDistributionForProject
public org.eclipse.rdf4j.model.IRI findDeployedDistributionForProject(Project project, String shard) Description copied from interface:STMetadataRegistryBackendReturns the dataset distribution deployed onto the provided project shard.- Specified by:
findDeployedDistributionForProjectin interfaceSTMetadataRegistryBackend- Returns:
-
getCurrentVersionForProject
Description copied from interface:STMetadataRegistryBackendReturns the current version of the dataset hosted by the givenproject. If the project does not host the current version, thennullis returned.- Specified by:
getCurrentVersionForProjectin interfaceSTMetadataRegistryBackend
-
getDatasetRealizationsForProject
public List<DatasetVersion> getDatasetRealizationsForProject(Project project, boolean excludeMutable) Description copied from interface:STMetadataRegistryBackendReturns all dataset realizations deployed into a project- Specified by:
getDatasetRealizationsForProjectin interfaceSTMetadataRegistryBackend- Returns:
-
setAsCurrentVersion
public void setAsCurrentVersion(org.eclipse.rdf4j.model.IRI dataset) throws MetadataRegistryException - Specified by:
setAsCurrentVersionin interfaceSTMetadataRegistryBackend- Throws:
MetadataRegistryException
-
isLocallyDeployedVersion
public boolean isLocallyDeployedVersion(org.eclipse.rdf4j.model.IRI datasetVersion) - Specified by:
isLocallyDeployedVersionin interfaceSTMetadataRegistryBackend
-
getDatasetCatalogConnector
public STDatasetCatalogConnector getDatasetCatalogConnector(String extensionId, String catalogId) throws MetadataRegistryException - Specified by:
getDatasetCatalogConnectorin interfaceSTMetadataRegistryBackend- Throws:
MetadataRegistryException
-
findProjectForDistribution
Description copied from interface:STMetadataRegistryBackendReturns the project associated with the given dataset distribution. If no project is found, then the method returnsnull. This is a convenience overload forSTMetadataRegistryBackend.findProjectForDistribution(IRI, boolean)with the second parameter set tofalse.- Specified by:
findProjectForDistributionin interfaceSTMetadataRegistryBackend- Returns:
-
findProjectForDistribution
public Project findProjectForDistribution(org.eclipse.rdf4j.model.IRI datasetDistribution, boolean allowSubset) Description copied from interface:STMetadataRegistryBackendReturns the project associated with the given dataset distribution, optionally allowing the lookup of subsets. If no project is found, then the method returnsnull.- Specified by:
findProjectForDistributionin interfaceSTMetadataRegistryBackend- Returns:
-
getPatternForLocalDataset
- Overrides:
getPatternForLocalDatasetin classMetadataRegistryBackendImpl
-
verifyTargetProjectAccessibility
- Overrides:
verifyTargetProjectAccessibilityin classMetadataRegistryBackendImpl
-
getProjectTitles
- Overrides:
getProjectTitlesin classMetadataRegistryBackendImpl
-
deleteProject
Description copied from interface:STMetadataRegistryBackendDeletes all metadata related to a given project- Specified by:
deleteProjectin interfaceSTMetadataRegistryBackend- Returns:
- the urls of the files to remove
-
deleteProjectVersion
public Set<String> deleteProjectVersion(String projectName, String shardName, boolean deleteOnlyShard) Description copied from interface:STMetadataRegistryBackendDeletes all metadata related to a given project version- Specified by:
deleteProjectVersionin interfaceSTMetadataRegistryBackend- Returns:
-
guessRepositoryImplConfiguration
- Specified by:
guessRepositoryImplConfigurationin interfaceSTMetadataRegistryBackend
-
bulkSetMainShardsAsNonEditable
Description copied from interface:STMetadataRegistryBackendBulk change all main shards as non-editable- Specified by:
bulkSetMainShardsAsNonEditablein interfaceSTMetadataRegistryBackend- Throws:
ProjectAccessException
-
deleteProjectInternal
protected Set<String> deleteProjectInternal(String projectName, @Nullable String shardName, boolean deleteOnlyShard) Internal method to delete a project or, if its id is provided, just a project version. Note that is not possible to only delete the "core" repository by supplyingnullasversionId- Parameters:
projectName-shardName-deleteOnlyShard-- Returns:
- urls of downloads that have been removed
-