Class AbstractRepositoryImplConfig
- java.lang.Object
-
- org.eclipse.rdf4j.repository.config.AbstractRepositoryImplConfig
-
- All Implemented Interfaces:
RepositoryImplConfig
- Direct Known Subclasses:
AbstractDelegatingRepositoryImplConfig,FedXRepositoryConfig,HTTPRepositoryConfig,ProxyRepositoryConfig,SailRepositoryConfig,SPARQLRepositoryConfig
public class AbstractRepositoryImplConfig extends Object implements RepositoryImplConfig
- Author:
- Herko ter Horst
-
-
Constructor Summary
Constructors Constructor Description AbstractRepositoryImplConfig()Create a new RepositoryConfigImpl.AbstractRepositoryImplConfig(String type)Create a new RepositoryConfigImpl.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RepositoryImplConfigcreate(Model model, Resource resource)Utility method to create a newRepositoryImplConfigby reading data from the suppliedModel.Resourceexport(Model model)Export thisRepositoryImplConfigto its RDF representationStringgetType()voidparse(Model model, Resource resource)Reads the properties of thisRepositoryImplConfigfrom the supplied Model and sets them accordingly.voidsetType(String type)voidvalidate()Validates this configuration.
-
-
-
Constructor Detail
-
AbstractRepositoryImplConfig
public AbstractRepositoryImplConfig()
Create a new RepositoryConfigImpl.
-
AbstractRepositoryImplConfig
public AbstractRepositoryImplConfig(String type)
Create a new RepositoryConfigImpl.- Parameters:
type-
-
-
Method Detail
-
getType
public String getType()
- Specified by:
getTypein interfaceRepositoryImplConfig
-
setType
public void setType(String type)
-
validate
public void validate() throws RepositoryConfigExceptionDescription copied from interface:RepositoryImplConfigValidates this configuration. ARepositoryConfigExceptionis thrown when the configuration is invalid. The exception should contain an error message that indicates why the configuration is invalid.- Specified by:
validatein interfaceRepositoryImplConfig- Throws:
RepositoryConfigException- If the configuration is invalid.
-
export
public Resource export(Model model)
Description copied from interface:RepositoryImplConfigExport thisRepositoryImplConfigto its RDF representation- Specified by:
exportin interfaceRepositoryImplConfig- Parameters:
model- aModelobject. After successful completion of this method this Model will contain the RDF representation of thisRepositoryImplConfig.- Returns:
- the subject
Resourcethat identifies thisRepositoryImplConfigin the Model.
-
parse
public void parse(Model model, Resource resource) throws RepositoryConfigException
Description copied from interface:RepositoryImplConfigReads the properties of thisRepositoryImplConfigfrom the supplied Model and sets them accordingly.- Specified by:
parsein interfaceRepositoryImplConfig- Parameters:
model- aModelcontaining repository configuration data.resource- the subjectResourcethat identifies theRepositoryImplConfigin the Model.- Throws:
RepositoryConfigException- if the configuration data could not be read from the supplied Model.
-
create
public static RepositoryImplConfig create(Model model, Resource resource) throws RepositoryConfigException
Utility method to create a newRepositoryImplConfigby reading data from the suppliedModel.- Parameters:
model- theModelto read configuration data from.resource- the subjectResourceidentifying the configuration data in the Model.- Returns:
- a new
RepositoryImplConfiginitialized with the configuration from the input Model, ornullif noRepositoryConfigSchema.REPOSITORYTYPEproperty was found in the configuration data.. - Throws:
RepositoryConfigException- if an error occurred reading the configuration data from the model.
-
-