Java Doc for ModelFactory.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » rdf » model » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.rdf.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.rdf.model.ModelFactoryBase
      com.hp.hpl.jena.rdf.model.ModelFactory

ModelFactory
public class ModelFactory extends ModelFactoryBase (Code)
ModelFactory provides methods for creating standard kinds of Model. (ModelFactoryBase is helper functions for it).

Inner Class :static class ModelRDBMaker extends ModelMakerImpl implements ModelMaker

Field Summary
final public static  ReificationStyleConvenient
     The convenient reification style; quadlets contribute to reified statements, but are invisible to listStatements().
final public static  ReificationStyleMinimal
     The minimal reification style; quadlets do not contribute to reified statements, and are visible to listStatements().
final public static  ReificationStyleStandard
     The standard reification style; quadlets contribute to reified statements, and are visible to listStatements().


Method Summary
public static  ModelassembleModelFrom(Model singleRoot)
     Answer a Model constructed from the single resource in singleRoot of type ja:Model. See the Assembler howto (doc/assembler/assembler-howto.html) for documentation of Assembler descriptions.
public static  ModelassembleModelFrom(Resource root)
     Answer a Model as described the the Assembler specification rooted at the Resource root in its Model.
public static  ModelcreateDefaultModel()
     Answer a fresh Model with the default specification and Standard reification style [reification triples contribute to ReifiedStatements, and are visible to listStatements, etc].
public static  ModelcreateDefaultModel(ReificationStyle style)
    
public static  ModelMakercreateFileModelMaker(String root)
     Answer a ModelMaker that constructs memory-based Models that are backed by files in the root directory.
public static  ModelMakercreateFileModelMaker(String root, ReificationStyle style)
     Answer a ModelMaker that constructs memory-based Models that are backed by files in the root directory.
public static  InfModelcreateInfModel(Reasoner reasoner, Model model)
     Build an inferred model by attaching the given RDF model to the given reasoner.
public static  InfModelcreateInfModel(Reasoner reasoner, Model schema, Model model)
     Build an inferred model by attaching the given RDF model to the given reasoner.
public static  InfModelcreateInfModel(InfGraph g)
     Build an inference model from an InfGraph.
public static  ModelMakercreateMemModelMaker()
     Answer a ModelMaker that constructs memory-based Models that do not persist past JVM termination.
public static  ModelMakercreateMemModelMaker(ReificationStyle style)
     Answer a ModelMaker that constructs memory-based Models that do not persist past JVM termination, with the given reification style.
public static  ModelcreateModelForGraph(Graph g)
     Answer a model that encapsulates the given graph.
public static  ModelMakercreateModelRDBMaker(IDBConnection c)
     Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the usual Standard reification style.
public static  ModelMakercreateModelRDBMaker(IDBConnection c, ReificationStyle style)
     Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the given reification style.
