Class CustomViews
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.CustomViews
- 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
(org.eclipse.rdf4j.model.IRI property, String customViewRef, ViewsEnum defaultView) void
createCustomView
(String reference, com.fasterxml.jackson.databind.node.ObjectNode definition, CustomViewModelEnum model) void
deleteAssociation
(String reference) void
deleteCustomView
(String reference) void
deleteSingleValueData
(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, org.eclipse.rdf4j.model.Value value, Map<String, org.eclipse.rdf4j.model.Value> pivots) void
exportCustomView
(jakarta.servlet.http.HttpServletResponse oRes, String reference) getCustomView
(String reference) getValueCandidates
(String cfId) Returns the list of placeholders that appear as objects of triples in the graph section of the provided CF.getViewData
(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property) void
importCustomView
(org.springframework.web.multipart.MultipartFile inputFile, String reference) com.fasterxml.jackson.databind.JsonNode
suggestAdvSingleValueCVFromCustomForm
(String cfId, String chosenPh) Suggests a sparql select for an adv-single-value CV starting from the graph section of the provided CFSuggests a sparql select for a dynamic-vector CV starting from the graph section of the provided CFvoid
updateCustomView
(String reference, com.fasterxml.jackson.databind.node.ObjectNode definition, CustomViewModelEnum model) void
updateDynamicVectorData
(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, String fieldName, org.eclipse.rdf4j.model.Value oldValue, org.eclipse.rdf4j.model.Value newValue, Map<String, org.eclipse.rdf4j.model.Value> pivots) void
updateSingleValueData
(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, org.eclipse.rdf4j.model.Value oldValue, org.eclipse.rdf4j.model.Value newValue, Map<String, org.eclipse.rdf4j.model.Value> pivots) void
updateSparqlBasedData
(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, Map<CustomViewDataBindings, org.eclipse.rdf4j.model.Value> bindings) void
updateStaticVectorData
(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, org.eclipse.rdf4j.model.IRI fieldProperty, org.eclipse.rdf4j.model.Value oldValue, org.eclipse.rdf4j.model.Value newValue) 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
-
logger
protected org.slf4j.Logger logger -
exptManager
-
-
Constructor Details
-
CustomViews
public CustomViews()
-
-
Method Details
-
getViewsIdentifiers
-
createCustomView
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'cform\', \'C\')") public void createCustomView(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode definition, CustomViewModelEnum model) throws IOException, WrongPropertiesException, STPropertyUpdateException -
updateCustomView
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'cform\', \'U\')") public void updateCustomView(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode definition, CustomViewModelEnum model) throws IOException, WrongPropertiesException, STPropertyUpdateException -
deleteCustomView
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'cform\', \'D\')") public void deleteCustomView(String reference) throws ConfigurationNotFoundException - Throws:
ConfigurationNotFoundException
-
getCustomView
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'cform\', \'R\')") public CustomView getCustomView(String reference) -
suggestDynamicVectorCVFromCustomForm
@STServiceOperation @Read public String suggestDynamicVectorCVFromCustomForm(String cfId) throws it.uniroma2.art.coda.exception.parserexception.PRParserException Suggests a sparql select for a dynamic-vector CV starting from the graph section of the provided CF- Parameters:
cfId
- ID of a CustomForm with type graph- Returns:
- Throws:
it.uniroma2.art.coda.exception.parserexception.PRParserException
-
suggestAdvSingleValueCVFromCustomForm
@STServiceOperation @Read public String suggestAdvSingleValueCVFromCustomForm(String cfId, @Optional String chosenPh) throws it.uniroma2.art.coda.exception.parserexception.PRParserException Suggests a sparql select for an adv-single-value CV starting from the graph section of the provided CF- Parameters:
cfId
- ID of a CustomForm with type graphchosenPh
- specifies the placeholder that represents the value to be shown in the view (required when the CF has multiple placeholders as object in graph section. In such case, if this parameter is not provided, an IllegalStateException is thrown)- Returns:
- Throws:
it.uniroma2.art.coda.exception.parserexception.PRParserException
-
getValueCandidates
@STServiceOperation @Read public Set<String> getValueCandidates(String cfId) throws it.uniroma2.art.coda.exception.parserexception.PRParserException Returns the list of placeholders that appear as objects of triples in the graph section of the provided CF. This API can be invoked beforesuggestAdvSingleValueCVFromCustomForm(String, String)
in order to check if the optional paramchosenPh
needs to be provided- Parameters:
cfId
-- Returns:
- Throws:
it.uniroma2.art.coda.exception.parserexception.PRParserException
-
listAssociations
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'cform\', \'R\')") public com.fasterxml.jackson.databind.JsonNode listAssociations() throws ConfigurationNotFoundException- Throws:
ConfigurationNotFoundException
-
addAssociation
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'cform\', \'C\')") public void addAssociation(org.eclipse.rdf4j.model.IRI property, String customViewRef, ViewsEnum defaultView) throws STPropertyUpdateException, WrongPropertiesException, IOException, ConfigurationNotFoundException -
deleteAssociation
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'cform\', \'D\')") public void deleteAssociation(String reference) throws ConfigurationNotFoundException - Throws:
ConfigurationNotFoundException
-
getViewData
@Read @STServiceOperation @PreAuthorize("@auth.isAuthorized(\'rdf\', \'R\')") public CustomViewData getViewData(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property) -
updateSparqlBasedData
@Write @STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', values)\', \'U\')") public void updateSparqlBasedData(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, Map<CustomViewDataBindings, org.eclipse.rdf4j.model.Value> bindings) -
updateSingleValueData
@Write @STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', values)\', \'{lang: [\'\'\' +@auth.langof(#oldValue)+ \'\'\', \'\'\' +@auth.langof(#newValue)+ \'\'\']}\', \'U\')") public void updateSingleValueData(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, org.eclipse.rdf4j.model.Value oldValue, org.eclipse.rdf4j.model.Value newValue, @Optional Map<String, org.eclipse.rdf4j.model.Value> pivots) -
deleteSingleValueData
@Write @STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', values)\', \'{lang: \'\'\' +@auth.langof(#value)+ \'\'\'}\', \'D\')") public void deleteSingleValueData(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, org.eclipse.rdf4j.model.Value value, @Optional Map<String, org.eclipse.rdf4j.model.Value> pivots) -
updateStaticVectorData
@Write @STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', values)\', \'{lang: [\'\'\' +@auth.langof(#oldValue)+ \'\'\', \'\'\' +@auth.langof(#newValue)+ \'\'\']}\', \'U\')") public void updateStaticVectorData(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, org.eclipse.rdf4j.model.IRI fieldProperty, org.eclipse.rdf4j.model.Value oldValue, org.eclipse.rdf4j.model.Value newValue) -
updateDynamicVectorData
@Write @STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', values)\', \'{lang: [\'\'\' +@auth.langof(#oldValue)+ \'\'\', \'\'\' +@auth.langof(#newValue)+ \'\'\']}\', \'U\')") public void updateDynamicVectorData(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.IRI property, String fieldName, org.eclipse.rdf4j.model.Value oldValue, org.eclipse.rdf4j.model.Value newValue, Map<String, org.eclipse.rdf4j.model.Value> pivots) -
exportCustomView
@STServiceOperation public void exportCustomView(jakarta.servlet.http.HttpServletResponse oRes, String reference) throws IOException - Throws:
IOException
-
importCustomView
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'cform\', \'C\')") public void importCustomView(org.springframework.web.multipart.MultipartFile inputFile, String reference) throws IOException, STPropertyAccessException - Throws:
IOException
STPropertyAccessException
-