Java Doc for OntModelImpl.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » ontology » impl » 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.ontology.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.enhanced.Polymorphic
      com.hp.hpl.jena.enhanced.EnhGraph
         com.hp.hpl.jena.rdf.model.impl.ModelCom
            com.hp.hpl.jena.ontology.impl.OntModelImpl

OntModelImpl
public class OntModelImpl extends ModelCom implements OntModel(Code)

Implementation of a model that can process general ontologies in OWL, DAML and similar languages.


author:
   Ian Dickinson, HP Labs
author:
   (email)
version:
   CVS $Id: OntModelImpl.java,v 1.106 2008/01/28 15:51:48 chris-dollin Exp $

Inner Class :protected class SubjectNodeAs implements Map1
Inner Class :protected class SubjectNodeCanAs extends Filter
Inner Class :protected class GetBinding implements Map1
Inner Class :protected class RdfTypeTestFn implements RDFList.ReduceFn
Inner Class :protected class ImportsListener extends StatementListener

Field Summary
protected  Setm_imported
    
protected  ImportsListenerm_importsListener
    
protected  OntEventManagerm_ontEventMgr
    
protected  OntModelSpecm_spec
    
protected  booleanm_strictMode
    
protected  MultiUnionm_union
    
public static  StringowlSyntaxCheckerClassName
     This variable is how the OntModel knows how to construct a syntax checker.

Constructor Summary
public  OntModelImpl(OntModelSpec spec, Model model)
    

Construct a new ontology model, using the given model as a base.

public  OntModelImpl(OntModelSpec spec)
     Construct a new ontology model from the given specification.

Method Summary
public  voidaddLoadedImport(String uri)
    

Record that this model has now imported the document with the given URI, so that it will not be re-imported in the future.

public  voidaddSubModel(Model model)
    

