Class ResourceMetadata
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.ResourceMetadata
- All Implemented Interfaces:
NewerNewStyleService
,STService
-
Field Summary
FieldsFields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAssociation
(RDFResourceRole role, String patternReference) void
clonePattern
(String reference, String name) void
createPattern
(String reference, com.fasterxml.jackson.databind.node.ObjectNode definition) void
deleteAssociation
(String reference) void
deletePattern
(String reference) void
exportPattern
(jakarta.servlet.http.HttpServletResponse oRes, String reference) Export/Download the pattern fileReturns the reference of the only factory-provided patterns.Shared patterns are those stored as system levelgetPattern
(String reference) Returns the identifiers (configuration relative reference) of the pattern stored at project level and those factory providedvoid
importPattern
(org.springframework.web.multipart.MultipartFile inputFile, String name) Import and add a new pattern at project level from a loaded filevoid
importPatternFromLibrary
(String reference, String name) Clone a pattern stored at system level (shared) to project levelcom.fasterxml.jackson.databind.JsonNode
void
storePatternInLibrary
(String reference, String name) Clone (share) a pattern stored at project level to system levelvoid
updatePattern
(String reference, com.fasterxml.jackson.databind.node.ObjectNode definition) Methods 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
-
Field Details
-
exptManager
-
-
Constructor Details
-
ResourceMetadata
public ResourceMetadata()
-
-
Method Details
-
listAssociations
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, association)\', \'R\')") public com.fasterxml.jackson.databind.JsonNode listAssociations() throws STPropertyAccessException, ConfigurationNotFoundException, NoSuchConfigurationManager -
addAssociation
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, association)\', \'C\')") public void addAssociation(RDFResourceRole role, String patternReference) throws IOException, WrongPropertiesException, STPropertyUpdateException, STPropertyAccessException, ConfigurationNotFoundException, NoSuchConfigurationManager -
deleteAssociation
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, association)\', \'D\')") public void deleteAssociation(String reference) throws ConfigurationNotFoundException, NoSuchConfigurationManager -
getPatternIdentifiers
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'R\')") public Collection<String> getPatternIdentifiers() throws NoSuchConfigurationManagerReturns the identifiers (configuration relative reference) of the pattern stored at project level and those factory provided- Returns:
- Throws:
NoSuchConfigurationManager
-
getFactoryPatternIdentifiers
@STServiceOperation @PreAuthorize("@auth.isSuperUser(false)") public Collection<String> getFactoryPatternIdentifiers() throws NoSuchConfigurationManagerReturns the reference of the only factory-provided patterns. This service can be used to have the list of only the factory-provided patterns from outside a project. In other cases (in the context of a project) it can be used getPatternIdentifiers which returns all of them (factory-provided and non)- Returns:
- Throws:
NoSuchConfigurationManager
-
getLibraryPatternIdentifiers
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'R\')") public Collection<String> getLibraryPatternIdentifiers() throws NoSuchConfigurationManagerShared patterns are those stored as system level- Returns:
- Throws:
NoSuchConfigurationManager
-
getPattern
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'R\')") public ResourceMetadataPattern getPattern(String reference) throws STPropertyAccessException, IOException, NoSuchConfigurationManager -
createPattern
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'C\')") public void createPattern(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode definition) throws IOException, WrongPropertiesException, STPropertyUpdateException, NoSuchConfigurationManager -
updatePattern
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'U\')") public void updatePattern(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode definition) throws IOException, WrongPropertiesException, STPropertyUpdateException, NoSuchConfigurationManager -
deletePattern
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'D\')") public void deletePattern(String reference) throws ConfigurationNotFoundException, STPropertyAccessException, NoSuchConfigurationManager -
importPatternFromLibrary
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'C\')") public void importPatternFromLibrary(String reference, String name) throws STPropertyAccessException, WrongPropertiesException, IOException, STPropertyUpdateException, NoSuchConfigurationManager Clone a pattern stored at system level (shared) to project level- Parameters:
reference
- the reference of the system level pattern to importname
- the name to assign at the imported pattern (at project level)- Throws:
STPropertyAccessException
WrongPropertiesException
IOException
STPropertyUpdateException
NoSuchConfigurationManager
-
storePatternInLibrary
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'C\')") public void storePatternInLibrary(String reference, String name) throws STPropertyAccessException, WrongPropertiesException, IOException, STPropertyUpdateException, NoSuchConfigurationManager Clone (share) a pattern stored at project level to system level- Parameters:
reference
- the reference of the project level pattern to sharename
- the name to assign at the shared pattern (at system level)- Throws:
STPropertyAccessException
WrongPropertiesException
IOException
STPropertyUpdateException
NoSuchConfigurationManager
-
clonePattern
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'C\')") public void clonePattern(String reference, String name) throws STPropertyAccessException, WrongPropertiesException, IOException, STPropertyUpdateException, NoSuchConfigurationManager - Parameters:
reference
- relativeReference of the pattern to clonename
- name of the new pattern to create- Throws:
STPropertyAccessException
WrongPropertiesException
IOException
NoSuchConfigurationManager
STPropertyUpdateException
-
importPattern
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'C\')") public void importPattern(org.springframework.web.multipart.MultipartFile inputFile, String name) throws IOException, STPropertyAccessException, WrongPropertiesException, STPropertyUpdateException, NoSuchConfigurationManager Import and add a new pattern at project level from a loaded file- Parameters:
inputFile
-name
-- Throws:
IOException
NoSuchConfigurationManager
STPropertyAccessException
WrongPropertiesException
STPropertyUpdateException
-
exportPattern
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'pm(resourceMetadata, pattern)\', \'R\')") public void exportPattern(jakarta.servlet.http.HttpServletResponse oRes, String reference) throws IOException, STPropertyAccessException, NoSuchConfigurationManager Export/Download the pattern file- Parameters:
oRes
-reference
-- Throws:
CustomFormException
IOException
STPropertyAccessException
NoSuchConfigurationManager
-