public class OWLArtModelFactory<MC extends ModelConfiguration> extends Object implements ModelFactory<MC>
ModelFactory
which takes the duty of loading basic vocabularies of the
RDF family (RDF, RDFS, OWL) according to the specific type of model which is being loadedModifier and Type | Method and Description |
---|---|
void |
checkVocabularyData(BaseRDFTripleModel rep,
ARTURIResource vocURI,
String vocNS,
String prefix,
ARTStatement stat,
URL vocDataURL)
populates a model with standard definitions for vocabulary associated to
vocNS by loading
the rdf file from vocDataURL the model is only populated if isPopulatingW3CVocabularies() amounts to true |
void |
checkVocabularyData(BaseRDFTripleModel model,
Collection<String> namespaces)
populates a model with standard definitions for vocabularies associated to
namespaces , if
the vocabulary has not already been loaded in the model by its specific ModelFactory implementationthe model is only populated if isPopulatingW3CVocabularies() amounts to true |
void |
closeModel(BaseRDFTripleModel rep)
closes the Model, by releasing all of its resources
|
BaseRDFTripleModel |
createLightweightRDFModel()
creates a very lightweight RDF model, with no preloaded vocabularies, no inference, and no storage
folder (as it is always in memory).
|
MC |
createModelConfigurationObject()
gets the first available model configuration from the loaded ModelFactory implementation
|
<MCImpl extends MC> |
createModelConfigurationObject(Class<MCImpl> mcclass) |
<MCImpl extends MC> |
createModelConfigurationObject(Class<MCImpl> mcclass,
File propertyFile) |
MC |
createModelConfigurationObject(File propertyFile)
this method is a short cut for the two calls:
createModelConfigurationObject(Class) : with class set to the first ModelConfiguration
available for the loaded ModelFactory implementation
ModelConfiguration.loadParameters(File) : invoked from the modelConfiguration created on the
previous call, on the propertyFile passed as argument of this method
|
static <MC extends ModelConfiguration> |
createModelFactory(ModelFactory<MC> mf)
basic factory which creates an instance of this class by encapsulating a
ModelFactory plain
implementation and adding vocabulary management to it |
Collection<Class<? extends MC>> |
getModelConfigurations() |
boolean |
isPopulatingW3CVocabularies()
tells if the factory to create graphs for the proper W3C vocabularies in the models which it creates,
if they are not already available.
|
LinkedDataResolver |
loadLinkedDataResolver()
Creates a Linked Data resolver, which allows dereferencing the identifier of a resource to obtain its
RDF description.
|
<T extends RDFModel> |
loadModel(Class<T> modelClass,
String baseuri,
String persistenceDirectory) |
<T extends RDFModel> |
loadModel(Class<T> modelClass,
String baseuri,
String persistenceDirectory,
ModelConfiguration conf) |
OWLModel |
loadOWLModel(String baseuri,
String repositoryDirectory) |
<MCImpl extends MC> |
loadOWLModel(String baseuri,
String repositoryDirectory,
MCImpl conf)
loads/creates a
OWLModel from/in directory persistenceDirectory |
<MCImpl extends MC> |
loadRDFBaseModel(String baseuri,
String repositoryDirectory) |
<MCImpl extends MC> |
loadRDFBaseModel(String baseuri,
String repositoryDirectory,
MCImpl conf)
loads/creates a
BaseRDFTripleModel from/in directory persistenceDirectory |
<MCImpl extends MC> |
loadRDFModel(String baseuri,
String repositoryDirectory) |
<MCImpl extends MC> |
loadRDFModel(String baseuri,
String repositoryDirectory,
MCImpl conf)
loads/creates a
RDFModel from/in directory persistenceDirectory |
RDFSModel |
loadRDFSModel(String baseuri,
String repositoryDirectory) |
<MCImpl extends MC> |
loadRDFSModel(String baseuri,
String repositoryDirectory,
MCImpl conf)
loads/creates a
RDFSModel from/in directory persistenceDirectory |
SKOSModel |
loadSKOSModel(String baseuri,
String repositoryDirectory) |
<MCImpl extends MC> |
loadSKOSModel(String baseuri,
String persistenceDirectory,
MCImpl conf)
loads/creates a
SKOSModel from/in directory persistenceDirectory |
SKOSXLModel |
loadSKOSXLModel(String baseuri,
String repositoryDirectory)
shortcut for
loadSKOSXLModel(String, String, ModelConfiguration) with a standard
ModelConfiguration |
<MCImpl extends MC> |
loadSKOSXLModel(String baseuri,
String persistenceDirectory,
MCImpl conf)
loads/creates a
SKOSXLModel from/in directory persistenceDirectory |
TripleQueryModelHTTPConnection |
loadTripleQueryHTTPConnection(String endpointURL)
accesses a SPARQL endpoint available at the given
endpointURL |
void |
setPopulatingW3CVocabularies(boolean pref)
instructs the factory to create graphs for the proper W3C vocabularies in the models which it creates,
if they are not already available.
|
public static <MC extends ModelConfiguration> OWLArtModelFactory<MC> createModelFactory(ModelFactory<MC> mf)
ModelFactory
plain
implementation and adding vocabulary management to itmf
- public void closeModel(BaseRDFTripleModel rep) throws ModelUpdateException
ModelFactory
closeModel
in interface ModelFactory<MC extends ModelConfiguration>
ModelUpdateException
public <MCImpl extends MC> BaseRDFTripleModel loadRDFBaseModel(String baseuri, String repositoryDirectory, MCImpl conf) throws ModelCreationException
ModelFactory
BaseRDFTripleModel
from/in directory persistenceDirectory
loadRDFBaseModel
in interface ModelFactory<MC extends ModelConfiguration>
ModelCreationException
public <MCImpl extends MC> BaseRDFTripleModel loadRDFBaseModel(String baseuri, String repositoryDirectory) throws ModelCreationException
ModelCreationException
public <MCImpl extends MC> RDFModel loadRDFModel(String baseuri, String repositoryDirectory, MCImpl conf) throws ModelCreationException
ModelFactory
RDFModel
from/in directory persistenceDirectory
loadRDFModel
in interface ModelFactory<MC extends ModelConfiguration>
ModelCreationException
public <MCImpl extends MC> RDFModel loadRDFModel(String baseuri, String repositoryDirectory) throws ModelCreationException
ModelCreationException
public <MCImpl extends MC> RDFSModel loadRDFSModel(String baseuri, String repositoryDirectory, MCImpl conf) throws ModelCreationException
ModelFactory
RDFSModel
from/in directory persistenceDirectory
loadRDFSModel
in interface ModelFactory<MC extends ModelConfiguration>
ModelCreationException
public RDFSModel loadRDFSModel(String baseuri, String repositoryDirectory) throws ModelCreationException
ModelCreationException
public <MCImpl extends MC> OWLModel loadOWLModel(String baseuri, String repositoryDirectory, MCImpl conf) throws ModelCreationException
ModelFactory
OWLModel
from/in directory persistenceDirectory
loadOWLModel
in interface ModelFactory<MC extends ModelConfiguration>
ModelCreationException
public OWLModel loadOWLModel(String baseuri, String repositoryDirectory) throws ModelCreationException
ModelCreationException
public <MCImpl extends MC> SKOSModel loadSKOSModel(String baseuri, String persistenceDirectory, MCImpl conf) throws ModelCreationException
ModelFactory
SKOSModel
from/in directory persistenceDirectory
loadSKOSModel
in interface ModelFactory<MC extends ModelConfiguration>
ModelCreationException
public SKOSModel loadSKOSModel(String baseuri, String repositoryDirectory) throws ModelCreationException
ModelCreationException
public <MCImpl extends MC> SKOSXLModel loadSKOSXLModel(String baseuri, String persistenceDirectory, MCImpl conf) throws ModelCreationException
ModelFactory
SKOSXLModel
from/in directory persistenceDirectory
loadSKOSXLModel
in interface ModelFactory<MC extends ModelConfiguration>
ModelCreationException
public SKOSXLModel loadSKOSXLModel(String baseuri, String repositoryDirectory) throws ModelCreationException
loadSKOSXLModel(String, String, ModelConfiguration)
with a standard
ModelConfiguration
baseuri
- repositoryDirectory
- ModelCreationException
public TripleQueryModelHTTPConnection loadTripleQueryHTTPConnection(String endpointURL) throws ModelCreationException
ModelFactory
endpointURL
loadTripleQueryHTTPConnection
in interface ModelFactory<MC extends ModelConfiguration>
ModelCreationException
public LinkedDataResolver loadLinkedDataResolver()
ModelFactory
loadLinkedDataResolver
in interface ModelFactory<MC extends ModelConfiguration>
public <T extends RDFModel> T loadModel(Class<T> modelClass, String baseuri, String persistenceDirectory, ModelConfiguration conf) throws ModelCreationException
ModelCreationException
public <T extends RDFModel> T loadModel(Class<T> modelClass, String baseuri, String persistenceDirectory) throws ModelCreationException
ModelCreationException
public MC createModelConfigurationObject() throws UnsupportedModelConfigurationException, UnloadableModelConfigurationException
public MC createModelConfigurationObject(File propertyFile) throws UnsupportedModelConfigurationException, BadConfigurationException, IOException, UnloadableModelConfigurationException
createModelConfigurationObject(Class)
: with class set to the first ModelConfiguration
available for the loaded ModelFactory implementationModelConfiguration.loadParameters(File)
: invoked from the modelConfiguration created on the
previous call, on the propertyFile passed as argument of this methodpropertyFile
- UnsupportedModelConfigurationException
BadConfigurationException
IOException
UnloadableModelConfigurationException
public <MCImpl extends MC> MCImpl createModelConfigurationObject(Class<MCImpl> mcclass) throws UnsupportedModelConfigurationException, UnloadableModelConfigurationException
createModelConfigurationObject
in interface ModelFactory<MC extends ModelConfiguration>
UnsupportedModelConfigurationException
UnloadableModelConfigurationException
public <MCImpl extends MC> MCImpl createModelConfigurationObject(Class<MCImpl> mcclass, File propertyFile) throws UnsupportedModelConfigurationException, UnloadableModelConfigurationException, BadConfigurationException, IOException
public Collection<Class<? extends MC>> getModelConfigurations()
getModelConfigurations
in interface ModelFactory<MC extends ModelConfiguration>
public void checkVocabularyData(BaseRDFTripleModel model, Collection<String> namespaces) throws ModelAccessException, IOException, ModelUpdateException, UnsupportedRDFFormatException
namespaces
, if
the vocabulary has not already been loaded in the model by its specific ModelFactory implementationisPopulatingW3CVocabularies()
amounts to true
model
- namespaces
- ModelAccessException
IOException
ModelUpdateException
UnsupportedRDFFormatException
public void checkVocabularyData(BaseRDFTripleModel rep, ARTURIResource vocURI, String vocNS, String prefix, ARTStatement stat, URL vocDataURL) throws ModelAccessException, IOException, ModelUpdateException, UnsupportedRDFFormatException
vocNS
by loading
the rdf file from vocDataURL
isPopulatingW3CVocabularies()
amounts to true
rep
- vocURI
- vocDataURL
- ModelAccessException
IOException
ModelUpdateException
UnsupportedRDFFormatException
public void setPopulatingW3CVocabularies(boolean pref)
ModelFactory
OWLModel
is being createdsetPopulatingW3CVocabularies
in interface ModelFactory<MC extends ModelConfiguration>
public boolean isPopulatingW3CVocabularies()
ModelFactory
OWLModel
is being createdisPopulatingW3CVocabularies
in interface ModelFactory<MC extends ModelConfiguration>
public BaseRDFTripleModel createLightweightRDFModel()
ModelFactory
createLightweightRDFModel
in interface ModelFactory<MC extends ModelConfiguration>
Copyright © 2015 ART Group, University of Rome, Tor Vergata. All Rights Reserved.