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


com.hp.hpl.jena.ontology.OntModel

All known Subclasses:   com.hp.hpl.jena.ontology.impl.OntModelImpl,
OntModel
public interface OntModel extends InfModel(Code)

An enhanced view of a Jena model that is known to contain ontology data, under a given ontology Profile vocabulary (such as OWL). This class does not by itself compute the deductive extension of the graph under the semantic rules of the language. Instead, we wrap an underlying model with this ontology interface, that presents a convenience syntax for accessing the language elements. Depending on the inference capability of the underlying model, the OntModel will appear to contain more or less triples. For example, if this class is used to wrap a plain memory or database model, only the relationships asserted by the document will be reported through this convenience API. Alternatively, if the OntModel wraps an OWL inferencing model, the inferred triples from the extension will be reported as well. For example, assume the following ontology fragment:

 :A rdf:type owl:Class .
 :B rdf:type owl:Class ; rdfs:subClassOf :A .
 :widget rdf:type :B .
 
In a non-inferencing model, the rdf:type of the widget will be reported as class :B only. In a model that can process the OWL semantics, the widget's types will include :B, :A, and owl:Thing.

Note: that OntModel is an extension to the InfModel interface. This is to support the case where an ontology model wraps an inference graph, and we want to make the special capabilities of the InfModel, for example global consistency checking, accessible to client programs. Since not all ont models use a reasoner, using these methods may result in a runtime exception, though the typical behaviour is that such calls will be silently ignored.


author:
   Ian Dickinson, HP Labs
author:
   (email)
version:
   CVS $Id: OntModel.java,v 1.55 2008/01/23 12:47:17 ian_dickinson Exp $




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.

public  voidaddSubModel(Model model, boolean rebind)
    

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

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)
    

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, or null.
public  HasValueRestrictioncreateHasValueRestriction(String uri, Property prop, RDFNode value)
    
public  IndividualcreateIndividual(Resource cls)
    

Answer a resource that represents an Individual 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  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)
    

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 (i.e.
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)
    
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  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  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()
    
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 minimum 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()
    

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

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. This method requires that the separate download owlsyntax.jar is on the Java classpath. The three possible return values are com.hp.hpl.jena.vocabulary.OWL.FULL_LANG FULL_LANG for OWL-full, com.hp.hpl.jena.vocabulary.OWL.DL_LANG DL_LANG for OWL-DL or com.hp.hpl.jena.vocabulary.OWL.LITE_LANG LITE_LANG for OWL-Lite. Note that these URI's are not officially sanctioned by the WebOnt working group.

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  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 descriptions.

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 distinction, 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 distinction, 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.

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.

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.

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.

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.

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.

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).

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.

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  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).

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  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  Modelwrite(Writer writer)
    

Write the model as an XML document. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data).

public  Modelwrite(Writer writer, String lang)
    

Write a serialized representation of a model in a specified language. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data).

public  Modelwrite(Writer writer, String lang, String base)
    

Write a serialized representation of a model in a specified language. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data).

public  Modelwrite(OutputStream out)
    

Write a serialization of this model as an XML document. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data).

public  Modelwrite(OutputStream out, String lang)
    

Write a serialized representation of this model in a specified language. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data).

public  Modelwrite(OutputStream out, String lang, String base)
    

Write a serialized representation of a model in a specified language. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data).

public  ModelwriteAll(Writer writer, String lang, String base)
    

Write a serialized representation of all of the contents of the model, including inferred statements and statements imported from other documents.

public  ModelwriteAll(OutputStream out, String lang, String base)
    

Write a serialized representation of all of the contents of the model, including inferred statements and statements imported from other documents.




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. Will cause the associated inference engine (if any) to update, so this may be an expensive operation in some cases.


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



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.


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)



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 anomaly 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 anomaly 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 writable sub-model of the ontology model.


Parameters:
  uri - The URI for the annotation property. May not be null. 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 cardinality-q 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 cardinality 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 writable sub-model 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 - A list 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:   OntModel.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 writable sub-model 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, or null. 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 Individual node in this model. A new anonymous resource will be created in the writable sub-model of the ontology model.


