Class EDOAL
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.EDOAL
- All Implemented Interfaces:
NewerNewStyleService
,STService
This class provides services for manipulating Alignments in the Align API format.
- Author:
- Manuel Fiorelli
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, exptManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.rdf4j.model.BNode
Returns the align:Alignment resources defined in the current projectvoid
createCorrespondence
(org.eclipse.rdf4j.model.Resource alignment, org.eclipse.rdf4j.model.IRI leftEntity, org.eclipse.rdf4j.model.IRI rightEntity, String relation, float measure) Adds a new correspondence (i.e. an align:cell) to the providedalignment
.void
deleteCorrespondence
(org.eclipse.rdf4j.model.Resource correspondence) Sets thealign:relation
of the providedcorrespondence
.Returns information about the aligned projectsCollection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
Returns the align:Alignment resources defined in the current projectgetCorrespondences
(org.eclipse.rdf4j.model.Resource alignment, int page, int pageSize) Returns the correspondences in an alignmentCollection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>>
getSuggestedProperties
(org.eclipse.rdf4j.model.Resource alignment, RDFResourceRole role, String relation) Returns a list of suggested mapping properties to use for aligning two entities for the given role-relation pair.void
replacePropertyValueInternal
(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI prop, org.eclipse.rdf4j.model.Value value) void
setLeftEntity
(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI entity) Sets thealign:entity1
of the providedcorrespondence
.void
setMappingProperty
(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI property) Sets thealign:mappingProperty
of the providedcorrespondence
.void
setMeasure
(org.eclipse.rdf4j.model.Resource correspondence, float measure) Sets thealign:relation
of the providedcorrespondence
.void
setRelation
(org.eclipse.rdf4j.model.Resource correspondence, String relation) Sets thealign:relation
of the providedcorrespondence
.void
setRightEntity
(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI entity) Sets thealign:entity2
of the providedcorrespondence
.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
-
Constructor Details
-
EDOAL
public EDOAL()
-
-
Method Details
-
getAlignedProjects
Returns information about the aligned projects- Returns:
-
createAlignment
@STServiceOperation(method=POST) @Write public org.eclipse.rdf4j.model.BNode createAlignment() throws ProjectAccessException, InvalidProjectNameException, ProjectInexistentExceptionReturns the align:Alignment resources defined in the current project- Returns:
- Throws:
ProjectInexistentException
InvalidProjectNameException
ProjectAccessException
-
getAlignments
@STServiceOperation @Read public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getAlignments()Returns the align:Alignment resources defined in the current project- Returns:
-
createCorrespondence
@Write @STServiceOperation(method=POST) public void createCorrespondence(org.eclipse.rdf4j.model.Resource alignment, org.eclipse.rdf4j.model.IRI leftEntity, org.eclipse.rdf4j.model.IRI rightEntity, String relation, float measure) Adds a new correspondence (i.e. an align:cell) to the providedalignment
.- Parameters:
alignment
-leftEntity
-rightEntity
-relation
-measure
-
-
setLeftEntity
@Write @STServiceOperation(method=POST) public void setLeftEntity(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI entity) Sets thealign:entity1
of the providedcorrespondence
.- Parameters:
correspondence
-entity
-
-
setRightEntity
@Write @STServiceOperation(method=POST) public void setRightEntity(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI entity) Sets thealign:entity2
of the providedcorrespondence
.- Parameters:
correspondence
-entity
-
-
setRelation
@Write @STServiceOperation(method=POST) public void setRelation(org.eclipse.rdf4j.model.Resource correspondence, String relation) Sets thealign:relation
of the providedcorrespondence
.- Parameters:
correspondence
-relation
-
-
setMeasure
@Write @STServiceOperation(method=POST) public void setMeasure(org.eclipse.rdf4j.model.Resource correspondence, float measure) Sets thealign:relation
of the providedcorrespondence
.- Parameters:
correspondence
-measure
-
-
setMappingProperty
@Write @STServiceOperation(method=POST) public void setMappingProperty(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI property) Sets thealign:mappingProperty
of the providedcorrespondence
.- Parameters:
correspondence
-property
-
-
deleteCorrespondence
@Write @STServiceOperation(method=POST) public void deleteCorrespondence(org.eclipse.rdf4j.model.Resource correspondence) Sets thealign:relation
of the providedcorrespondence
.- Parameters:
correspondence
-
-
replacePropertyValueInternal
public void replacePropertyValueInternal(org.eclipse.rdf4j.model.Resource correspondence, org.eclipse.rdf4j.model.IRI prop, org.eclipse.rdf4j.model.Value value) throws org.eclipse.rdf4j.repository.RepositoryException, org.eclipse.rdf4j.query.MalformedQueryException, org.eclipse.rdf4j.query.UpdateExecutionException - Throws:
org.eclipse.rdf4j.repository.RepositoryException
org.eclipse.rdf4j.query.MalformedQueryException
org.eclipse.rdf4j.query.UpdateExecutionException
-
getSuggestedProperties
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(resource, alignment)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>> getSuggestedProperties(org.eclipse.rdf4j.model.Resource alignment, RDFResourceRole role, String relation) throws ProjectAccessException, ProjectInexistentException, InvalidProjectNameException Returns a list of suggested mapping properties to use for aligning two entities for the given role-relation pair. In addition to the "standard" properties, the list could contain also other custom properties, namely properties (not among those "standard") that in the current alignment are used in a mapping having the given relation.- Parameters:
alignment
-role
-relation
-- Returns:
- Throws:
ProjectAccessException
ProjectInexistentException
InvalidProjectNameException
-
getCorrespondences
@Read @STServiceOperation public Collection<EDOAL.Correspondence> getCorrespondences(org.eclipse.rdf4j.model.Resource alignment, @Optional(defaultValue="0") int page, @Optional(defaultValue="10") int pageSize) throws ProjectAccessException, InvalidProjectNameException, ProjectInexistentException, IndexingLanguageNotFound Returns the correspondences in an alignment- Parameters:
alignment
-page
-pageSize
- if less than or equal to zero, then all correspondences go into one page- Returns:
- Throws:
ProjectAccessException
InvalidProjectNameException
ProjectInexistentException
IndexingLanguageNotFound
-