Add the given model as one of the sub-models of the enclosed ontology union model. Note that if model is a composite model (i.e.

public  voidaddSubModel(Model model, boolean rebind)
    

Add the given model as one of the sub-models of the enclosed ontology union model. Note that if model is a composite model (i.e.

protected  voidcheckListMembersRdfType(RDFList list, Resource rdfType)
    
protected  voidcheckProfileEntry(Object profileTerm, String desc)
    
public  intcountSubModels()
    
public  AllDifferentcreateAllDifferent()
    

Answer a new, anonymous node representing the fact that a given set of classes are all pair-wise distinct.

public  AllDifferentcreateAllDifferent(RDFList differentMembers)
    

Answer a new, anonymous node representing the fact that a given set of classes are all pair-wise distinct.

public  AllValuesFromRestrictioncreateAllValuesFromRestriction(String uri, Property prop, Resource cls)
    
public  AnnotationPropertycreateAnnotationProperty(String uri)
    

Answer a resource that represents an annotation property in this model.

public  CardinalityQRestrictioncreateCardinalityQRestriction(String uri, Property prop, int cardinality, OntClass cls)
    
public  CardinalityRestrictioncreateCardinalityRestriction(String uri, Property prop, int cardinality)
    
public  OntClasscreateClass()
    

Answer a resource that represents an anonymous class description in this model.

public  OntClasscreateClass(String uri)
    

Answer a resource that represents a class description node in this model.

public  ComplementClasscreateComplementClass(String uri, Resource cls)
    
public  DataRangecreateDataRange(RDFList literals)
    

Answer a data range defined as the given set of concrete data values.

public  DatatypePropertycreateDatatypeProperty(String uri)
    

Answer a resource that represents datatype property in this model, and that is not a functional property.


Parameters:
  uri - The uri for the datatype property.
public  DatatypePropertycreateDatatypeProperty(String uri, boolean functional)
    

Answer a resource that represents datatype property in this model.

public  EnumeratedClasscreateEnumeratedClass(String uri, RDFList members)
    
public  HasValueRestrictioncreateHasValueRestriction(String uri, Property prop, RDFNode value)
    
public  IndividualcreateIndividual(Resource cls)
    

Answer a resource that represents an Indvidual node in this model.

public  IndividualcreateIndividual(String uri, Resource cls)
    

Answer a resource that represents an Individual node in this model.

public  IntersectionClasscreateIntersectionClass(String uri, RDFList members)
    
public  InverseFunctionalPropertycreateInverseFunctionalProperty(String uri)
    

Answer a resource representing an inverse functional property


Parameters:
  uri - The uri for the property.
public  InverseFunctionalPropertycreateInverseFunctionalProperty(String uri, boolean functional)
    

Answer a resource representing an inverse functional property, which is optionally also functional.


Parameters:
  uri - The uri for the property.
public  RDFListcreateList()
    

Answer a new empty list.

public  MaxCardinalityQRestrictioncreateMaxCardinalityQRestriction(String uri, Property prop, int cardinality, OntClass cls)
    
public  MaxCardinalityRestrictioncreateMaxCardinalityRestriction(String uri, Property prop, int cardinality)
    
public  MinCardinalityQRestrictioncreateMinCardinalityQRestriction(String uri, Property prop, int cardinality, OntClass cls)
    
public  MinCardinalityRestrictioncreateMinCardinalityRestriction(String uri, Property prop, int cardinality)
    
public  ObjectPropertycreateObjectProperty(String uri)
    

Answer a resource representing an object property in this model, and that is not a functional property.


Parameters:
  uri - The uri for the object property.
public  ObjectPropertycreateObjectProperty(String uri, boolean functional)
    

Answer a resource that represents an object property in this model.

public  OntPropertycreateOntProperty(String uri)
    

Answer a resource representing an generic property in this model.

public  OntResourcecreateOntResource(Class javaClass, Resource rdfType, String uri)
    

Answer a resource that represents a generic ontology node in this model.

public  OntResourcecreateOntResource(String uri)
    
public  OntologycreateOntology(String uri)
    

Answer a resource that represents an ontology description node in this model.

public  RestrictioncreateRestriction(Property p)
    

Answer a resource that represents an anonymous property restriction in this model.

public  RestrictioncreateRestriction(String uri, Property p)
    

Answer a resource that represents a property restriction in this model.

public  SomeValuesFromRestrictioncreateSomeValuesFromRestriction(String uri, Property prop, Resource cls)
    
public  SymmetricPropertycreateSymmetricProperty(String uri)
    

Answer a resource representing a symmetric property


Parameters:
  uri - The uri for the property.
public  SymmetricPropertycreateSymmetricProperty(String uri, boolean functional)
    

Answer a resource representing a symmetric property, which is optionally also functional.


Parameters:
  uri - The uri for the property.
public  TransitivePropertycreateTransitiveProperty(String uri)
    

Answer a resource representing a transitive property


Parameters:
  uri - The uri for the property.
public  TransitivePropertycreateTransitiveProperty(String uri, boolean functional)
    

Answer a resource representing a transitive property, which is optionally also functional.

public  UnionClasscreateUnionClass(String uri, RDFList members)
    
protected  ExtendedIteratorfindByDefiningProperty(Property p)
    
protected  ExtendedIteratorfindByDefiningPropertyAs(Property p, Class asKey)
    

Answer an iterator over nodes that have p as a subject, presented as polymorphic enh resources of the given facet.

protected  ExtendedIteratorfindByType(Resource type)
    

Answer an iterator over all of the resources that have rdf:type type.

protected  ExtendedIteratorfindByType(Resource type, Iterator alternates)
    

Answer an iterator over all of the resources that have rdf:type type, or optionally, one of the alternative types.

protected  ExtendedIteratorfindByTypeAs(Resource type, Iterator types, Class asKey)
    

Answer an iterator over all of the resources that have rdf:type type, or optionally, one of the alternative types, and present the results as() the given class.

protected  ExtendedIteratorfindByTypeAs(Iterator types, Class asKey)
    

Answer an iterator over all of the resources that has an rdf:type from the types iterator, and present the results as() the given class.


Parameters:
  types - An iterator over types to search for.
protected  ExtendedIteratorfindByTypeAs(Resource type, Class asKey)
    

Answer an iterator over resources with the given rdf:type; for each value in the iterator, ensure that is is presented as() the polymorphic object denoted by the given class key.

protected  ResourcefindByURIAs(String uri, Class asKey)
    
public  AllValuesFromRestrictiongetAllValuesFromRestriction(String uri)
    

Answer a class description defined as the class of those individuals for which all values of the given property belong to the given class.

public  AnnotationPropertygetAnnotationProperty(String uri)
    

Answer a resource that represents an annotation property in this model.

public  GraphgetBaseGraph()
    

Answer the base-graph of this model.

public  ModelgetBaseModel()
    

Answer the base model of this model.

public  CardinalityQRestrictiongetCardinalityQRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have a property p, with cardinality N, all values of which are members of a given class.

public  CardinalityRestrictiongetCardinalityRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have exactly the given number of values for the given property.

public  ComplementClassgetComplementClass(String uri)
    

Answer a resource representing the class that is the complement of another class.

public  DatatypePropertygetDatatypeProperty(String uri)
    

Answer a resource that represents datatype property in this model.

public  ModelgetDeductionsModel()
    

Returns a derivations model.

public  IteratorgetDerivation(Statement statement)
     Return the derivation of the given statement (which should be the result of some previous list operation).
public  OntDocumentManagergetDocumentManager()
    

Answer a reference to the document manager that this model is using to manage ontology <-> mappings, and to load the imports closure.

public  booleangetDynamicImports()
    
public  EnumeratedClassgetEnumeratedClass(String uri)
    

Answer a resource representing the class that is the enumeration of a list of individuals.

public  OntEventManagergetEventManager()
    

Answer the ontology event manager attached to this model.

public  HasValueRestrictiongetHasValueRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have the given resource as the value of the given property.

public  ModelMakergetImportModelMaker()
    

Answer the model maker associated with this model (used for constructing the constituent models of the imports closure).

public  OntModelgetImportedModel(String uri)
    

Answer an OntModel representing the imported ontology with the given URI.

public  IndividualgetIndividual(String uri)
    

Answer a resource that represents an Individual node in this model.

public  IntersectionClassgetIntersectionClass(String uri)
    

Answer a resource representing the class that is the intersection of a list of class descriptions.

public  InverseFunctionalPropertygetInverseFunctionalProperty(String uri)
    

Answer a resource representing an inverse functional property.

public  MaxCardinalityQRestrictiongetMaxCardinalityQRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have a property p, with max cardinality N, all values of which are members of a given class.

public  MaxCardinalityRestrictiongetMaxCardinalityRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have at most the given number of values for the given property.

public  MinCardinalityQRestrictiongetMinCardinalityQRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have a property p, with min cardinality N, all values of which are members of a given class.

public  MinCardinalityRestrictiongetMinCardinalityRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have at least the given number of values for the given property.

public  ModelMakergetModelMaker()
    
public  ResourcegetOWLLanguageLevel(List problems)
    

If this OntModel is presenting an OWL model, answer the minimum OWL language level that the constructs used in this model lie entirely within.

public  ObjectPropertygetObjectProperty(String uri)
    

Answer a resource representing an object property in this model.

public  OntClassgetOntClass(String uri)
    

Answer a resource that represents a class description node in this model.

public  OntPropertygetOntProperty(String uri)
    

Answer a resource representing an generic property in this model.

public  OntResourcegetOntResource(String uri)
    

Answer a resource presenting the OntResource facet, which has the given URI.

public  OntResourcegetOntResource(Resource res)
    
public  OntologygetOntology(String uri)
    

Answer a resource that represents an ontology description node in this model.

public  ProfilegetProfile()
    

Answer the language profile (for example, OWL or DAML+OIL) that this model is working to.

public  QualifiedRestrictiongetQualifiedRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have a property p, all values of which are members of a given class.

public  ModelgetRawModel()
     Return the raw RDF model being processed (i.e.
public  ReasonergetReasoner()
     Return the Reasoner which is being used to answer queries to this graph.
protected  ResourcegetResourceWithType(String uri, Resource rdfType)
    

Answer the resource with the given uri and that optionally has the given rdf:type, creating the resource if necessary.

public  RestrictiongetRestriction(String uri)
    

Answer a resource that represents a property restriction in this model.

public  SomeValuesFromRestrictiongetSomeValuesFromRestriction(String uri)
    

Answer a class description defined as the class of those individuals that have at least one property with a value belonging to the given class.

public  OntModelSpecgetSpecification()
    
public  ListgetSubGraphs()
    

Answer the sub-graphs of this model.

public  SymmetricPropertygetSymmetricProperty(String uri)
    

Answer a resource representing a symmetric property.

public  TransitivePropertygetTransitiveProperty(String uri)
    

Answer a resource representing a transitive property.

public  UnionClassgetUnionClass(String uri)
    

Answer a resource representing the class that is the union of a list of class desctiptions.

protected  MultiUniongetUnionGraph()
    
public  booleanhasLoadedImport(String uri)
    

Answer true if this model has had the given URI document imported into it.

public  booleanisInBaseModel(RDFNode node)
    

Answer true if the given node is a member of the base model of this ontology model. This is an important distiction, because only the base model receives updates when the ontology model is updated.

public  booleanisInBaseModel(Statement stmt)
    

Answer true if the given statement is defined in the base model of this ontology model. This is an important distiction, because only the base model receives updates when the ontology model is updated.

public  ExtendedIteratorlistAllDifferent()
    

Answer an iterator that ranges over the nodes that denote pair-wise disjointness between sets of classes.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  ExtendedIteratorlistAllOntProperties()
    

Answer an iterator over all of the ontology properties in this model, including object properties, datatype properties, annotation properties, etc.

public  ExtendedIteratorlistAnnotationProperties()
    

Answer an iterator that ranges over the properties in this model that are declared to be annotation properties.

public  ExtendedIteratorlistClasses()
    

Answer an iterator that ranges over all of the various forms of class description resource in this model.

public  ExtendedIteratorlistComplementClasses()
    

Answer an iterator that ranges over the complement class-descriptions in this model, i.e. the class resources specified to have a property complementOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  ExtendedIteratorlistDataRanges()
    
public  ExtendedIteratorlistDatatypeProperties()
    

Answer an iterator that ranges over the datatype property resources in this model, i.e. the resources with rdf:type DatatypeProperty or equivalent.

public  ExtendedIteratorlistEnumeratedClasses()
    

Answer an iterator that ranges over the enumerated class class-descriptions in this model, i.e. the class resources specified to have a property oneOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  ExtendedIteratorlistFunctionalProperties()
    

Answer an iterator that ranges over the functional property resources in this model, i.e. the resources with rdf:type FunctionalProperty or equivalent.

public  ExtendedIteratorlistHierarchyRootClasses()
    

Answer an iterator over the classes in this ontology model that represent the uppermost nodes of the class hierarchy.

public  ExtendedIteratorlistImportedModels()
    

Answer an iterator over the ontologies that this ontology imports, each of which will have been wrapped as an ontology model using the same OntModelSpec as this model.

public  SetlistImportedOntologyURIs()
    

Answer a list of the imported URI's in this ontology model.

public  SetlistImportedOntologyURIs(boolean closure)
    

Answer a list of the imported URI's in this ontology model, and optionally in the closure of this model's imports.

public  ExtendedIteratorlistIndividuals()
    

Answer an iterator that ranges over the individual resources in this model, i.e. the resources with rdf:type corresponding to a class defined in the ontology.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  ExtendedIteratorlistIndividuals(Resource cls)
    

Answer an iterator that ranges over the resources in this model that are instances of the given class.

public  ExtendedIteratorlistIntersectionClasses()
    

Answer an iterator that ranges over the intersection class-descriptions in this model, i.e. the class resources specified to have a property intersectionOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  ExtendedIteratorlistInverseFunctionalProperties()
    

Answer an iterator that ranges over the inverse functional property resources in this model, i.e. the resources with rdf:type InverseFunctionalProperty or equivalent.

public  ExtendedIteratorlistNamedClasses()
    

Answer an iterator that ranges over the named class-descriptions in this model, i.e. resources with rdf:type Class (or equivalent) and a node URI.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  ExtendedIteratorlistObjectProperties()
    

Answer an iterator that ranges over the object property resources in this model, i.e. the resources with rdf:type ObjectProperty or equivalent.

public  ExtendedIteratorlistOntProperties()
    

Answer an iterator that ranges over the property resources in this model, i.e. the resources with rdf:type Property or equivalent.

public  ExtendedIteratorlistOntologies()
    

Answer an iterator that ranges over the ontology resources in this model, i.e. the resources with rdf:type Ontology or equivalent.

public  ExtendedIteratorlistRestrictions()
    

Answer an iterator that ranges over the property restriction class-descriptions in this model, i.e. resources with rdf:type Restriction (or equivalent).

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  StmtIteratorlistStatements(Resource subject, Property predicate, RDFNode object, Model posit)
     Find all the statements matching a pattern.

Return an iterator over all the statements in a model that match a pattern.

public  ExtendedIteratorlistSubModels(boolean withImports)
    

Answer an iterator over the ontology models that are sub-models of this model.

public  ExtendedIteratorlistSubModels()
    

Answer an iterator over the ontology models that are sub-models of this model.

public  ExtendedIteratorlistSymmetricProperties()
    

Answer an iterator that ranges over the symmetric property resources in this model, i.e. the resources with rdf:type SymmetricProperty or equivalent.

public  ExtendedIteratorlistTransitiveProperties()
    

Answer an iterator that ranges over the transitive property resources in this model, i.e. the resources with rdf:type TransitiveProperty or equivalent.

public  ExtendedIteratorlistUnionClasses()
    

Answer an iterator that ranges over the union class-descriptions in this model, i.e. the class resources specified to have a property unionOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph.

public  voidloadImports()
    

Determine which models this model imports (by looking for, for example, owl:imports statements, and load each of those models as an import.

public  voidprepare()
     Perform any initial processing and caching.
public  ExtendedIteratorqueryFor(BindingQueryPlan query, List altQueries, Class asKey)
    

Answer the iterator over the resources from the graph that satisfy the given query, followed by the answers to the alternative queries (if specified).

protected  BindingQueryPlanqueryXTypeOfType(Resource type)
    

Answer a binding query that will search for 'an X that has an rdf:type whose rdf:type is C' for some given resource C.

public  Modelread(String uri)
    
public  Modelread(Reader reader, String base)
    
public  Modelread(InputStream reader, String base)
    
public  Modelread(String uri, String syntax)
    
public  Modelread(String uri, String base, String syntax)
    
public  Modelread(Reader reader, String base, String syntax)
    
public  Modelread(InputStream reader, String base, String syntax)
    
public  voidrebind()
     Cause the inference model to reconsult the underlying data to take into account changes.
public  voidremoveLoadedImport(String uri)
    

Record that this model no longer imports the document with the given URI.

public  voidremoveSubModel(Model model)
    

Remove the given model as one of the sub-models of the enclosed ontology union model.

public  voidremoveSubModel(Model model, boolean rebind)
    

Remove the given model as one of the sub-models of the enclosed ontology union model.

public  voidreset()
     Reset any internal caches.
public  voidsetDerivationLogging(boolean logOn)
     Switch on/off drivation logging.
public  voidsetDynamicImports(boolean dynamic)
    

Set the flag that controls whether adding or removing imports statements into the model will result in the imports closure changing dynamically.


Parameters:
  dynamic - If true, adding or removing an imports statement to themodel will result in a change in the imports closure.
public  voidsetStrictMode(boolean strict)
    

Set the checking mode to strict or non-strict.

public  booleanstrictMode()
    

Answer true if this model is currently in strict checking mode.

public  ValidityReportvalidate()
     Test the consistency of the underlying data.
public  Modelwrite(Writer writer)
    
public  Modelwrite(Writer writer, String lang)
    
public  Modelwrite(Writer writer, String lang, String base)
    
public  Modelwrite(OutputStream out)
    
public  Modelwrite(OutputStream out, String lang)
    
public  Modelwrite(OutputStream out, String lang, String base)
    
public  ModelwriteAll(Writer writer, String lang, String base)
    
public  ModelwriteAll(OutputStream out, String lang, String base)
    

Field Detail
m_imported
protected Set m_imported(Code)
List of URI strings of documents that have been imported into this one



m_importsListener
protected ImportsListener m_importsListener(Code)
The listener that detects dynamically added or removed imports statements



m_ontEventMgr
protected OntEventManager m_ontEventMgr(Code)
The event manager for ontology events on this model



m_spec
protected OntModelSpec m_spec(Code)
The model specification this model is using to define its structure



m_strictMode
protected boolean m_strictMode(Code)
Mode switch for strict checking mode



m_union
protected MultiUnion m_union(Code)
The union graph that contains the imports closure - there is always one of these, which may also be _the_ graph for the model



owlSyntaxCheckerClassName
public static String owlSyntaxCheckerClassName(Code)
This variable is how the OntModel knows how to construct a syntax checker. This part of the design may change.




Constructor Detail
OntModelImpl
public OntModelImpl(OntModelSpec spec, Model model)(Code)

Construct a new ontology model, using the given model as a base. The document manager given in the specification object will be used to build the imports closure of the model if its policy permits.


Parameters:
  model - The base model that may contain existing statements for the ontology.if it is null, a fresh model is created as the base.
Parameters:
  spec - A specification object that allows us to specify parameters and structure for theontology model to be constructed.



OntModelImpl
public OntModelImpl(OntModelSpec spec)(Code)
Construct a new ontology model from the given specification. The base model is produced using the baseModelMaker.




Method Detail
addLoadedImport
public void addLoadedImport(String uri)(Code)

Record that this model has now imported the document with the given URI, so that it will not be re-imported in the future.


Parameters:
  uri - A document URI that has now been imported into the model.



addSubModel
public void addSubModel(Model model)(Code)

Add the given model as one of the sub-models of the enclosed ontology union model. Note that if model is a composite model (i.e. an OntModel or InfModel ), the model and all of its submodels will be added to the union of sub-models of this model. If this is not required, callers should explicitly add only the base model:

 parent.addSubModel( child.getBaseModel() );
 

Parameters:
  model - A sub-model to add



addSubModel
public void addSubModel(Model model, boolean rebind)(Code)

Add the given model as one of the sub-models of the enclosed ontology union model. Note that if model is a composite model (i.e. an OntModel or InfModel ), the model and all of its submodels will be added to the union of sub-models of this model. If this is not required, callers should explicitly add only the base model:

 parent.addSubModel( child.getBaseModel(), true );
 

Parameters:
  model - A sub-model to add
Parameters:
  rebind - If true, rebind any associated inferencing engine to the new data (whichmay be an expensive operation)



checkListMembersRdfType
protected void checkListMembersRdfType(RDFList list, Resource rdfType)(Code)

Check that every member of the given list has the given rdf:type, and throw an exception if not.


Parameters:
  list - The list to be checked
Parameters:
  rdfType - The rdf:type value to check for
exception:
  LanguageConsistencyException - if any member of the list does not have rdf:type rdfType



checkProfileEntry
protected void checkProfileEntry(Object profileTerm, String desc)(Code)

Throw an OntologyException if the term is not in language profile


Parameters:
  profileTerm - The entry from the profile
Parameters:
  desc - A label for the profile term
exception:
  OntologyException - if profileTerm is null.



countSubModels
public int countSubModels()(Code)

Answer the number of sub-models of this model, not including the base model.

The number of sub-models, ≥ zero.



createAllDifferent
public AllDifferent createAllDifferent()(Code)

Answer a new, anonymous node representing the fact that a given set of classes are all pair-wise distinct. AllDifferent is a feature of OWL only, and is something of an anomoly in that it exists only to give a place to anchor the distinctMembers property, which is the actual expression of the fact.

A new AllDifferent resource



createAllDifferent
public AllDifferent createAllDifferent(RDFList differentMembers)(Code)

Answer a new, anonymous node representing the fact that a given set of classes are all pair-wise distinct. AllDifferent is a feature of OWL only, and is something of an anomoly in that it exists only to give a place to anchor the distinctMembers property, which is the actual expression of the fact.


Parameters:
  differentMembers - A list of the class expressions that denote a set of mutually disjoint classes A new AllDifferent resource



createAllValuesFromRestriction
public AllValuesFromRestriction createAllValuesFromRestriction(String uri, Property prop, Resource cls)(Code)

Answer a class description defined as the class of those individuals for which all values of the given property belong to the given class


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cls - The class to which any value of the property belongs A new resource representing an all-values-from restriction



createAnnotationProperty
public AnnotationProperty createAnnotationProperty(String uri)(Code)

Answer a resource that represents an annotation property in this model. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.


Parameters:
  uri - The uri for the annotation property. An AnnotationProperty resource.



createCardinalityQRestriction
public CardinalityQRestriction createCardinalityQRestriction(String uri, Property prop, int cardinality, OntClass cls)(Code)

Answer a class description defined as the class of those individuals that have exactly the given number of values for the given property, all values of which belong to the given class.


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cardinality - The cardinality of the property
Parameters:
  cls - The class to which all values of the restricted property should belong A new resource representing a mas-cardinality restriction



createCardinalityRestriction
public CardinalityRestriction createCardinalityRestriction(String uri, Property prop, int cardinality)(Code)

Answer a class description defined as the class of those individuals that have exactly the given number of values for the given property.


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cardinality - The exact cardinality of the property A new resource representing a has-value restriction



createClass
public OntClass createClass()(Code)

Answer a resource that represents an anonymous class description in this model. A new anonymous resource of rdf:type C, where C is the class type from the language profile.

An anonymous Class resource.



createClass
public OntClass createClass(String uri)(Code)

Answer a resource that represents a class description node in this model. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.


Parameters:
  uri - The uri for the class node, or null for an anonymous class. A Class resource.



createComplementClass
public ComplementClass createComplementClass(String uri, Resource cls)(Code)

Answer a resource representing the class that is the complement of the given argument class


Parameters:
  uri - The URI of the new complement class, or null for an anonymous class description.
Parameters:
  cls - Resource denoting the class that the new class is a complement of A complement class



createDataRange
public DataRange createDataRange(RDFList literals)(Code)

Answer a data range defined as the given set of concrete data values. DataRange resources are necessarily bNodes.


Parameters:
  literals - An iterator over a set of literals that will be the members of the data range,or null to define an empty data range A new data range containing the given literals as permissible values



createDatatypeProperty
public DatatypeProperty createDatatypeProperty(String uri)(Code)

Answer a resource that represents datatype property in this model, and that is not a functional property.


Parameters:
  uri - The uri for the datatype property. May not be null. A DatatypeProperty resource.
See Also:   OntModelImpl.createDatatypeProperty(String,boolean)



createDatatypeProperty
public DatatypeProperty createDatatypeProperty(String uri, boolean functional)(Code)

Answer a resource that represents datatype property in this model. A datatype property is defined to have a range that is a concrete datatype, rather than an individual. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.


Parameters:
  uri - The uri for the datatype property. May not be null.
Parameters:
  functional - If true, the resource will also be typed as a FunctionalProperty,that is, a property that has a unique range value for any given domain value. A DatatypeProperty resource.



createEnumeratedClass
public EnumeratedClass createEnumeratedClass(String uri, RDFList members)(Code)

Answer a resource representing the class that is the enumeration of the given list of individuals


Parameters:
  uri - The URI of the new enumeration class, or null for an anonymous class description.
Parameters:
  members - An optional list of resources denoting the individuals in the enumeration An enumeration class



createHasValueRestriction
public HasValueRestriction createHasValueRestriction(String uri, Property prop, RDFNode value)(Code)

Answer a class description defined as the class of those individuals that have the given resource as the value of the given property


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  value - The value of the property, as a resource or RDF literal A new resource representing a has-value restriction



createIndividual
public Individual createIndividual(Resource cls)(Code)

Answer a resource that represents an Indvidual node in this model. A new anonymous resource will be created in the updateable sub-graph of the ontology model.


Parameters:
  cls - Resource representing the ontology class to which the individual belongs A new anoymous Individual of the given class.



createIndividual
public Individual createIndividual(String uri, Resource cls)(Code)

Answer a resource that represents an Individual node in this model. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.


Parameters:
  cls - Resource representing the ontology class to which the individual belongs
Parameters:
  uri - The uri for the individual, or null for an anonymous individual. An Individual resource.



createIntersectionClass
public IntersectionClass createIntersectionClass(String uri, RDFList members)(Code)

Answer a resource representing the class that is the intersection of the given list of class descriptions.


Parameters:
  uri - The URI of the new intersection class, or null for an anonymous class description.
Parameters:
  members - A list of resources denoting the classes that comprise the intersection An intersection class description



createInverseFunctionalProperty
public InverseFunctionalProperty createInverseFunctionalProperty(String uri)(Code)

Answer a resource representing an inverse functional property


Parameters:
  uri - The uri for the property. May not be null. An InverseFunctionalProperty resource
See Also:   OntModelImpl.createInverseFunctionalProperty(String,boolean)



createInverseFunctionalProperty
public InverseFunctionalProperty createInverseFunctionalProperty(String uri, boolean functional)(Code)

Answer a resource representing an inverse functional property, which is optionally also functional.


Parameters:
  uri - The uri for the property. May not be null.
Parameters:
  functional - If true, the property is also functional An InverseFunctionalProperty resource, optionally also functional.



createList
public RDFList createList()(Code)

Answer a new empty list. This method overrides the list create method in ModelCom, to allow both DAML and RDFS lists to be created.

An RDF-encoded list of no elements, using the current language profile



createMaxCardinalityQRestriction
public MaxCardinalityQRestriction createMaxCardinalityQRestriction(String uri, Property prop, int cardinality, OntClass cls)(Code)

Answer a class description defined as the class of those individuals that have at most the given number of values for the given property, all values of which belong to the given class.


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cardinality - The maximum cardinality of the property
Parameters:
  cls - The class to which all values of the restricted property should belong A new resource representing a mas-cardinality restriction



createMaxCardinalityRestriction
public MaxCardinalityRestriction createMaxCardinalityRestriction(String uri, Property prop, int cardinality)(Code)

Answer a class description defined as the class of those individuals that have at most the given number of values for the given property.


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cardinality - The maximum cardinality of the property A new resource representing a mas-cardinality restriction



createMinCardinalityQRestriction
public MinCardinalityQRestriction createMinCardinalityQRestriction(String uri, Property prop, int cardinality, OntClass cls)(Code)

Answer a class description defined as the class of those individuals that have at least the given number of values for the given property, all values of which belong to the given class.


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cardinality - The minimun cardinality of the property
Parameters:
  cls - The class to which all values of the restricted property should belong A new resource representing a mas-cardinality restriction



createMinCardinalityRestriction
public MinCardinalityRestriction createMinCardinalityRestriction(String uri, Property prop, int cardinality)(Code)

Answer a class description defined as the class of those individuals that have at least the given number of values for the given property.


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cardinality - The minimum cardinality of the property A new resource representing a min-cardinality restriction



createObjectProperty
public ObjectProperty createObjectProperty(String uri)(Code)

Answer a resource representing an object property in this model, and that is not a functional property.


Parameters:
  uri - The uri for the object property. May not be null. An ObjectProperty resource.
See Also:   OntModelImpl.createObjectProperty(String,boolean)



createObjectProperty
public ObjectProperty createObjectProperty(String uri, boolean functional)(Code)

Answer a resource that represents an object property in this model. An object property is defined to have a range of individuals, rather than datatypes. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.


Parameters:
  uri - The uri for the object property. May not be null.
Parameters:
  functional - If true, the resource will also be typed as a FunctionalProperty,that is, a property that has a unique range value for any given domain value. An ObjectProperty resource, optionally also functional.



createOntProperty
public OntProperty createOntProperty(String uri)(Code)

Answer a resource representing an generic property in this model. Effectively this method is an alias for OntModelImpl.createProperty(String) , except that the return type is OntProperty , which allow more convenient access to a property's position in the property hierarchy, domain, range, etc.


Parameters:
  uri - The uri for the property. May not be null. An OntProperty resource.



createOntResource
public OntResource createOntResource(Class javaClass, Resource rdfType, String uri)(Code)

Answer a resource that represents a generic ontology node in this model. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.

This is a generic method for creating any known ontology value. The selector that determines which resource to create is the same as as the argument to the RDFNode.as as() method: the Java class object of the desired abstraction. For example, to create an ontology class via this mechanism, use:

 OntClass c = (OntClass) myModel.createOntResource( OntClass.class, null,
 "http://example.org/ex#Parrot" );
 


Parameters:
  javaClass - The Java class object that represents the ontology abstraction to create
Parameters:
  rdfType - Optional resource denoting the ontology class to which an individual oraxiom belongs, if that is the type of resource being created.
Parameters:
  uri - The uri for the ontology resource, or null for an anonymous resource. An ontology resource, of the type specified by the javaClass



createOntResource
public OntResource createOntResource(String uri)(Code)

Answer a resource presenting the OntResource facet, which has the given URI.


Parameters:
  uri - The URI of the resource, or null for an anonymous resource (aka bNode) An OntResource with the given URI



createOntology
public Ontology createOntology(String uri)(Code)

Answer a resource that represents an ontology description node in this model. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.


Parameters:
  uri - The uri for the ontology node. Conventionally, this corresponds to the base URIof the document itself. An Ontology resource.



createRestriction
public Restriction createRestriction(Property p)(Code)

Answer a resource that represents an anonymous property restriction in this model. A new anonymous resource of rdf:type R, where R is the restriction type from the language profile.


Parameters:
  p - The property that is restricted by this restriction An anonymous Restriction resource.



createRestriction
public Restriction createRestriction(String uri, Property p)(Code)

Answer a resource that represents a property restriction in this model. If a resource with the given uri exists in the model, it will be re-used. If not, a new one is created in the updateable sub-graph of the ontology model.


Parameters:
  uri - The uri for the restriction node, or null for an anonymous restriction.
Parameters:
  p - The property that is restricted by this restriction A Restriction resource.



createSomeValuesFromRestriction
public SomeValuesFromRestriction createSomeValuesFromRestriction(String uri, Property prop, Resource cls)(Code)

Answer a class description defined as the class of those individuals that have at least one property with a value belonging to the given class


Parameters:
  uri - The optional URI for the restriction, or null for an anonymous restriction (whichshould be the normal case)
Parameters:
  prop - The property the restriction applies to
Parameters:
  cls - The class to which at least one value of the property belongs A new resource representing a some-values-from restriction



createSymmetricProperty
public SymmetricProperty createSymmetricProperty(String uri)(Code)

Answer a resource representing a symmetric property


Parameters:
  uri - The uri for the property. May not be null. An SymmetricProperty resource
See Also:   OntModelImpl.createSymmetricProperty(String,boolean)



createSymmetricProperty
public SymmetricProperty createSymmetricProperty(String uri, boolean functional)(Code)

Answer a resource representing a symmetric property, which is optionally also functional.


Parameters:
  uri - The uri for the property. May not be null.
Parameters:
  functional - If true, the property is also functional An SymmetricProperty resource, optionally also functional.



createTransitiveProperty
public TransitiveProperty createTransitiveProperty(String uri)(Code)

Answer a resource representing a transitive property


Parameters:
  uri - The uri for the property. May not be null. An TransitiveProperty resource
See Also:   OntModelImpl.createTransitiveProperty(String,boolean)



createTransitiveProperty
public TransitiveProperty createTransitiveProperty(String uri, boolean functional)(Code)

Answer a resource representing a transitive property, which is optionally also functional. Note: although it is permitted in OWL full to have functional transitive properties, it makes the language undecideable. Functional transitive properties are not permitted in OWL Lite or OWL DL.


Parameters:
  uri - The uri for the property. May not be null.
Parameters:
  functional - If true, the property is also functional An TransitiveProperty resource, optionally also functional.



createUnionClass
public UnionClass createUnionClass(String uri, RDFList members)(Code)

Answer a resource representing the class that is the union of the given list of class desctiptions


Parameters:
  uri - The URI of the new union class, or null for an anonymous class description.
Parameters:
  members - A list of resources denoting the classes that comprise the union A union class description



findByDefiningProperty
protected ExtendedIterator findByDefiningProperty(Property p)(Code)

Answer an iterator over nodes that have p as a subject


Parameters:
  p - A property ExtendedIterator over subjects of p.



findByDefiningPropertyAs
protected ExtendedIterator findByDefiningPropertyAs(Property p, Class asKey)(Code)

Answer an iterator over nodes that have p as a subject, presented as polymorphic enh resources of the given facet.


Parameters:
  p - A property
Parameters:
  asKey - A facet type ExtendedIterator over subjects of p, presented as the facet.



findByType
protected ExtendedIterator findByType(Resource type)(Code)

Answer an iterator over all of the resources that have rdf:type type.


Parameters:
  type - The resource that is the value of rdf:type wewant to match An iterator over all triples _x rdf:type type



findByType
protected ExtendedIterator findByType(Resource type, Iterator alternates)(Code)

Answer an iterator over all of the resources that have rdf:type type, or optionally, one of the alternative types.


Parameters:
  type - The resource that is the value of rdf:type wewant to match
Parameters:
  alternates - An iterator over alternative types to search for, or null An iterator over all triples _x rdf:type t where tis type or one of the values from types.



findByTypeAs
protected ExtendedIterator findByTypeAs(Resource type, Iterator types, Class asKey)(Code)

Answer an iterator over all of the resources that have rdf:type type, or optionally, one of the alternative types, and present the results as() the given class.


Parameters:
  type - The resource that is the value of rdf:type wewant to match
Parameters:
  types - An iterator over alternative types to search for, or null
Parameters:
  asKey - The value to use to present the polymorphic results An iterator over all triples _x rdf:type type



findByTypeAs
protected ExtendedIterator findByTypeAs(Iterator types, Class asKey)(Code)

Answer an iterator over all of the resources that has an rdf:type from the types iterator, and present the results as() the given class.


Parameters:
  types - An iterator over types to search for. An exception willbe raised if this iterator does not have at least one next() element.
Parameters:
  asKey - The value to use to present the polymorphic results An iterator over all triples _x rdf:type type



findByTypeAs
protected ExtendedIterator findByTypeAs(Resource type, Class asKey)(Code)

Answer an iterator over resources with the given rdf:type; for each value in the iterator, ensure that is is presented as() the polymorphic object denoted by the given class key.


Parameters:
  type - The rdf:type to search for
Parameters:
  asKey - The key to pass to as() on the subject nodes An iterator over subjects with the given type, presenting asthe given polymorphic class.



findByURIAs
protected Resource findByURIAs(String uri, Class asKey)(Code)
Answer the resource with the given URI, if present, as the given facet



getAllValuesFromRestriction
public AllValuesFromRestriction getAllValuesFromRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals for which all values of the given property belong to the given class. If a resource with the given uri exists in the model, and can be viewed as an AllValuesFromResriction, return the AllValuesFromRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing an all-values-from restriction or null



getAnnotationProperty
public AnnotationProperty getAnnotationProperty(String uri)(Code)

Answer a resource that represents an annotation property in this model. If a resource with the given uri exists in the model, and can be viewed as an AnnotationProperty, return the AnnotationProperty facet, otherwise return null.


Parameters:
  uri - The uri for the annotation property. May not be null. An AnnotationProperty resource or null



getBaseGraph
public Graph getBaseGraph()(Code)

Answer the base-graph of this model. The base-graph is the graph that contains the triples read from the source document for this ontology.

The base-graph for this ontology model



getBaseModel
public Model getBaseModel()(Code)

Answer the base model of this model. The base model is the model wrapping the graph that contains the triples read from the source document for this ontology. It is therefore the model that will be updated if statements are added to a model that is built from a union of documents (via the imports statements in the source document).

The base model for this ontology model



getCardinalityQRestriction
public CardinalityQRestriction getCardinalityQRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have a property p, with cardinality N, all values of which are members of a given class. If a resource with the given uri exists in the model, and can be viewed as a CardinalityQRestriction, return the CardinalityQRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a qualified cardinality restriction, or null



getCardinalityRestriction
public CardinalityRestriction getCardinalityRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have exactly the given number of values for the given property. If a resource with the given uri exists in the model, and can be viewed as a CardinalityRestriction, return the CardinalityRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a has-value restriction, or null



getComplementClass
public ComplementClass getComplementClass(String uri)(Code)

Answer a resource representing the class that is the complement of another class. If a resource with the given uri exists in the model, and can be viewed as a ComplementClass, return the ComplementClass facet, otherwise return null.


Parameters:
  uri - The URI of the new complement class. A complement class or null



getDatatypeProperty
public DatatypeProperty getDatatypeProperty(String uri)(Code)

Answer a resource that represents datatype property in this model. . If a resource with the given uri exists in the model, and can be viewed as a DatatypeProperty, return the DatatypeProperty facet, otherwise return null.


Parameters:
  uri - The uri for the datatype property. May not be null. A DatatypeProperty resource or null



getDeductionsModel
public Model getDeductionsModel()(Code)

Returns a derivations model. The rule reasoners typically create a graph containing those triples added to the base graph due to rule firings. In some applications it can useful to be able to access those deductions directly, without seeing the raw data which triggered them. In particular, this allows the forward rules to be used as if they were rewrite transformation rules.

The derivations model, if one is defined, or else null



getDerivation
public Iterator getDerivation(Statement statement)(Code)
Return the derivation of the given statement (which should be the result of some previous list operation). Not all reasoneers will support derivations. an iterator over Derivation records or null if there is no derivation informationavailable for this triple.



getDocumentManager
public OntDocumentManager getDocumentManager()(Code)

Answer a reference to the document manager that this model is using to manage ontology <-> mappings, and to load the imports closure. Note the default ontology model each have a contained default document manager. Changing the document managers specified by these default specification may (in fact, probably will) affect other models built with the same specification policy. This may or may not be as desired by the programmer!

A reference to this model's document manager, obtained from the specification object



getDynamicImports
public boolean getDynamicImports()(Code)

Answer true if the imports closure of the model will be dynamically updated as imports statements are added and removed.

True if the imports closure is updated dynamically.



getEnumeratedClass
public EnumeratedClass getEnumeratedClass(String uri)(Code)

Answer a resource representing the class that is the enumeration of a list of individuals. If a resource with the given uri exists in the model, and can be viewed as an EnumeratedClass, return the EnumeratedClass facet, otherwise return null.


Parameters:
  uri - The URI of the new enumeration class. An enumeration class or null



getEventManager
public OntEventManager getEventManager()(Code)

Answer the ontology event manager attached to this model. If there is no event manager currently attached, a new one will be created.

The current, or a new, ontology event mananger



getHasValueRestriction
public HasValueRestriction getHasValueRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have the given resource as the value of the given property. If a resource with the given uri exists in the model, and can be viewed as a HasValueRestriction, return the HasValueRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a has-value restriction or null



getImportModelMaker
public ModelMaker getImportModelMaker()(Code)

Answer the model maker associated with this model (used for constructing the constituent models of the imports closure).

The local graph factory



getImportedModel
public OntModel getImportedModel(String uri)(Code)

Answer an OntModel representing the imported ontology with the given URI. If an ontology with that URI has not been imported, answer null.


Parameters:
  uri - The URI of an ontology that may have been imported into theontology represented by this model A model representing the imported ontology with the given URI, ornull.



getIndividual
public Individual getIndividual(String uri)(Code)

Answer a resource that represents an Individual node in this model. If a resource with the given uri exists in the model, and can be viewed as an Individual, return the Individual facet, otherwise return null.


Parameters:
  uri - The URI for the requried individual An Individual resource or null.



getIntersectionClass
public IntersectionClass getIntersectionClass(String uri)(Code)

Answer a resource representing the class that is the intersection of a list of class descriptions. If a resource with the given uri exists in the model, and can be viewed as a IntersectionClass, return the IntersectionClass facet, otherwise return null.


Parameters:
  uri - The URI of the new intersection class. An intersection class description or null



getInverseFunctionalProperty
public InverseFunctionalProperty getInverseFunctionalProperty(String uri)(Code)

Answer a resource representing an inverse functional property. If a resource with the given uri exists in the model, and can be viewed as a InverseFunctionalProperty, return the InverseFunctionalProperty facet, otherwise return null.


Parameters:
  uri - The uri for the property. May not be null. An InverseFunctionalProperty resource or null



getMaxCardinalityQRestriction
public MaxCardinalityQRestriction getMaxCardinalityQRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have a property p, with max cardinality N, all values of which are members of a given class. If a resource with the given uri exists in the model, and can be viewed as a MaxCardinalityQRestriction, return the MaxCardinalityQRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a qualified max cardinality restriction, or null



getMaxCardinalityRestriction
public MaxCardinalityRestriction getMaxCardinalityRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have at most the given number of values for the given property. If a resource with the given uri exists in the model, and can be viewed as a MaxCardinalityRestriction, return the MaxCardinalityRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a mas-cardinality restriction, or null



getMinCardinalityQRestriction
public MinCardinalityQRestriction getMinCardinalityQRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have a property p, with min cardinality N, all values of which are members of a given class. If a resource with the given uri exists in the model, and can be viewed as a MinCardinalityQRestriction, return the MinCardinalityQRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a qualified min cardinality restriction, or null



getMinCardinalityRestriction
public MinCardinalityRestriction getMinCardinalityRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have at least the given number of values for the given property. If a resource with the given uri exists in the model, and can be viewed as a MinCardinalityRestriction, return the MinCardinalityRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a min-cardinality restriction, or null



getModelMaker
public ModelMaker getModelMaker()(Code)



getOWLLanguageLevel
public Resource getOWLLanguageLevel(List problems)(Code)

If this OntModel is presenting an OWL model, answer the minimum OWL language level that the constructs used in this model lie entirely within. The three possible return values are OWL.FULL_LANG for OWL-full, OWL.DL_LANG for OWL-DL or OWL.LITE_LANG for OWL-lite. Note that these URI's are not officially sanctioned by the WebOnt working group. For unknown reasons, the working group chose not to assign official URI's to represent the different OWL language levels. There is a slim chance that this may change in future, in which case these return values will change apropriately. In addition, the given problems list, if non-null, will be filled with the syntax problems detected by the syntax checker ( com.hp.hpl.jena.ontology.tidy.Checker).

The Jena OWL syntax checker will normally list as problems those constructs used in this model that are in OWL Full but not permitted in OWL DL. The exception to this is if the for this model is , then the syntax checker will test for constructs that lie in OWL-DL or OWL-Full and hence outside in OWL-Lite.


Parameters:
  problems - A list that, if non-null, will have the various problems discovered by the OWL syntaxchecker added to it. A resource denoting the minimum OWL language level for this model
exception:
  OntologyException - if this model is not an OWL model



getObjectProperty
public ObjectProperty getObjectProperty(String uri)(Code)

Answer a resource representing an object property in this model. If a resource with the given uri exists in the model, and can be viewed as an ObjectProperty, return the ObjectProperty facet, otherwise return null.


Parameters:
  uri - The uri for the object property. May not be null. An ObjectProperty resource or null.



getOntClass
public OntClass getOntClass(String uri)(Code)

Answer a resource that represents a class description node in this model. If a resource with the given uri exists in the model, and can be viewed as an OntClass, return the OntClass facet, otherwise return null.


Parameters:
  uri - The uri for the class node, or null for an anonymous class. An OntClass resource or null.



getOntProperty
public OntProperty getOntProperty(String uri)(Code)

Answer a resource representing an generic property in this model. If a property with the given uri exists in the model, return the OntProperty facet, otherwise return null.


Parameters:
  uri - The uri for the property. An OntProperty resource or null.



getOntResource
public OntResource getOntResource(String uri)(Code)

Answer a resource presenting the OntResource facet, which has the given URI. If no such resource is currently present in the model, return null.


Parameters:
  uri - The URI of a resource An OntResource with the given URI, or null



getOntResource
public OntResource getOntResource(Resource res)(Code)

Answer a resource presenting the OntResource facet, which corresponds to the given resource but attached to this model.


Parameters:
  res - An existing resource An OntResource attached to this model that has the same URIor anonID as the given resource



getOntology
public Ontology getOntology(String uri)(Code)

Answer a resource that represents an ontology description node in this model. If a resource with the given uri exists in the model, and can be viewed as an Ontology, return the Ontology facet, otherwise return null.


Parameters:
  uri - The uri for the ontology node. Conventionally, this corresponds to the base URIof the document itself. An Ontology resource or null.



getProfile
public Profile getProfile()(Code)

Answer the language profile (for example, OWL or DAML+OIL) that this model is working to.

A language profile



getQualifiedRestriction
public QualifiedRestriction getQualifiedRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have a property p, all values of which are members of a given class. Typically used with a cardinality constraint. If a resource with the given uri exists in the model, and can be viewed as a QualifiedRestriction, return the QualifiedRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a qualified restriction, or null



getRawModel
public Model getRawModel()(Code)
Return the raw RDF model being processed (i.e. the argument to the Reasonder.bind call that created this InfModel).



getReasoner
public Reasoner getReasoner()(Code)
Return the Reasoner which is being used to answer queries to this graph.



getResourceWithType
protected Resource getResourceWithType(String uri, Resource rdfType)(Code)

Answer the resource with the given uri and that optionally has the given rdf:type, creating the resource if necessary.


Parameters:
  uri - The uri to use, or null for an anonymous resource
Parameters:
  rdfType - The resource to assert as the rdf:type, or null to leave untyped A new or existing Resource



getRestriction
public Restriction getRestriction(String uri)(Code)

Answer a resource that represents a property restriction in this model. If a resource with the given uri exists in the model, and can be viewed as a Restriction, return the Restriction facet, otherwise return null.


Parameters:
  uri - The uri for the restriction node. A Restriction resource or null



getSomeValuesFromRestriction
public SomeValuesFromRestriction getSomeValuesFromRestriction(String uri)(Code)

Answer a class description defined as the class of those individuals that have at least one property with a value belonging to the given class. If a resource with the given uri exists in the model, and can be viewed as a SomeValuesFromRestriction, return the SomeValuesFromRestriction facet, otherwise return null.


Parameters:
  uri - The URI for the restriction A resource representing a some-values-from restriction, or null



getSpecification
public OntModelSpec getSpecification()(Code)

Answer the ontology model specification that was used to construct this model

An ont model spec instance.



getSubGraphs
public List getSubGraphs()(Code)

Answer the sub-graphs of this model. A sub-graph is defined as a graph that is used to contain the triples from an imported document.

A list of sub graphs for this ontology model



getSymmetricProperty
public SymmetricProperty getSymmetricProperty(String uri)(Code)

Answer a resource representing a symmetric property. If a resource with the given uri exists in the model, and can be viewed as a SymmetricProperty, return the SymmetricProperty facet, otherwise return null.


Parameters:
  uri - The uri for the property. May not be null. A SymmetricProperty resource or null



getTransitiveProperty
public TransitiveProperty getTransitiveProperty(String uri)(Code)

Answer a resource representing a transitive property. If a resource with the given uri exists in the model, and can be viewed as a TransitiveProperty, return the TransitiveProperty facet, otherwise return null.


Parameters:
  uri - The uri for the property. May not be null. A TransitiveProperty resource or null



getUnionClass
public UnionClass getUnionClass(String uri)(Code)

Answer a resource representing the class that is the union of a list of class desctiptions. If a resource with the given uri exists in the model, and can be viewed as a UnionClass, return the UnionClass facet, otherwise return null.


Parameters:
  uri - The URI of the new union class. A union class description or null



getUnionGraph
protected MultiUnion getUnionGraph()(Code)

Answer the union graph that contains the imports closure for this ontology

The union graph



hasLoadedImport
public boolean hasLoadedImport(String uri)(Code)

Answer true if this model has had the given URI document imported into it. This is important to know since an import only occurs once, and we also want to be able to detect cycles of imports.


Parameters:
  uri - An ontology URI True if the document corresponding to the URI has been successfully loadedinto this model



isInBaseModel
public boolean isInBaseModel(RDFNode node)(Code)

Answer true if the given node is a member of the base model of this ontology model. This is an important distiction, because only the base model receives updates when the ontology model is updated. Thus, removing properties of a resource that is not in the base model will not actually side-effect the overall model.


Parameters:
  node - An RDF node (Resource, Property or Literal) to test True if the given node is from the base model



isInBaseModel
public boolean isInBaseModel(Statement stmt)(Code)

Answer true if the given statement is defined in the base model of this ontology model. This is an important distiction, because only the base model receives updates when the ontology model is updated. Thus, removing a statement that is not in the base model will not actually side-effect the overall model.


Parameters:
  stmt - A statement to test True if the given statement is from the base model



listAllDifferent
public ExtendedIterator listAllDifferent()(Code)

Answer an iterator that ranges over the nodes that denote pair-wise disjointness between sets of classes.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over AllDifferent nodes.



listAllOntProperties
public ExtendedIterator listAllOntProperties()(Code)

Answer an iterator over all of the ontology properties in this model, including object properties, datatype properties, annotation properties, etc. This method takes a different approach to calculating the set of property resources to return, and is robust against the absence of a reasoner attached to the model (see note in OntModelImpl.listOntProperties() for explanation). However, the calculation used by this method is potentially less efficient than the alternative listOntProperties(). Users whose models have an attached reasoner are recommended to use OntModelImpl.listOntProperties() .

An iterator over all available properties in a model, irrespective ofwhether a reasoner is available to perform rdf:type entailments.Each property will appear exactly once in the iterator.



listAnnotationProperties
public ExtendedIterator listAnnotationProperties()(Code)

Answer an iterator that ranges over the properties in this model that are declared to be annotation properties. Not all supported languages define annotation properties (the category of annotation properties is chiefly an OWL innovation).

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over annotation properties.
See Also:   Profile.getAnnotationProperties



listClasses
public ExtendedIterator listClasses()(Code)

Answer an iterator that ranges over all of the various forms of class description resource in this model. Class descriptions include OntModelImpl.listEnumeratedClasses enumerated classes, OntModelImpl.listUnionClasses union classes, OntModelImpl.listComplementClasses complement classes, OntModelImpl.listIntersectionClasses intersection classes, OntModelImpl.listClasses named classes and OntModelImpl.listRestrictions property restrictions .

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over class description resources.



listComplementClasses
public ExtendedIterator listComplementClasses()(Code)

Answer an iterator that ranges over the complement class-descriptions in this model, i.e. the class resources specified to have a property complementOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over complement class resources.
See Also:   Profile.COMPLEMENT_OF



listDataRanges
public ExtendedIterator listDataRanges()(Code)

Answer an iterator over the DataRange objects in this ontology, if there are any.

An iterator, whose values are DataRange objects.



listDatatypeProperties
public ExtendedIterator listDatatypeProperties()(Code)

Answer an iterator that ranges over the datatype property resources in this model, i.e. the resources with rdf:type DatatypeProperty or equivalent. An datatype property is a property that is defined in the ontology language semantics as a one whose range comprises datatyped literals (rather than individuals).

Specifically, the resources in this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model: see Profile.DATATYPE_PROPERTY .

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over datatype property resources.



listEnumeratedClasses
public ExtendedIterator listEnumeratedClasses()(Code)

Answer an iterator that ranges over the enumerated class class-descriptions in this model, i.e. the class resources specified to have a property oneOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over enumerated class resources.
See Also:   Profile.ONE_OF



listFunctionalProperties
public ExtendedIterator listFunctionalProperties()(Code)

Answer an iterator that ranges over the functional property resources in this model, i.e. the resources with rdf:type FunctionalProperty or equivalent. A functional property is a property that is defined in the ontology language semantics as having a unique domain element for each instance of the relationship.

Specifically, the resources in this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model: see Profile.FUNCTIONAL_PROPERTY .

An iterator over functional property resources.



listHierarchyRootClasses
public ExtendedIterator listHierarchyRootClasses()(Code)

Answer an iterator over the classes in this ontology model that represent the uppermost nodes of the class hierarchy. Depending on the underlying reasoner configuration, if any, these will be calculated as the classes that have Top (i.e. owl:Thing or daml:Thing) as a direct super-class, or the classes which have no declared super-class.

An iterator of the root classes in the local class hierarchy



listImportedModels
public ExtendedIterator listImportedModels()(Code)

Answer an iterator over the ontologies that this ontology imports, each of which will have been wrapped as an ontology model using the same OntModelSpec as this model. If this model has no imports, the iterator will be non-null but will not have any values.

An iterator, each value of which will be an OntModelrepresenting an imported ontology.OntModelImpl.listSubModels(boolean)
See Also:   OntModelImpl.listSubModels()
See Also:   OntModelImpl.listSubModels(boolean)



listImportedOntologyURIs
public Set listImportedOntologyURIs()(Code)

Answer a list of the imported URI's in this ontology model. Detection of imports statments will be according to the local language profile

The imported ontology URI's as a set. Note that since the underlying graph isnot ordered, the order of values in the list in successive calls to this method isnot guaranteed to be preserved.



listImportedOntologyURIs
public Set listImportedOntologyURIs(boolean closure)(Code)

Answer a list of the imported URI's in this ontology model, and optionally in the closure of this model's imports. Detection of imports statments will be according to the local language profile. Note that, in order to allow this method to be called during the imports closure process, we only query the base model, thus side-stepping the any attached reasoner.


Parameters:
  closure - If true, the set of uri's returned will include not only those directlyimported by this model, but those imported by the model's imports transitively. The imported ontology URI's as a list. Note that since the underlying graph isnot ordered, the order of values in the list in successive calls to this method isnot guaranteed to be preserved.



listIndividuals
public ExtendedIterator listIndividuals()(Code)

Answer an iterator that ranges over the individual resources in this model, i.e. the resources with rdf:type corresponding to a class defined in the ontology.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over Individuals.



listIndividuals
public ExtendedIterator listIndividuals(Resource cls)(Code)

Answer an iterator that ranges over the resources in this model that are instances of the given class.

An iterator over individual resources whose rdf:typeis cls.



listIntersectionClasses
public ExtendedIterator listIntersectionClasses()(Code)

Answer an iterator that ranges over the intersection class-descriptions in this model, i.e. the class resources specified to have a property intersectionOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over complement class resources.
See Also:   Profile.INTERSECTION_OF



listInverseFunctionalProperties
public ExtendedIterator listInverseFunctionalProperties()(Code)

Answer an iterator that ranges over the inverse functional property resources in this model, i.e. the resources with rdf:type InverseFunctionalProperty or equivalent.

Specifically, the resources in this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model: see Profile.INVERSE_FUNCTIONAL_PROPERTY .

An iterator over inverse functional property resources.



listNamedClasses
public ExtendedIterator listNamedClasses()(Code)

Answer an iterator that ranges over the named class-descriptions in this model, i.e. resources with rdf:type Class (or equivalent) and a node URI.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over named class resources.



listObjectProperties
public ExtendedIterator listObjectProperties()(Code)

Answer an iterator that ranges over the object property resources in this model, i.e. the resources with rdf:type ObjectProperty or equivalent. An object property is a property that is defined in the ontology language semantics as a one whose range comprises individuals (rather than datatyped literals).

Specifically, the resources in this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model: see Profile.OBJECT_PROPERTY .

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over object property resources.



listOntProperties
public ExtendedIterator listOntProperties()(Code)

Answer an iterator that ranges over the property resources in this model, i.e. the resources with rdf:type Property or equivalent. An OntProperty is equivalent to an rdfs:Property in a normal RDF graph; this type is provided as a common super-type for the more specific ObjectProperty and DatatypeProperty property types.

Note This method searches for nodes in the underlying model whose rdf:type is rdf:Property. This type is entailed by specific property sub-types, such as owl:ObjectProperty. An important consequence of this is that in models without an attached reasoner (e.g. in the OWL_MEM OntModelSpec ), the entailed type will not be present and this method will omit such properties from the returned iterator.
Solution There are two ways to address to this issue: either use a reasoning engine to ensure that type entailments are taking place correctly, or call OntModelImpl.listAllOntProperties() . Note that listAllOntProperties is potentially less efficient than this method.

The resources returned by this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model.

An iterator over property resources.



listOntologies
public ExtendedIterator listOntologies()(Code)

Answer an iterator that ranges over the ontology resources in this model, i.e. the resources with rdf:type Ontology or equivalent. These resources typically contain metadata about the ontology document that contains them.

Specifically, the resources in this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model, see Profile.ONTOLOGY .

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over ontology resources.



listRestrictions
public ExtendedIterator listRestrictions()(Code)

Answer an iterator that ranges over the property restriction class-descriptions in this model, i.e. resources with rdf:type Restriction (or equivalent).

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over restriction class resources.
See Also:   Profile.RESTRICTION



listStatements
public StmtIterator listStatements(Resource subject, Property predicate, RDFNode object, Model posit)(Code)
Find all the statements matching a pattern.

Return an iterator over all the statements in a model that match a pattern. The statements selected are those whose subject matches the subject argument, whose predicate matches the predicate argument and whose object matchesthe object argument. If an argument is null it matches anything.

The s/p/o terms may refer to resources which are temporarily defined in the "posit" model. This allows one, for example, to query what resources are of type CE where CE is a class expression rather than a named class - put CE in the posit arg.

an iterator over the subjects
Parameters:
  subject - The subject sought
Parameters:
  predicate - The predicate sought
Parameters:
  object - The value sought



listSubModels
public ExtendedIterator listSubModels(boolean withImports)(Code)

Answer an iterator over the ontology models that are sub-models of this model. Sub-models are used, for example, to represent composite documents such as the imports of a model. So if ontology A imports ontologies B and C, each of B and C will be available as one of the sub-models of the model containing A. This method replaces the older OntModelImpl.listImportedModels . Note that to fully replicate the behaviour of listImportedModels, the withImports flag must be set to true. Each model returned by this method will have been wrapped as an ontology model using the same OntModelSpec as this model. If this model has no sub-models, the returned iterator will be non-null but will not have any values.


Parameters:
  withImports - If true, each sub-model returned by this methodwill also include its import models. So if model A imports D, and Dimports D, when called with withImports set to true, thereturn value for modelA.listSubModels(true) will be aniterator, whose only value is a model for D, and that model will containa sub-model representing the import of E. If withImportsis false, E will not be included as a sub-model of D. An iterator, each value of which will be an OntModelrepresenting a sub-model of this ontology.



listSubModels
public ExtendedIterator listSubModels()(Code)

Answer an iterator over the ontology models that are sub-models of this model. Sub-models are used, for example, to represent composite documents such as the imports of a model. So if ontology A imports ontologies B and C, each of B and C will be available as one of the sub-models of the model containing A. Important note on behaviour change: please see the comment on OntModelImpl.listSubModels(boolean) for explanation of the withImports flag. This zero-argument form of listSubModels sets withImports to false, so the returned models will not themselves contain imports. This behaviour differs from the zero-argument method OntModelImpl.listImportedModels() in Jena 2.4 an earlier.

An iterator, each value of which will be an OntModelrepresenting a sub-model of this ontology.
See Also:   OntModelImpl.listSubModels(boolean)



listSymmetricProperties
public ExtendedIterator listSymmetricProperties()(Code)

Answer an iterator that ranges over the symmetric property resources in this model, i.e. the resources with rdf:type SymmetricProperty or equivalent.

Specifically, the resources in this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model: see Profile.SYMMETRIC_PROPERTY .

An iterator over symmetric property resources.



listTransitiveProperties
public ExtendedIterator listTransitiveProperties()(Code)

Answer an iterator that ranges over the transitive property resources in this model, i.e. the resources with rdf:type TransitiveProperty or equivalent.

Specifically, the resources in this iterator will those whose type corresponds to the value given in the ontology vocabulary associated with this model: see Profile.TRANSITIVE_PROPERTY .

An iterator over transitive property resources.



listUnionClasses
public ExtendedIterator listUnionClasses()(Code)

Answer an iterator that ranges over the union class-descriptions in this model, i.e. the class resources specified to have a property unionOf (or equivalent) and a list of values.

Note: the number of nodes returned by this iterator will vary according to the completeness of the deductive extension of the underlying graph. See class overview for more details.

An iterator over union class resources.
See Also:   Profile.UNION_OF



loadImports
public void loadImports()(Code)

Determine which models this model imports (by looking for, for example, owl:imports statements, and load each of those models as an import. A check is made to determine if a model has already been imported, if so, the import is ignored. Thus this method is safe against circular sets of import statements. Note that actual implementation is delegated to the associated OntDocumentManager .




prepare
public void prepare()(Code)
Perform any initial processing and caching. This call is optional. Most engines either have negligable set up work or will perform an implicit "prepare" if necessary. The call is provided for those occasions where substantial preparation work is possible (e.g. running a forward chaining rule system) and where an application might wish greater control over when this prepration is done rather than just leaving to be done at first query time.



queryFor
public ExtendedIterator queryFor(BindingQueryPlan query, List altQueries, Class asKey)(Code)

Answer the iterator over the resources from the graph that satisfy the given query, followed by the answers to the alternative queries (if specified). A typical scenario is that the main query gets resources of a given class (say, rdfs:Class), while the altQueries query for aliases for that type (such as daml:Class).


Parameters:
  query - A query to run against the model
Parameters:
  altQueries - An optional list of subsidiary queries to chain on to the first ExtendedIterator An iterator over the (assumed single) results ofexecuting the queries.



queryXTypeOfType
protected BindingQueryPlan queryXTypeOfType(Resource type)(Code)

Answer a binding query that will search for 'an X that has an rdf:type whose rdf:type is C' for some given resource C.


Parameters:
  type - The type of the type of the resources we're searching for BindingQueryPlan A binding query for the X resources.



read
public Model read(String uri)(Code)

Read statements into the model from the given source, and then load imported ontologies (according to the document manager policy).


Parameters:
  uri - URI to read from, may be mapped to a local source by the document manager



read
public Model read(Reader reader, String base)(Code)

Read statements into the model from the given source, and then load imported ontologies (according to the document manager policy).


Parameters:
  reader - An input reader
Parameters:
  base - The base URI



read
public Model read(InputStream reader, String base)(Code)

Read statements into the model from the given source, and then load imported ontologies (according to the document manager policy).


Parameters:
  reader - An input stream
Parameters:
  base - The base URI



read
public Model read(String uri, String syntax)(Code)

Read statements into the model from the given source, and then load imported ontologies (according to the document manager policy).


Parameters:
  uri - URI to read from, may be mapped to a local source by the document manager
Parameters:
  syntax - The source syntax This model, to allow chaining calls



read
public Model read(String uri, String base, String syntax)(Code)

Read statements into the model from the given source, and then load imported ontologies (according to the document manager policy).


Parameters:
  uri - URI to read from, may be mapped to a local source by the document manager
Parameters:
  base - The base URI for this model
Parameters:
  syntax - The source syntax This model, to allow chaining calls



read
public Model read(Reader reader, String base, String syntax)(Code)

Read statements into the model from the given source, and then load imported ontologies (according to the document manager policy).


Parameters:
  reader - An input reader
Parameters:
  base - The base URI
Parameters:
  syntax - The source syntax This model, to allow chaining calls



read
public Model read(InputStream reader, String base, String syntax)(Code)

Read statements into the model from the given source, and then load imported ontologies (according to the document manager policy).


Parameters:
  reader - An input stream
Parameters:
  base - The base URI
Parameters:
  syntax - The source syntax This model, to allow chaining calls



rebind
public void rebind()(Code)
Cause the inference model to reconsult the underlying data to take into account changes. Normally changes are made through the InfModel's add and remove calls are will be handled appropriately. However, in some cases changes are made "behind the InfModels's back" and this forces a full reconsult of the changed data.



removeLoadedImport
public void removeLoadedImport(String uri)(Code)

Record that this model no longer imports the document with the given URI.


Parameters:
  uri - A document URI that is no longer imported into the model.



removeSubModel
public void removeSubModel(Model model)(Code)

Remove the given model as one of the sub-models of the enclosed ontology union model. Will cause the associated infererence engine (if any) to update, so this may be an expensive operation in some cases.


Parameters:
  model - A sub-model to remove
See Also:   OntModelImpl.addSubModel(Model,boolean)



removeSubModel
public void removeSubModel(Model model, boolean rebind)(Code)

Remove the given model as one of the sub-models of the enclosed ontology union model.


Parameters:
  model - A sub-model to remove
Parameters:
  rebind - If true, rebind any associated inferencing engine to the new data (whichmay be an expensive operation)



reset
public void reset()(Code)
Reset any internal caches. Some systems, such as the tabled backchainer, retain information after each query. A reset will wipe this information preventing unbounded memory use at the expense of more expensive future queries. A reset does not cause the raw data to be reconsulted and so is less expensive than a rebind.



setDerivationLogging
public void setDerivationLogging(boolean logOn)(Code)
Switch on/off drivation logging. If this is switched on then every time an inference is a made that fact is recorded and the resulting record can be access through a later getDerivation call. This may consume a lot of space!



setDynamicImports
public void setDynamicImports(boolean dynamic)(Code)

Set the flag that controls whether adding or removing imports statements into the model will result in the imports closure changing dynamically.


Parameters:
  dynamic - If true, adding or removing an imports statement to themodel will result in a change in the imports closure. If false, changesto the imports are not monitored dynamically. Default false.



setStrictMode
public void setStrictMode(boolean strict)(Code)

Set the checking mode to strict or non-strict.


Parameters:
  strict -
See Also:   OntModelImpl.strictMode()



strictMode
public boolean strictMode()(Code)

Answer true if this model is currently in strict checking mode. Strict mode means that converting a common resource to a particular language element, such as an ontology class, will be subject to some simple syntactic-level checks for appropriateness.

True if in strict checking mode



validate
public ValidityReport validate()(Code)
Test the consistency of the underlying data. This normally tests the validity of the bound instance data against the bound schema data. a ValidityReport structure



write
public Model write(Writer writer)(Code)



write
public Model write(Writer writer, String lang)(Code)



write
public Model write(Writer writer, String lang, String base)(Code)



write
public Model write(OutputStream out)(Code)



write
public Model write(OutputStream out, String lang)(Code)



write
public Model write(OutputStream out, String lang, String base)(Code)



writeAll
public Model writeAll(Writer writer, String lang, String base)(Code)



writeAll
public Model writeAll(OutputStream out, String lang, String base)(Code)



Fields inherited from com.hp.hpl.jena.rdf.model.impl.ModelCom
protected Map1 mapAsStatement(Code)(Java Doc)
protected ModelReifier modelReifier(Code)(Java Doc)

Methods inherited from com.hp.hpl.jena.rdf.model.impl.ModelCom
public Model abort()(Code)(Java Doc)
public GraphListener adapt(ModelChangedListener L)(Code)(Java Doc)
public Model add(Resource s, Property p, String o)(Code)(Java Doc)
public Model add(Resource s, Property p, String o, boolean wellFormed)(Code)(Java Doc)
public Model add(Resource s, Property p, String o, String lang, boolean wellFormed)(Code)(Java Doc)
public Model add(Resource s, Property p, String lex, RDFDatatype datatype)(Code)(Java Doc)
public Model add(Resource s, Property p, String o, String l)(Code)(Java Doc)
public Model add(StmtIterator iter)(Code)(Java Doc)
public Model add(Model m)(Code)(Java Doc)
public Model add(Model m, boolean suppressReifications)(Code)(Java Doc)
public Model add(Statement s)(Code)(Java Doc)
public Model add(Statement[] statements)(Code)(Java Doc)
public Model add(List statements)(Code)(Java Doc)
public Model add(Resource s, Property p, RDFNode o)(Code)(Java Doc)
protected static Model addCommon(Model result, StmtIterator it, Model other)(Code)(Java Doc)
public Model addLiteral(Resource s, Property p, boolean o)(Code)(Java Doc)
public Model addLiteral(Resource s, Property p, long o)(Code)(Java Doc)
public Model addLiteral(Resource s, Property p, int o)(Code)(Java Doc)
public Model addLiteral(Resource s, Property p, char o)(Code)(Java Doc)
public Model addLiteral(Resource s, Property p, float o)(Code)(Java Doc)
public Model addLiteral(Resource s, Property p, double o)(Code)(Java Doc)
public Model addLiteral(Resource s, Property p, Object o)(Code)(Java Doc)
public static void addNamespaces(Model m, Map ns)(Code)(Java Doc)
public Model addTyped(Resource s, Property p, boolean o)(Code)(Java Doc)
public Filter asFilter(Selector s)(Code)(Java Doc)
public Model asModel(Graph g)(Code)(Java Doc)
public static Node asNode(RDFNode x)(Code)(Java Doc)
public RDFNode asRDFNode(Node n)(Code)(Java Doc)
public Statement asStatement(Triple t)(Code)(Java Doc)
public Statement[] asStatements(Triple[] triples)(Code)(Java Doc)
public List asStatements(List triples)(Code)(Java Doc)
public StmtIterator asStatements(Iterator it)(Code)(Java Doc)
public Model begin()(Code)(Java Doc)
public void close()(Code)(Java Doc)
public Model commit()(Code)(Java Doc)
public boolean contains(Resource s, Property p, String o)(Code)(Java Doc)
public boolean contains(Resource s, Property p, String o, String l)(Code)(Java Doc)
public boolean contains(Statement s)(Code)(Java Doc)
public boolean contains(Resource s, Property p)(Code)(Java Doc)
public boolean contains(Resource s, Property p, RDFNode o)(Code)(Java Doc)
public boolean containsAll(Model model)(Code)(Java Doc)
public boolean containsAll(StmtIterator iter)(Code)(Java Doc)
protected boolean containsAllThenClose(StmtIterator iter)(Code)(Java Doc)
public boolean containsAny(Model model)(Code)(Java Doc)
public boolean containsAny(StmtIterator iter)(Code)(Java Doc)
protected boolean containsAnyThenClose(StmtIterator iter)(Code)(Java Doc)
public boolean containsLiteral(Resource s, Property p, boolean o)(Code)(Java Doc)
public boolean containsLiteral(Resource s, Property p, long o)(Code)(Java Doc)
public boolean containsLiteral(Resource s, Property p, int o)(Code)(Java Doc)
public boolean containsLiteral(Resource s, Property p, char o)(Code)(Java Doc)
public boolean containsLiteral(Resource s, Property p, float o)(Code)(Java Doc)
public boolean containsLiteral(Resource s, Property p, double o)(Code)(Java Doc)
public boolean containsLiteral(Resource s, Property p, Object o)(Code)(Java Doc)
public boolean containsResource(RDFNode r)(Code)(Java Doc)
public boolean containsTyped(Resource s, Property p, boolean o)(Code)(Java Doc)
public Alt createAlt()(Code)(Java Doc)
public Alt createAlt(String uri)(Code)(Java Doc)
public Bag createBag()(Code)(Java Doc)
public Bag createBag(String uri)(Code)(Java Doc)
public RDFList createList()(Code)(Java Doc)
public RDFList createList(Iterator members)(Code)(Java Doc)
public RDFList createList(RDFNode[] members)(Code)(Java Doc)
public Literal createLiteral(String v)(Code)(Java Doc)
public Literal createLiteral(String v, String l)(Code)(Java Doc)
public Literal createLiteral(String v, boolean wellFormed)(Code)(Java Doc)
public Literal createLiteral(String v, String l, boolean wellFormed)(Code)(Java Doc)
public Statement createLiteralStatement(Resource r, Property p, boolean o)(Code)(Java Doc)
public Statement createLiteralStatement(Resource r, Property p, long o)(Code)(Java Doc)
public Statement createLiteralStatement(Resource r, Property p, int o)(Code)(Java Doc)
public Statement createLiteralStatement(Resource r, Property p, char o)(Code)(Java Doc)
public Statement createLiteralStatement(Resource r, Property p, float o)(Code)(Java Doc)
public Statement createLiteralStatement(Resource r, Property p, double o)(Code)(Java Doc)
public Statement createLiteralStatement(Resource r, Property p, Object o)(Code)(Java Doc)
public Property createProperty(String uri)(Code)(Java Doc)
public Property createProperty(String nameSpace, String localName)(Code)(Java Doc)
public ReifiedStatement createReifiedStatement(Statement s)(Code)(Java Doc)
public ReifiedStatement createReifiedStatement(String uri, Statement s)(Code)(Java Doc)
public Resource createResource(Resource type)(Code)(Java Doc)
public Resource createResource(String uri, Resource type)(Code)(Java Doc)
public Resource createResource(ResourceF f)(Code)(Java Doc)
public Resource createResource(AnonId id)(Code)(Java Doc)
public Resource createResource(String uri, ResourceF f)(Code)(Java Doc)
public Resource createResource()(Code)(Java Doc)
public Resource createResource(String uri)(Code)(Java Doc)
public Seq createSeq()(Code)(Java Doc)
public Seq createSeq(String uri)(Code)(Java Doc)
public Statement createStatement(Resource r, Property p, String o)(Code)(Java Doc)
public Statement createStatement(Resource r, Property p, String o, boolean wellFormed)(Code)(Java Doc)
public Statement createStatement(Resource r, Property p, String o, String l)(Code)(Java Doc)
public Statement createStatement(Resource r, Property p, String o, String l, boolean wellFormed)(Code)(Java Doc)
public Statement createStatement(Resource r, Property p, RDFNode o)(Code)(Java Doc)
public Literal createTypedLiteral(boolean v)(Code)(Java Doc)
public Literal createTypedLiteral(int v)(Code)(Java Doc)
public Literal createTypedLiteral(long v)(Code)(Java Doc)
public Literal createTypedLiteral(char v)(Code)(Java Doc)
public Literal createTypedLiteral(float v)(Code)(Java Doc)
public Literal createTypedLiteral(double v)(Code)(Java Doc)
public Literal createTypedLiteral(String v)(Code)(Java Doc)
public Literal createTypedLiteral(Calendar cal)(Code)(Java Doc)
public Literal createTypedLiteral(String lex, RDFDatatype dtype) throws DatatypeFormatException(Code)(Java Doc)
public Literal createTypedLiteral(Object value, RDFDatatype dtype)(Code)(Java Doc)
public Literal createTypedLiteral(String lex, String typeURI)(Code)(Java Doc)
public Literal createTypedLiteral(Object value, String typeURI)(Code)(Java Doc)
public Literal createTypedLiteral(Object value)(Code)(Java Doc)
protected static Model createWorkModel()(Code)(Java Doc)
public Model difference(Model model)(Code)(Java Doc)
public void enterCriticalSection(boolean requestReadLock)(Code)(Java Doc)
public Object executeInTransaction(Command cmd)(Code)(Java Doc)
public String expandPrefix(String prefixed)(Code)(Java Doc)
public ExtendedIterator findTriplesFrom(Selector s)(Code)(Java Doc)
public Alt getAlt(String uri)(Code)(Java Doc)
public Alt getAlt(Resource r)(Code)(Java Doc)
public Resource getAnyReifiedStatement(Statement s)(Code)(Java Doc)
public Bag getBag(String uri)(Code)(Java Doc)
public Bag getBag(Resource r)(Code)(Java Doc)
protected BulkUpdateHandler getBulkUpdateHandler()(Code)(Java Doc)
public static PrefixMapping getDefaultModelPrefixes()(Code)(Java Doc)
public Graph getGraph()(Code)(Java Doc)
public Model getHiddenStatements()(Code)(Java Doc)
public synchronized Lock getLock()(Code)(Java Doc)
public synchronized ModelLock getModelLock()(Code)(Java Doc)
public Map getNsPrefixMap()(Code)(Java Doc)
public String getNsPrefixURI(String prefix)(Code)(Java Doc)
public String getNsURIPrefix(String uri)(Code)(Java Doc)
public Property getProperty(String uri)(Code)(Java Doc)
public Property getProperty(String nameSpace, String localName)(Code)(Java Doc)
public Statement getProperty(Resource s, Property p)(Code)(Java Doc)
public RDFNode getRDFNode(Node n)(Code)(Java Doc)
public RDFReader getReader()(Code)(Java Doc)
public RDFReader getReader(String lang)(Code)(Java Doc)
public ReificationStyle getReificationStyle()(Code)(Java Doc)
public Statement getRequiredProperty(Resource s, Property p)(Code)(Java Doc)
public Resource getResource(String uri, ResourceF f)(Code)(Java Doc)
public Resource getResource(String uri)(Code)(Java Doc)
public Seq getSeq(String uri)(Code)(Java Doc)
public Seq getSeq(Resource r)(Code)(Java Doc)
public RDFWriter getWriter()(Code)(Java Doc)
public RDFWriter getWriter(String lang)(Code)(Java Doc)
public boolean independent()(Code)(Java Doc)
public static Model intersect(Model smaller, Model larger)(Code)(Java Doc)
public Model intersection(Model other)(Code)(Java Doc)
public boolean isClosed()(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public boolean isIsomorphicWith(Model m)(Code)(Java Doc)
public boolean isReified(Statement s)(Code)(Java Doc)
public void leaveCriticalSection()(Code)(Java Doc)
public StmtIterator listBySubject(Container cont)(Code)(Java Doc)
public StmtIterator listLiteralStatements(Resource S, Property P, boolean O)(Code)(Java Doc)
public StmtIterator listLiteralStatements(Resource S, Property P, long O)(Code)(Java Doc)
public StmtIterator listLiteralStatements(Resource S, Property P, char O)(Code)(Java Doc)
public StmtIterator listLiteralStatements(Resource S, Property P, double O)(Code)(Java Doc)
public NsIterator listNameSpaces()(Code)(Java Doc)
public NodeIterator listObjects()(Code)(Java Doc)
public NodeIterator listObjectsOfProperty(Property p)(Code)(Java Doc)
public NodeIterator listObjectsOfProperty(Resource s, Property p)(Code)(Java Doc)
public RSIterator listReifiedStatements()(Code)(Java Doc)
public RSIterator listReifiedStatements(Statement st)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p, boolean o)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p, char o)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p, long o)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p, float o)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p, double o)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p, Object o)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p)(Code)(Java Doc)
public ResIterator listResourcesWithProperty(Property p, RDFNode o)(Code)(Java Doc)
protected StmtIterator listStatements(Resource S, Property P, Node O)(Code)(Java Doc)
public StmtIterator listStatements(Resource S, Property P, RDFNode O)(Code)(Java Doc)
public StmtIterator listStatements(Resource S, Property P, String O)(Code)(Java Doc)
public StmtIterator listStatements(Resource S, Property P, String O, String L)(Code)(Java Doc)
public StmtIterator listStatements()(Code)(Java Doc)
public StmtIterator listStatements(Selector selector)(Code)(Java Doc)
public ResIterator listSubjects()(Code)(Java Doc)
public ResIterator listSubjectsWithProperty(Property p, RDFNode o)(Code)(Java Doc)
public ResIterator listSubjectsWithProperty(Property p, String o)(Code)(Java Doc)
public ResIterator listSubjectsWithProperty(Property p, String o, String l)(Code)(Java Doc)
public ResIterator listSubjectsWithProperty(Property p)(Code)(Java Doc)
public StmtIterator listlLiteralStatements(Resource S, Property P, float O)(Code)(Java Doc)
public PrefixMapping lock()(Code)(Java Doc)
public Model notifyEvent(Object e)(Code)(Java Doc)
public String qnameFor(String uri)(Code)(Java Doc)
public Model query(Selector selector)(Code)(Java Doc)
public QueryHandler queryHandler()(Code)(Java Doc)
public Model read(String url)(Code)(Java Doc)
public Model read(Reader reader, String base)(Code)(Java Doc)
public Model read(InputStream reader, String base)(Code)(Java Doc)
public Model read(String url, String lang)(Code)(Java Doc)
public Model read(String url, String base, String lang)(Code)(Java Doc)
public Model read(Reader reader, String base, String lang)(Code)(Java Doc)
public Model read(InputStream reader, String base, String lang)(Code)(Java Doc)
public Model register(ModelChangedListener listener)(Code)(Java Doc)
public String reifiedToString()(Code)(Java Doc)
public Model remove(Statement s)(Code)(Java Doc)
public Model remove(Resource s, Property p, RDFNode o)(Code)(Java Doc)
public Model remove(StmtIterator iter)(Code)(Java Doc)
public Model remove(Model m)(Code)(Java Doc)
public Model remove(Model m, boolean suppressReifications)(Code)(Java Doc)
public Model remove(Statement[] statements)(Code)(Java Doc)
public Model remove(List statements)(Code)(Java Doc)
public Model removeAll()(Code)(Java Doc)
public Model removeAll(Resource s, Property p, RDFNode o)(Code)(Java Doc)
public void removeAllReifications(Statement s)(Code)(Java Doc)
public PrefixMapping removeNsPrefix(String prefix)(Code)(Java Doc)
public void removeReification(ReifiedStatement rs)(Code)(Java Doc)
public boolean samePrefixMappingAs(PrefixMapping other)(Code)(Java Doc)
public static PrefixMapping setDefaultModelPrefixes(PrefixMapping pm)(Code)(Java Doc)
public PrefixMapping setNsPrefix(String prefix, String uri)(Code)(Java Doc)
public PrefixMapping setNsPrefixes(PrefixMapping pm)(Code)(Java Doc)
public PrefixMapping setNsPrefixes(Map map)(Code)(Java Doc)
public String setReaderClassName(String lang, String className)(Code)(Java Doc)
public String setWriterClassName(String lang, String className)(Code)(Java Doc)
public String shortForm(String uri)(Code)(Java Doc)
public long size()(Code)(Java Doc)
protected String statementsToString(StmtIterator it)(Code)(Java Doc)
public boolean supportsSetOperations()(Code)(Java Doc)
public boolean supportsTransactions()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public Model union(Model model)(Code)(Java Doc)
public Model unregister(ModelChangedListener listener)(Code)(Java Doc)
public PrefixMapping withDefaultMappings(PrefixMapping other)(Code)(Java Doc)
public Model write(Writer writer)(Code)(Java Doc)
public Model write(Writer writer, String lang)(Code)(Java Doc)
public Model write(Writer writer, String lang, String base)(Code)(Java Doc)
public Model write(OutputStream writer)(Code)(Java Doc)
public Model write(OutputStream writer, String lang)(Code)(Java Doc)
public Model write(OutputStream writer, String lang, String base)(Code)(Java Doc)