Parameters:
  cls - Resource representing the ontology class to which the individual belongs A new anonymous 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 writable sub-model 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:   OntModel.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.



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 max-cardinality-q 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 max-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 minimum cardinality of the property
Parameters:
  cls - The class to which all values of the restricted property should belong A new resource representing a min-cardinality-q 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:   OntModel.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 writable sub-model 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 OntModel.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 writable sub-model 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 (i.e. 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 writable sub-model 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, or null to omit from the 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 writable sub-model 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, or null to omit from the 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:   OntModel.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:   OntModel.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 undecidable. 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 descriptions


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



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



getBaseModel
public Model getBaseModel()(Code)

Answer the base model of this model. The base model is the model that contains the triples read from the source document for this ontology. It is therefore this base 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



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 by default, an ontology model is constructed with a reference to the shared, global document manager. Thus changing the settings via this model's document manager may affect other models also using the same instance.

A reference to this model's document manager



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 for this model.

This model's event manager



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 model maker



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 required 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 max-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 minimum 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 minimum 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 minimum cardinality restriction, or null



getModelMaker
public ModelMaker getModelMaker()(Code)

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

The local model maker



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. This method requires that the separate download owlsyntax.jar is on the Java classpath. The three possible return values are com.hp.hpl.jena.vocabulary.OWL.FULL_LANG FULL_LANG for OWL-full, com.hp.hpl.jena.vocabulary.OWL.DL_LANG DL_LANG for OWL-DL or com.hp.hpl.jena.vocabulary.OWL.LITE_LANG 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 appropriately. In addition to the method return value, the given problems list, if non-null, will be filled with the syntax problems detected by the syntax 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.

Note that performing this test requires every statement in the model to be examined, so it can be quite an expensive operation on large models, or on persistent database models.


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



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 graphs that are contained in 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 descriptions. 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



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 distinction, 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 distinction, 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.

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 OntModel.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 OntModel.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).

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 classes, classes, classes, classes, classes and .

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.

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 .

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.

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.OntModel.listSubModels(boolean)
See Also:   OntModel.listSubModels()
See Also:   OntModel.listSubModels(boolean)



listImportedOntologyURIs
public Set listImportedOntologyURIs()(Code)

Answer a list of the imported URI's in this ontology model. Detection of imports statements 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.

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 statements 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, and so on transitively. A set of imported ontology URIs. 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.

An iterator over individual resources.



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.

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.

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 .

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 OntModel.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 .

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).

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



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 OntModel.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 OntModel.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 OntModel.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:   OntModel.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.

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 .




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.



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 inference engine (if any) to update, so this may be an expensive operation in some cases.


Parameters:
  model - A sub-model to remove
See Also:   OntModel.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)



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:   OntModel.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



write
public Model write(Writer writer)(Code)

Write the model as an XML document. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data). To write all triples, including imported data and inferred triples, use OntModel.writeAll(Writer,String,String) writeAll .


Parameters:
  writer - A writer to which the XML will be written this model



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

Write a serialized representation of a model in a specified language. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data). To write all triples, including imported data and inferred triples, use OntModel.writeAll(Writer,String,String) writeAll .

The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented by null is "RDF/XML".


Parameters:
  writer - The output writer
Parameters:
  lang - The output language this model



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

Write a serialized representation of a model in a specified language. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data). To write all triples, including imported data and inferred triples, use OntModel.writeAll(Writer,String,String) writeAll .

The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented by null, is "RDF/XML".


Parameters:
  writer - The output writer
Parameters:
  base - The base URI for relative URI calculations.null means use only absolute URI's.
Parameters:
  lang - The language in which the RDF should be written this model



write
public Model write(OutputStream out)(Code)

Write a serialization of this model as an XML document. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data). To write all triples, including imported data and inferred triples, use OntModel.writeAll(OutputStream,String,String) writeAll .

The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value is represented by null is "RDF/XML".


Parameters:
  out - The output stream to which the XML will be written This model



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

Write a serialized representation of this model in a specified language. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data). To write all triples, including imported data and inferred triples, use OntModel.writeAll(OutputStream,String,String) writeAll .

The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented by null, is "RDF/XML".


Parameters:
  out - The output stream to which the RDF is written
Parameters:
  lang - The output language This model



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

Write a serialized representation of a model in a specified language. Note: This method is adapted for the ontology model to write out only the base model (which contains the asserted data). To write all triples, including imported data and inferred triples, use OntModel.writeAll(OutputStream,String,String) writeAll .

The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented by null, is "RDF/XML".


Parameters:
  out - The output stream to which the RDF is written
Parameters:
  base - The base URI to use when writing relative URI's. nullmeans use only absolute URI's.
Parameters:
  lang - The language in which the RDF should be written This model



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

Write a serialized representation of all of the contents of the model, including inferred statements and statements imported from other documents. To write only the data asserted in the base model, use OntModel.write(Writer,String,String) write . It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors.

The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented by null, is "RDF/XML".


Parameters:
  writer - The output writer
Parameters:
  base - The base URI for relative URI calculations.null means use only absolute URI's.
Parameters:
  lang - The language in which the RDF should be written This model



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

Write a serialized representation of all of the contents of the model, including inferred statements and statements imported from other documents. To write only the data asserted in the base model, use OntModel.write(OutputStream,String,String) write .

The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented by null, is "RDF/XML".


Parameters:
  out - The output stream to which the RDF is written
Parameters:
  base - The base URI to use when writing relative URI's. nullmeans use only absolute URI's.
Parameters:
  lang - The language in which the RDF should be written This model



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