public class NdlModel
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NdlModel.LocatorJarURL
Jena does not handle java jar:file: URLs, so we need this locator
|
static class |
NdlModel.ModelType |
| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.String> |
externalSchemas |
static java.lang.String[] |
orcaSchemaFiles |
static java.lang.String[] |
orcaSubstrateFiles |
| Constructor and Description |
|---|
NdlModel() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeModel(com.hp.hpl.jena.ontology.OntModel m)
Close model and remove its disk space
|
static com.hp.hpl.jena.ontology.OntModel |
createModel(com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
Create a blank in-memory model
|
static com.hp.hpl.jena.ontology.OntModel |
createModel(com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
Create a blank model
|
static com.hp.hpl.jena.ontology.OntModel |
getModelFromFile(java.lang.String aFile,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
Get an in-memory model from file.
|
static com.hp.hpl.jena.ontology.OntModel |
getModelFromFile(java.lang.String aFile,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
Get a model from file.
|
static com.hp.hpl.jena.ontology.OntModel |
getModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
Get an in-memory model from specified stream
|
static com.hp.hpl.jena.ontology.OntModel |
getModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
Create a new model.
|
static com.hp.hpl.jena.ontology.OntModel |
getModelFromString(java.lang.String s,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
Initialize and return an in-memory model from RDF/XML String.
|
static com.hp.hpl.jena.ontology.OntModel |
getModelFromString(java.lang.String s,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
Initialize and return a model from RDF/XML String.
|
static com.hp.hpl.jena.ontology.OntModel |
getModelFromTDB(java.lang.String d,
com.hp.hpl.jena.ontology.OntModelSpec s)
Create a TDB backed model from pre-existing store
|
static com.hp.hpl.jena.ontology.OntModelSpec |
getOntModelSpec(com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM) |
static com.hp.hpl.jena.ontology.OntModel |
getRequestModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
Create an in-memory request model.
|
static com.hp.hpl.jena.ontology.OntModel |
getRequestModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
Create a request model.
|
static void |
setGlobalJenaRedirections() |
static void |
setJenaRedirections(com.hp.hpl.jena.ontology.OntDocumentManager dm)
Set common redirections for a specific document manager
|
public static final java.lang.String[] orcaSchemaFiles
public static final java.lang.String[] orcaSubstrateFiles
public static final java.util.Map<java.lang.String,java.lang.String> externalSchemas
public static void setJenaRedirections(com.hp.hpl.jena.ontology.OntDocumentManager dm)
dm - dmpublic static void closeModel(com.hp.hpl.jena.ontology.OntModel m)
m - mpublic static com.hp.hpl.jena.ontology.OntModelSpec getOntModelSpec(com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
public static com.hp.hpl.jena.ontology.OntModel getModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
throws NdlException
modelStream - modelStreamspec - specuniqueDM - - unique document manager (usually yes)t - - in-memory, TDB ephemeral or persistentfolderName - - optionally, the name of the folder where to save TDB (temprorary will be created if null)NdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
throws NdlException
modelStream - modelStreamspec - - model specuniqueDM - - create a unique document manager (usually yes)NdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getModelFromFile(java.lang.String aFile,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
throws NdlException
aFile - aFilespec - specuniqueDM - uniqueDMNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getModelFromFile(java.lang.String aFile,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
throws NdlException
aFile - aFilespec - specuniqueDM - uniqueDMt - - in-memory, TDB persistent or ephemeralfolderName - - for TDBNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getRequestModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
throws NdlException
modelStream - modelStreamspec - specuniqueDM - uniqueDM
- need a unique DocumentManager (usually yes)t - - in-memory, TDB ephemeral or persistentfolderName - - optional name of the folder for TDBNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getRequestModelFromStream(java.io.InputStream modelStream,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
throws NdlException
modelStream - modelStreamspec - specuniqueDM - uniqueDMNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel createModel(com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
throws NdlException
spec - specuniqueDM - uniqueDM
- with unique document managert - - in-memory, TDB persistent or ephemeralfolderName - - optionally (null permitted) specify the name of the folder to store the modelNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel createModel(com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
throws NdlException
spec - specuniqueDM - uniqueDMNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getModelFromString(java.lang.String s,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM)
throws NdlException
s - sspec - specuniqueDM - uniqueDM
- use a unique DMNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getModelFromString(java.lang.String s,
com.hp.hpl.jena.ontology.OntModelSpec spec,
boolean uniqueDM,
NdlModel.ModelType t,
java.lang.String folderName)
throws NdlException
s - sspec - specuniqueDM - - use a unique DMt - ModelType (in-memory, tdb ephemeral or persistent)folderName - for tdb modelsNdlException - in case of errorpublic static com.hp.hpl.jena.ontology.OntModel getModelFromTDB(java.lang.String d,
com.hp.hpl.jena.ontology.OntModelSpec s)
throws NdlException
d - - directory where TDB store iss - - OntModelSpec for the modelNdlException - in case of errorpublic static void setGlobalJenaRedirections()
Copyright © 2018 RENCI. All Rights Reserved.