Fields inherited from com.hp.hpl.jena.enhanced.EnhGraph
protected Cache enhNodes(Code)(Java Doc)
protected Graph graph(Code)(Java Doc)

Methods inherited from com.hp.hpl.jena.enhanced.EnhGraph
public Graph asGraph()(Code)(Java Doc)
protected boolean canSupport(Class t)(Code)(Java Doc)
protected Polymorphic convertTo(Class t)(Code)(Java Doc)
final public boolean equals(Object o)(Code)(Java Doc)
public EnhNode getNodeAs(Node n, Class interf)(Code)(Java Doc)
public CacheControl getNodeCacheControl()(Code)(Java Doc)
protected Personality getPersonality()(Code)(Java Doc)
final public int hashCode()(Code)(Java Doc)
final public boolean isIsomorphicWith(EnhGraph eg)(Code)(Java Doc)
public boolean isValid()(Code)(Java Doc)
public void setNodeCache(Cache cc)(Code)(Java Doc)

Methods inherited from com.hp.hpl.jena.enhanced.Polymorphic
public synchronized void addView(Polymorphic other)(Code)(Java Doc)
protected boolean already(Class t)(Code)(Java Doc)
protected boolean alreadyHasView(Class t)(Code)(Java Doc)
final protected Polymorphic asInternal(Class t)(Code)(Java Doc)
abstract protected boolean canSupport(Class t)(Code)(Java Doc)
abstract protected Polymorphic convertTo(Class t)(Code)(Java Doc)
abstract public boolean equals(Object o)(Code)(Java Doc)
abstract protected Personality getPersonality()(Code)(Java Doc)
abstract public boolean isValid()(Code)(Java Doc)
public boolean supports(Class t)(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.