public static  ModelcreateNonreifyingModel()
     construct a new memory-based model that does not capture reification triples (but still handles reifyAs() and .as(ReifiedStatement).
public static  OntModelcreateOntologyModel()
    

Answer a new ontology model which will process in-memory models of ontologies expressed the default ontology language (OWL). The default document manager will be used to load the ontology's included documents.

Note:The default model chosen for OWL, RDFS and DAML+OIL includes a weak reasoner that includes some entailments (such as transitive closure on the sub-class and sub-property hierarchies).

public static  OntModelcreateOntologyModel(String languageURI)
    

Answer a new ontology model which will process in-memory models of ontologies in the given language.

public static  OntModelcreateOntologyModel(OntModelSpec spec, ModelMaker maker, Model base)
    

Answer a new ontology model which will process in-memory models of ontologies expressed the default ontology language (OWL).

public static  OntModelcreateOntologyModel(OntModelSpec spec, Model base)
    

Answer a new ontology model, constructed according to the given ontology model specification, and starting with the ontology data in the given model.


Parameters:
  spec - An ontology model specification object, that will be used to construct the ontologymodel with different options of ontology language, reasoner, document manager and storage model
Parameters:
  base - An existing model to treat as an ontology model, or null.
public static  OntModelcreateOntologyModel(OntModelSpec spec)
     Answer a new ontology model constructed according to the specification, which includes a ModelMaker which will create the necessary base model.
public static  InfModelcreateRDFSModel(Model model)
     Return a Model through which all the RDFS entailments derivable from the given model are accessible.
public static  InfModelcreateRDFSModel(Model schema, Model model)
     Return a Model through which all the RDFS entailments derivable from the given data and schema models are accessible.
public static  IDBConnectioncreateSimpleRDBConnection(String url, String user, String password, String dbType)
     Answer a plain IDBConnection to a database with the given URL, with the given user having the given password.
public static  IDBConnectioncreateSimpleRDBConnection()
    
public static  ModelcreateUnion(Model m1, Model m2)
     Answer a new model that is the dynamic union of two other models.
public static  SetfindAssemblerRoots(Model m)
     Answer a Set of resources present in m that are explicitly or implicitly of type ja:Object, ie, suitable as roots for assemblerModelFrom.
public static  PrefixMappinggetDefaultModelPrefixes()
     Answer the current default model prefixes PrefixMapping object.
public static  PrefixMappingsetDefaultModelPrefixes(PrefixMapping pm)
     Each Model created by ModelFactory has a default set of prefix mappings. These mappings are copied from a (static) default PrefixMapping which is set by setDefaultModelPrefixes.
public static  ModelwithHiddenStatements(Model m)
     Answer a read-only Model with all the statements of this Model and any statements "hidden" by reification.

Field Detail
Convenient
final public static ReificationStyle Convenient(Code)
The convenient reification style; quadlets contribute to reified statements, but are invisible to listStatements().



Minimal
final public static ReificationStyle Minimal(Code)
The minimal reification style; quadlets do not contribute to reified statements, and are visible to listStatements().



Standard
final public static ReificationStyle Standard(Code)
The standard reification style; quadlets contribute to reified statements, and are visible to listStatements().





Method Detail
assembleModelFrom
public static Model assembleModelFrom(Model singleRoot)(Code)
Answer a Model constructed from the single resource in singleRoot of type ja:Model. See the Assembler howto (doc/assembler/assembler-howto.html) for documentation of Assembler descriptions. See also findAssemblerRoots to find the set of possible roots in a description, and assemblerModelFrom(Resource) for assembling a model from its single description.



assembleModelFrom
public static Model assembleModelFrom(Resource root)(Code)
Answer a Model as described the the Assembler specification rooted at the Resource root in its Model. Resource must be of rdf:type ja:Object, where ja is the prefix of Jena Assembler objects.



createDefaultModel
public static Model createDefaultModel()(Code)
Answer a fresh Model with the default specification and Standard reification style [reification triples contribute to ReifiedStatements, and are visible to listStatements, etc].



createDefaultModel
public static Model createDefaultModel(ReificationStyle style)(Code)
Answer a new memory-based model with the given reification style



createFileModelMaker
public static ModelMaker createFileModelMaker(String root)(Code)
Answer a ModelMaker that constructs memory-based Models that are backed by files in the root directory. The Model is loaded from the file when it is opened, and when the Model is closed it is written back. The model is given the Standard reification style.
Parameters:
  root - the name of the directory in which the backing files are held a ModelMaker linked to the files in the root



createFileModelMaker
public static ModelMaker createFileModelMaker(String root, ReificationStyle style)(Code)
Answer a ModelMaker that constructs memory-based Models that are backed by files in the root directory. The Model is loaded from the file when it is opened, and when the Model is closed it is written back.
Parameters:
  root - the name of the directory in which the backing files are held
Parameters:
  style - the desired reification style a ModelMaker linked to the files in the root



createInfModel
public static InfModel createInfModel(Reasoner reasoner, Model model)(Code)
Build an inferred model by attaching the given RDF model to the given reasoner.
Parameters:
  reasoner - the reasoner to use to process the data
Parameters:
  model - the Model containing both instance data and schema assertions to be inferenced over



createInfModel
public static InfModel createInfModel(Reasoner reasoner, Model schema, Model model)(Code)
Build an inferred model by attaching the given RDF model to the given reasoner. This form of the call allows two data sets to be merged and reasoned over - conventionally one contains schema data and one instance data but this is not a formal requirement.
Parameters:
  reasoner - the reasoner to use to process the data
Parameters:
  schema - a Model containing RDFS schema data
Parameters:
  model - a Model containing instance data assertions



createInfModel
public static InfModel createInfModel(InfGraph g)(Code)
Build an inference model from an InfGraph. Graphs and InfGraphs are internal implementation level objects rather than normal user objects so this method should only be used if you are sure this is what you need.
Parameters:
  g - and inference graph the same graph wrapped up as an InfModel



createMemModelMaker
public static ModelMaker createMemModelMaker()(Code)
Answer a ModelMaker that constructs memory-based Models that do not persist past JVM termination. The model has the Standard reification style. a ModelMaker that constructs memory-based models



createMemModelMaker
public static ModelMaker createMemModelMaker(ReificationStyle style)(Code)
Answer a ModelMaker that constructs memory-based Models that do not persist past JVM termination, with the given reification style.
Parameters:
  style - the reification style for the model a ModelMaker that constructs memory-based models



createModelForGraph
public static Model createModelForGraph(Graph g)(Code)
Answer a model that encapsulates the given graph. Existing prefixes are undisturbed.
Parameters:
  g - A graph structure A model presenting an API view of graph g



createModelRDBMaker
public static ModelMaker createModelRDBMaker(IDBConnection c)(Code)
Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the usual Standard reification style.
Parameters:
  c - a connection to the database holding the models a ModelMaker whose Models are held in the database at c



createModelRDBMaker
public static ModelMaker createModelRDBMaker(IDBConnection c, ReificationStyle style)(Code)
Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the given reification style.
Parameters:
  c - a connection to the database holding the models
Parameters:
  style - the desired reification style a ModelMaker whose Models are held in the database at c



createNonreifyingModel
public static Model createNonreifyingModel()(Code)
construct a new memory-based model that does not capture reification triples (but still handles reifyAs() and .as(ReifiedStatement).



createOntologyModel
public static OntModel createOntologyModel()(Code)

Answer a new ontology model which will process in-memory models of ontologies expressed the default ontology language (OWL). The default document manager will be used to load the ontology's included documents.

Note:The default model chosen for OWL, RDFS and DAML+OIL includes a weak reasoner that includes some entailments (such as transitive closure on the sub-class and sub-property hierarchies). Users who want either no inference at all, or alternatively more complete reasoning, should use one of the other createOntologyModel methods that allow the preferred OntModel specification to be stated.

A new ontology model
See Also:   OntModelSpec.getDefaultSpec
See Also:   ModelFactory.createOntologyModel(OntModelSpec,Model)



createOntologyModel
public static OntModel createOntologyModel(String languageURI)(Code)

Answer a new ontology model which will process in-memory models of ontologies in the given language. The default document manager will be used to load the ontology's included documents.


Parameters:
  languageURI - The URI specifying the ontology language we want to process A new ontology model
See Also:   OntModelSpec.getDefaultSpec



createOntologyModel
public static OntModel createOntologyModel(OntModelSpec spec, ModelMaker maker, Model base)(Code)

Answer a new ontology model which will process in-memory models of ontologies expressed the default ontology language (OWL). The default document manager will be used to load the ontology's included documents.


Parameters:
  spec - An ontology model specification that defines the language and reasoner to use
Parameters:
  maker - A model maker that is used to get the initial store for the ontology (unlessthe base model is given),and create addtional stores for the models in the imports closure
Parameters:
  base - The base model, which contains the contents of the ontology to be processed A new ontology model
See Also:   OntModelSpec



createOntologyModel
public static OntModel createOntologyModel(OntModelSpec spec, Model base)(Code)

Answer a new ontology model, constructed according to the given ontology model specification, and starting with the ontology data in the given model.


Parameters:
  spec - An ontology model specification object, that will be used to construct the ontologymodel with different options of ontology language, reasoner, document manager and storage model
Parameters:
  base - An existing model to treat as an ontology model, or null. A new ontology model
See Also:   OntModelSpec



createOntologyModel
public static OntModel createOntologyModel(OntModelSpec spec)(Code)
Answer a new ontology model constructed according to the specification, which includes a ModelMaker which will create the necessary base model.



createRDFSModel
public static InfModel createRDFSModel(Model model)(Code)
Return a Model through which all the RDFS entailments derivable from the given model are accessible. Some work is done when the inferenced model is created but each query will also trigger some additional inference work.
Parameters:
  model - the Model containing both instance data and schema assertions to be inferenced over



createRDFSModel
public static InfModel createRDFSModel(Model schema, Model model)(Code)
Return a Model through which all the RDFS entailments derivable from the given data and schema models are accessible. There is no strict requirement to separate schema and instance data between the two arguments.
Parameters:
  model - a Model containing instance data assertions
Parameters:
  schema - a Model containing RDFS schema data



createSimpleRDBConnection
public static IDBConnection createSimpleRDBConnection(String url, String user, String password, String dbType)(Code)
Answer a plain IDBConnection to a database with the given URL, with the given user having the given password. For more complex ways of forming a connection, see the DBConnection documentation.
Parameters:
  url - the URL of the database
Parameters:
  user - the user name to use to access the database
Parameters:
  password - the password to use. WARNING: open text.
Parameters:
  dbType - the databate type: currently, "Oracle" or "MySQL". the connection
exception:
  quite - possibly



createSimpleRDBConnection
public static IDBConnection createSimpleRDBConnection()(Code)
Answer a plain IDBConnection to a database, with the arguments implicitly supplied by system properties:

The database URL - jena.db.url
The user - jena.db.user, or fails back to "test"
The password - jena.db.password, or fails back to ""
The db type - jena.db.type, or guessed from the URL




createUnion
public static Model createUnion(Model m1, Model m2)(Code)
Answer a new model that is the dynamic union of two other models. By dynamic union, we mean that changes to either m1 or m2 will be reflected in the result model, and vice versa: specifically, additions to and removals from the union will be implemented as operations on m1 only. See also the behaviour of OntModel and the MultiUnion class.

createUnion only creates two-element unions.




findAssemblerRoots
public static Set findAssemblerRoots(Model m)(Code)
Answer a Set of resources present in m that are explicitly or implicitly of type ja:Object, ie, suitable as roots for assemblerModelFrom. Note that the resource objects returned need not have m as their getModel() - they may be members of an extended constructed model.



getDefaultModelPrefixes
public static PrefixMapping getDefaultModelPrefixes()(Code)
Answer the current default model prefixes PrefixMapping object.



setDefaultModelPrefixes
public static PrefixMapping setDefaultModelPrefixes(PrefixMapping pm)(Code)
Each Model created by ModelFactory has a default set of prefix mappings. These mappings are copied from a (static) default PrefixMapping which is set by setDefaultModelPrefixes. It is the reference to a PrefixMapping that is retained, not a copy of it, so a user may set the defaults with this method and continue to modify it; the modifications will appear in the next model to be created.

When a Model is created from an existing Graph, the prefixes of that Graph are not disturbed; only ones not present in the Graph are added.
Parameters:
  pm - the default prefixes to use the previous default prefix mapping




withHiddenStatements
public static Model withHiddenStatements(Model m)(Code)
Answer a read-only Model with all the statements of this Model and any statements "hidden" by reification. That model is dynamic, ie any changes this model will be reflected that one.



Methods inherited from com.hp.hpl.jena.rdf.model.ModelFactoryBase
public static String extractType(String dbURL)(Code)(Java Doc)
protected static String gp(String name)(Code)(Java Doc)
protected static String gp(String name, String ifAbsent)(Code)(Java Doc)
public static boolean guessDBConcurrent()(Code)(Java Doc)
public static String guessDBDriver()(Code)(Java Doc)
public static String guessDBPassword()(Code)(Java Doc)
public static String guessDBType()(Code)(Java Doc)
public static String guessDBURL()(Code)(Java Doc)
public static String guessDBUser()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.