Class Datatypes
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.Datatypes
- All Implemented Interfaces:
NewerNewStyleService
,STService
This class provides services for manipulating datatypes.
- Author:
- Manuel Fiorelli
-
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, exptManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAnnotatedValue<org.eclipse.rdf4j.model.IRI>
createDatatype
(org.eclipse.rdf4j.model.IRI newDatatype) void
deleteDatatype
(org.eclipse.rdf4j.model.IRI datatype) void
deleteDatatypeRestriction
(org.eclipse.rdf4j.model.IRI datatype) Delete the restriction of the given datatypeCollection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
Map<org.eclipse.rdf4j.model.IRI,
DatatypeRestrictionDescription> Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
getIntrinsicDatatypesHelper
(Set<org.eclipse.rdf4j.model.IRI> datatypes) Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
getRestrictionDescription
(org.eclipse.rdf4j.model.BNode restriction) void
setDatatypeEnumerationRestrictions
(org.eclipse.rdf4j.model.IRI datatype, List<org.eclipse.rdf4j.model.Literal> literals) void
setDatatypeFacetsRestriction
(org.eclipse.rdf4j.model.IRI datatype, org.eclipse.rdf4j.model.IRI base, @NotEmpty Map<org.eclipse.rdf4j.model.IRI, org.eclipse.rdf4j.model.Literal> facets) Creates a restriction with a set of facets for a datatype Example of datatype restriction definition in OWL (source: https://www.w3.org/TR/owl2-syntax/#Datatype_Definitions) a:SSN rdf:type rdfs:Datatype .void
setDatatypeManchesterRestriction
(org.eclipse.rdf4j.model.IRI datatype, String manchExpr) 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
-
Datatypes
public Datatypes()
-
-
Method Details
-
createDatatype
@STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'C\')") public AnnotatedValue<org.eclipse.rdf4j.model.IRI> createDatatype(@NotLocallyDefined @Created(role=dataRange) org.eclipse.rdf4j.model.IRI newDatatype) -
deleteDatatype
@STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'D\')") public void deleteDatatype(@LocallyDefined @Deleted(role=dataRange) org.eclipse.rdf4j.model.IRI datatype) -
getDatatypes
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getDatatypes() -
getDeclaredDatatypes
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getDeclaredDatatypes() -
getOWL2DatatypeMap
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getOWL2DatatypeMap() -
getRDF11XmlSchemaBuiltinDatatypes
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getRDF11XmlSchemaBuiltinDatatypes() -
getBuiltinDatatypes
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getBuiltinDatatypes() -
getIntrinsicDatatypesHelper
public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getIntrinsicDatatypesHelper(Set<org.eclipse.rdf4j.model.IRI> datatypes) throws QueryBuilderException, org.eclipse.rdf4j.query.QueryEvaluationException - Throws:
QueryBuilderException
org.eclipse.rdf4j.query.QueryEvaluationException
-
setDatatypeEnumerationRestrictions
@STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'C\')") public void setDatatypeEnumerationRestrictions(@LocallyDefined @Modified(role=dataRange) org.eclipse.rdf4j.model.IRI datatype, List<org.eclipse.rdf4j.model.Literal> literals) -
setDatatypeManchesterRestriction
@STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'C\')") public void setDatatypeManchesterRestriction(@LocallyDefined @Modified(role=dataRange) org.eclipse.rdf4j.model.IRI datatype, String manchExpr) throws ManchesterParserException, ManchesterSyntacticException, ManchesterPrefixNotDefinedException -
setDatatypeFacetsRestriction
@STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'C\')") public void setDatatypeFacetsRestriction(@LocallyDefined @Modified(role=dataRange) org.eclipse.rdf4j.model.IRI datatype, org.eclipse.rdf4j.model.IRI base, @NotEmpty @NotEmpty Map<org.eclipse.rdf4j.model.IRI, org.eclipse.rdf4j.model.Literal> facets) Creates a restriction with a set of facets for a datatype Example of datatype restriction definition in OWL (source: https://www.w3.org/TR/owl2-syntax/#Datatype_Definitions) a:SSN rdf:type rdfs:Datatype . a:SSN owl:equivalentClass _:x . _:x rdf:type rdfs:Datatype . _:x owl:onDatatype xsd:string . _:x owl:withRestrictions ( _:y ) . _:y xsd:pattern "[0-9]{3}-[0-9]{2}-[0-9]{4}"- Parameters:
datatype
-base
- the xsd datatype for which the restriction is based onfacets
- mappings between xsd facet and value
-
deleteDatatypeRestriction
@STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(datatype)\', \'D\')") public void deleteDatatypeRestriction(@LocallyDefined @Modified(role=dataRange) org.eclipse.rdf4j.model.IRI datatype) Delete the restriction of the given datatype- Parameters:
datatype
-
-
getRestrictionDescription
@STServiceOperation @Read public DatatypeRestrictionDescription getRestrictionDescription(org.eclipse.rdf4j.model.BNode restriction) -
getDatatypeRestrictions
@STServiceOperation @Read public Map<org.eclipse.rdf4j.model.IRI,DatatypeRestrictionDescription> getDatatypeRestrictions()
-