Class ResourceView
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.ResourceView
- All Implemented Interfaces:
NewerNewStyleService
,STService
This service produces a view showing the details of a resource. This service operates uniformly (as much as
possible) both on local resources and remote ones.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Root class of access methods, such as local access, SPARQL or dereferenciationclass
class
class
-
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, exptManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ResourceView.AccessMethod
computeAccessMethod
(ResourcePosition resourcePosition) org.eclipse.rdf4j.repository.Repository
createSPARQLRepository
(String sparqlEndpoint) protected Set<org.eclipse.rdf4j.model.IRI>
getExcludedProperties
(ResourcePosition resourcePosition) Returns a set of properties that should be excluded from the Resource View.protected Set<org.eclipse.rdf4j.model.IRI>
getExcludedProperties
(ResourcePosition resourcePosition, boolean ignorePropertyExclusons) Returns a set of properties that should be excluded from the Resource View, unlessignorePropertyExclusons
isfalse
.List<AnnotatedValue<org.eclipse.rdf4j.model.IRI>>
getLexicalizationProperties
(org.eclipse.rdf4j.model.Resource resource, ResourcePosition resourcePosition) static List<org.eclipse.rdf4j.model.IRI>
getLexicalizationPropertiesHelper
(org.eclipse.rdf4j.model.Resource resource, ResourcePosition resourcePosition) protected String
getPropertyExclusionFilter
(ResourcePosition resourcePosition, String varName) Returns aFILTER
that can be used to exclude the properties returned bygetExcludedProperties(ResourcePosition)
.protected String
getPropertyExclusionFilter
(ResourcePosition resourcePosition, String varName, boolean ignorePropertyExclusions) Returns aFILTER
that can be used to exclude the properties returned bygetExcludedProperties(ResourcePosition)
only ifignorePropertyExclusions
isfalse
.getResourceView
(org.eclipse.rdf4j.model.Resource resource, ResourcePosition resourcePosition, boolean includeInferred, boolean ignorePropertyExclusions, boolean computeCvSingleValuePreview) getResourceViewAtTime
(org.eclipse.rdf4j.model.IRI resource, ZonedDateTime date) protected void
load
(URL url, String baseURI, org.eclipse.rdf4j.rio.RDFFormat dataFormat, org.eclipse.rdf4j.rio.RDFHandler rdfHandler) 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
-
ResourceView
public ResourceView()
-
-
Method Details
-
getLexicalizationPropertiesHelper
public static List<org.eclipse.rdf4j.model.IRI> getLexicalizationPropertiesHelper(org.eclipse.rdf4j.model.Resource resource, ResourcePosition resourcePosition) -
getResourceView
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \')\', \'R\')") public Map<String,ResourceViewSection> getResourceView(org.eclipse.rdf4j.model.Resource resource, @Optional ResourcePosition resourcePosition, @Optional(defaultValue="false") boolean includeInferred, @Optional(defaultValue="false") boolean ignorePropertyExclusions, @Optional(defaultValue="false") boolean computeCvSingleValuePreview) throws Exception - Throws:
Exception
-
getResourceViewAtTime
@STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \')\', \'R\')") public Map<String,ResourceViewSection> getResourceViewAtTime(org.eclipse.rdf4j.model.IRI resource, ZonedDateTime date) throws Exception - Throws:
Exception
-
computeAccessMethod
protected ResourceView.AccessMethod computeAccessMethod(ResourcePosition resourcePosition) throws DatasetNotAccessibleException - Throws:
DatasetNotAccessibleException
-
getLexicalizationProperties
@STServiceOperation @Read public List<AnnotatedValue<org.eclipse.rdf4j.model.IRI>> getLexicalizationProperties(@Optional org.eclipse.rdf4j.model.Resource resource, @Optional ResourcePosition resourcePosition) throws ProjectAccessException - Throws:
ProjectAccessException
-
getExcludedProperties
protected Set<org.eclipse.rdf4j.model.IRI> getExcludedProperties(ResourcePosition resourcePosition, boolean ignorePropertyExclusons) Returns a set of properties that should be excluded from the Resource View, unlessignorePropertyExclusons
isfalse
. Currently, the propertyLIME.ENTRY
is always excluded.- Parameters:
resourcePosition
-- Returns:
-
getExcludedProperties
Returns a set of properties that should be excluded from the Resource View. Currently, the propertyLIME.ENTRY
is always excluded.- Parameters:
resourcePosition
-- Returns:
-
getPropertyExclusionFilter
protected String getPropertyExclusionFilter(ResourcePosition resourcePosition, String varName, boolean ignorePropertyExclusions) Returns aFILTER
that can be used to exclude the properties returned bygetExcludedProperties(ResourcePosition)
only ifignorePropertyExclusions
isfalse
.- Parameters:
resourcePosition
-varName
-ignorePropertyExclusions
-- Returns:
-
getPropertyExclusionFilter
Returns aFILTER
that can be used to exclude the properties returned bygetExcludedProperties(ResourcePosition)
.- Parameters:
resourcePosition
-varName
-- Returns:
-
createSPARQLRepository
-
load
protected void load(URL url, String baseURI, org.eclipse.rdf4j.rio.RDFFormat dataFormat, org.eclipse.rdf4j.rio.RDFHandler rdfHandler) throws IOException - Throws:
IOException
-