Class Project
java.lang.Object
it.uniroma2.art.semanticturkey.project.AbstractProject
it.uniroma2.art.semanticturkey.project.Project
- All Implemented Interfaces:
ProjectConsumer
- Direct Known Subclasses:
PersistentStoreProject
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
protected org.eclipse.rdf4j.repository.config.RepositoryConfig
static final String
protected String
static final String
static final String
static final String
protected String
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final String
static final String
protected File
static final String
static final String
protected Project.LastConnectionInfo
static final String
static final String
protected org.eclipse.rdf4j.model.IRI
protected static org.slf4j.Logger
static final String
protected org.eclipse.rdf4j.model.IRI
static final String
static final String
protected OntologyManager
static final org.eclipse.rdf4j.model.IRI
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final String
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected File
static final String
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final org.eclipse.rdf4j.model.IRI
static final String
static final String
static final String
protected OntologyManagerImpl
protected org.eclipse.rdf4j.repository.config.RepositoryConfig
static final String
static final String
static final String
static final String
protected Set<RDFResourceRole>
static final String
static final String
static final String
static final String
static final String
protected File
static final String
static final String
Fields inherited from class it.uniroma2.art.semanticturkey.project.AbstractProject
_projectDir
Fields inherited from interface it.uniroma2.art.semanticturkey.project.ProjectConsumer
SYSTEM
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkLexicalizationModel
(org.eclipse.rdf4j.model.IRI lexicalizationModel) static void
checkModel
(org.eclipse.rdf4j.model.IRI model) static void
checkModels
(org.eclipse.rdf4j.model.IRI model, org.eclipse.rdf4j.model.IRI lexicalizationModel) static void
checkProjectName
(String projectName) void
org.eclipse.rdf4j.repository.Repository
createReadOnlyRepository
(RepositoryAccess repositoryAccess, String repositoryId, PluginSpecification repoConfigurerSpecification, String localRepostoryId, String backendType, boolean customizeSearch) org.eclipse.rdf4j.repository.Repository
createRepository
(RepositoryAccess repositoryAccess, String repositoryId, PluginSpecification repoConfigurerSpecification, String localRepostoryId) org.eclipse.rdf4j.repository.Repository
createRepository
(RepositoryAccess repositoryAccess, String repositoryId, PluginSpecification repoConfigurerSpecification, String localRepostoryId, boolean readOnlyWrapper, String backendType, boolean customizeSearch) Creates a new repository.void
void
deleteRepository
(String repositoryId, boolean propagateDelete) Deletes a repository.void
deleteReservedProperty
(String propName) getACL()
protected Map<org.eclipse.rdf4j.model.IRI,
org.apache.commons.lang3.tuple.ImmutablePair<URL, org.eclipse.rdf4j.rio.RDFFormat>> protected Map<org.eclipse.rdf4j.model.IRI,
org.apache.commons.lang3.tuple.ImmutablePair<URL, org.eclipse.rdf4j.rio.RDFFormat>> org.eclipse.rdf4j.model.IRI
org.eclipse.rdf4j.model.Resource
getMetadataGraph
(String extensionPathComponent) org.eclipse.rdf4j.model.IRI
getModel()
getName()
Returns the directory associated with this projectgetProperty
(String propName) returns the value associated to a given property for this projectorg.eclipse.rdf4j.repository.Repository
Returns the core repository associated with this project.static Collection<RepositorySummary>
getRepositorySummaries
(STLocalRepositoryManager repoManager, boolean excludeLocal) getRepositoryTransactionManager
(String repositoryId) long
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
protected void
loadingCoreVocabularies
(org.eclipse.rdf4j.repository.RepositoryConnection conn) protected abstract void
void
removeProperty
(String propName, String propValue) void
setBaseURI
(String baseURI) void
setDefaultNamespace
(String defaultNamespace) void
void
void
setLastConnectionInfo
(STUser user, String sessionId) void
void
setProperty
(String propName, String propValue) void
setReservedProperty
(String propName, String propValue) toString()
void
updateLastConnectionInfo
(STUser user, String sessionId) void
Methods inherited from class it.uniroma2.art.semanticturkey.project.AbstractProject
equals, hashCode
-
Field Details
-
RDFS_MODEL_STRING
- See Also:
-
RDFS_MODEL
public static final org.eclipse.rdf4j.model.IRI RDFS_MODEL -
OWL_MODEL_STRING
- See Also:
-
OWL_MODEL
public static final org.eclipse.rdf4j.model.IRI OWL_MODEL -
SKOS_MODEL_STRING
- See Also:
-
SKOS_MODEL
public static final org.eclipse.rdf4j.model.IRI SKOS_MODEL -
ONTOLEXLEMON_MODEL_STRING
- See Also:
-
ONTOLEXLEMON_MODEL
public static final org.eclipse.rdf4j.model.IRI ONTOLEXLEMON_MODEL -
EDOAL_MODEL_STRING
- See Also:
-
EDOAL_MODEL
public static final org.eclipse.rdf4j.model.IRI EDOAL_MODEL -
RDFS_LEXICALIZATION_MODEL_STRING
- See Also:
-
RDFS_LEXICALIZATION_MODEL
public static final org.eclipse.rdf4j.model.IRI RDFS_LEXICALIZATION_MODEL -
SKOS_LEXICALIZATION_MODEL_STRING
- See Also:
-
SKOS_LEXICALIZATION_MODEL
public static final org.eclipse.rdf4j.model.IRI SKOS_LEXICALIZATION_MODEL -
SKOSXL_LEXICALIZATION_MODEL_STRING
- See Also:
-
SKOSXL_LEXICALIZATION_MODEL
public static final org.eclipse.rdf4j.model.IRI SKOSXL_LEXICALIZATION_MODEL -
ONTOLEXLEMON_LEXICALIZATION_MODEL_STRING
- See Also:
-
ONTOLEXLEMON_LEXICALIZATION_MODEL
public static final org.eclipse.rdf4j.model.IRI ONTOLEXLEMON_LEXICALIZATION_MODEL -
INFOFILENAME
- See Also:
-
URI_GENERATOR_CONFIG_FILENAME
- See Also:
-
RENDERING_ENGINE_CONFIG_FILENAME
- See Also:
-
TIMESTAMP_PROP
- See Also:
-
CREATED_AT_PROP
- See Also:
-
PROJECT_NAME_PROP
- See Also:
-
LABELS_PROP
- See Also:
-
LAST_CONNECTION_INFO
- See Also:
-
BASEURI_PROP
- See Also:
-
DEF_NS_PROP
- See Also:
-
MODEL_PROP
- See Also:
-
LEXICALIZATION_MODEL_PROP
- See Also:
-
OPEN_AT_STARTUP_PROP
- See Also:
-
HISTORY_ENABLED_PROP
- See Also:
-
VALIDATION_ENABLED_PROP
- See Also:
-
BLACKLISTING_ENABLED_PROP
- See Also:
-
UNDO_ENABLED_PROP
- See Also:
-
READONLY_PROP
- See Also:
-
DESCRIPTION_PROP
- See Also:
-
VERSIONS_PROP
- See Also:
-
DEFAULT_REPOSITORY_LOCATION_PROP
- See Also:
-
MANDATORY_PLUGINS_PROP_PREFIX
- See Also:
-
URI_GENERATOR_PROP_PREFIX
- See Also:
-
URI_GENERATOR_FACTORY_ID_PROP
- See Also:
-
URI_GENERATOR_FACTORY_ID_DEFAULT_PROP_VALUE
- See Also:
-
URI_GENERATOR_CONFIGURATION_TYPE_PROP
- See Also:
-
RENDERING_ENGINE_PROP_PREFIX
- See Also:
-
RENDERING_ENGINE_FACTORY_ID_PROP
- See Also:
-
RENDERING_ENGINE_FACTORY_ID_DEFAULT_PROP_VALUE
- See Also:
-
RENDERING_ENGINE_CONFIGURATION_TYPE_PROP
- See Also:
-
SHACL_ENABLED_PROP
- See Also:
-
TRIVIAL_INFERENCER_ENABLED_PROP
- See Also:
-
ONTOLOGY_IMPORT_SOURCES_PROP
- See Also:
-
reservedProperties
-
stpComment
- See Also:
-
UPDATE_FOR_ROLES_PROP_DEPRECATED
- See Also:
-
CREATION_DATE_PROP_DEPRECATED
- See Also:
-
MODIFICATION_DATE_PROP_DEPRECATED
- See Also:
-
CORE_REPOSITORY
- See Also:
-
SUPPORT_REPOSITORY
- See Also:
-
LEFT_DATASET_PROP
- See Also:
-
RIGHT_DATASET_PROP
- See Also:
-
logger
protected static org.slf4j.Logger logger -
nsPrefixMappingsPersistence
-
infoSTPFile
-
renderingConfigFile
-
uriGenConfigFile
-
ontManager
-
supportOntManager
-
model
protected org.eclipse.rdf4j.model.IRI model -
lexicalizationModel
protected org.eclipse.rdf4j.model.IRI lexicalizationModel -
labels
-
lastConnectionInfo
-
description
-
createdAt
-
coreRepoConfig
protected org.eclipse.rdf4j.repository.config.RepositoryConfig coreRepoConfig -
supportRepoConfig
protected org.eclipse.rdf4j.repository.config.RepositoryConfig supportRepoConfig -
updateForRoles
-
-
Constructor Details
-
Project
this constructor always assumes that the project folder actually exists. Accessing an already existing folder or creating a new one is in charge of the ProjectManagerthe created project gives access to all of its properties, though it needs to be {@link #activate(ExtensionPointManager))}d for its RDF content to be accessed
implementation of this constructor by subclasses must take care of properly initializing the
nsPrefixMappingsPersistence
field.- Parameters:
projectName
-projectDir
-- Throws:
ProjectCreationException
UnsupportedModelException
-
-
Method Details
-
checkModels
public static void checkModels(org.eclipse.rdf4j.model.IRI model, org.eclipse.rdf4j.model.IRI lexicalizationModel) throws UnsupportedModelException, UnsupportedLexicalizationModelException, ProjectInconsistentException -
checkModel
- Throws:
UnsupportedModelException
-
checkLexicalizationModel
public static void checkLexicalizationModel(org.eclipse.rdf4j.model.IRI lexicalizationModel) throws UnsupportedLexicalizationModelException -
checkProjectName
- Throws:
InvalidProjectNameException
-
getRepositorySummaries
public static Collection<RepositorySummary> getRepositorySummaries(STLocalRepositoryManager repoManager, boolean excludeLocal) -
loadingCoreVocabularies
protected void loadingCoreVocabularies(org.eclipse.rdf4j.repository.RepositoryConnection conn) throws Exception - Throws:
Exception
-
getCoreVocabulariesForLexicalizationModel
-
getCoreVocabulariesForModel
-
deactivate
public void deactivate() -
loadTriples
protected abstract void loadTriples() throws org.eclipse.rdf4j.common.exception.RDF4JException- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
-
clearData
- Throws:
Exception
-
getTimeStamp
public long getTimeStamp() -
getModel
public org.eclipse.rdf4j.model.IRI getModel() -
getLexicalizationModel
public org.eclipse.rdf4j.model.IRI getLexicalizationModel() -
getName
- Specified by:
getName
in interfaceProjectConsumer
- Specified by:
getName
in classAbstractProject
-
setName
- Throws:
ProjectUpdateException
-
getLabels
-
setLabels
- Throws:
ProjectUpdateException
-
getLastConnectionInfo
-
setLastConnectionInfo
- Throws:
ProjectUpdateException
-
updateLastConnectionInfo
- Throws:
ProjectUpdateException
-
getBaseURI
-
setBaseURI
- Throws:
ProjectUpdateException
-
getDefaultNamespace
-
setDefaultNamespace
- Throws:
ProjectUpdateException
-
isHistoryEnabled
public boolean isHistoryEnabled() -
isValidationEnabled
public boolean isValidationEnabled() -
isBlacklistingEnabled
public boolean isBlacklistingEnabled() -
isSHACLEnabled
public boolean isSHACLEnabled() -
isTrivialInferencerEnabled
public boolean isTrivialInferencerEnabled() -
isUndoEnabled
public boolean isUndoEnabled() -
isReadonly
public boolean isReadonly() -
getProperty
returns the value associated to a given property for this project- Parameters:
propName
- the name of the queried property- Returns:
- the value associated to this property
-
setProperty
public void setProperty(String propName, String propValue) throws ProjectUpdateException, ReservedPropertyUpdateException -
setReservedProperty
- Throws:
ProjectUpdateException
-
deleteReservedProperty
- Throws:
ProjectUpdateException
-
removeProperty
public void removeProperty(String propName, String propValue) throws ReservedPropertyUpdateException, ProjectUpdateException -
setLabel
- Parameters:
lang
-label
- if null removes the label in the given language- Throws:
ProjectUpdateException
-
updateTimeStamp
- Throws:
ProjectUpdateException
-
getRepository
public org.eclipse.rdf4j.repository.Repository getRepository()Returns the core repository associated with this project. Clients should rarely invoke this method, and use instead the operations found inSTServiceContextUtils
(which are aware, for example, of version dumps).- Returns:
-
getRepositoryTransactionManager
-
toString
-
getACL
-
getOntologyImportSourceManager
-
getURIGenerator
-
getRenderingEngine
-
getMetadataGraph
-
getOntologyManager
-
getRepositoryManager
-
createRepository
public org.eclipse.rdf4j.repository.Repository createRepository(@Nullable RepositoryAccess repositoryAccess, @Nullable String repositoryId, @Nullable PluginSpecification repoConfigurerSpecification, String localRepostoryId, boolean readOnlyWrapper, @Nullable String backendType, boolean customizeSearch) throws AlreadyExistingRepositoryException, RepositoryNotExistingException Creates a new repository. The repository can optionally be wrapped inReadOnlyRepositoryWrapper
to prevent unintended modifications of the data.- Parameters:
repositoryAccess
- ifnull
the default repository location associated with the project is usedrepositoryId
- ifnull
when accessing a remote repository, the default value isprojectName-localRepositoryId
repoConfigurerSpecification
-localRepostoryId
-readOnlyWrapper
-backendType
-customizeSearch
-- Returns:
- Throws:
AlreadyExistingRepositoryException
RepositoryNotExistingException
-
deleteRepository
Deletes a repository.- Parameters:
repositoryId
- the (local) identifier of the repository to deletepropagateDelete
- tells whether to delete the remote repository (if any).
-
createRepository
public org.eclipse.rdf4j.repository.Repository createRepository(RepositoryAccess repositoryAccess, String repositoryId, PluginSpecification repoConfigurerSpecification, String localRepostoryId) throws AlreadyExistingRepositoryException, RepositoryNotExistingException -
createReadOnlyRepository
public org.eclipse.rdf4j.repository.Repository createReadOnlyRepository(RepositoryAccess repositoryAccess, String repositoryId, PluginSpecification repoConfigurerSpecification, String localRepostoryId, String backendType, boolean customizeSearch) throws AlreadyExistingRepositoryException, RepositoryNotExistingException -
getVersionManager
-
getDefaultRepositoryLocation
-
getUpdateForRoles
-
getProjectDirectory
Returns the directory associated with this project- Returns:
-
getDescription
-
getCreatedAt
-
isOpenAtStartupEnabled
public boolean isOpenAtStartupEnabled()
-