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


java.lang.Object
   com.hp.hpl.jena.reasoner.dig.DIGAdapter

DIGAdapter
public class DIGAdapter (Code)

An adapter class that mediates between a Jena InfGraph and a DIG reasoner process.


author:
   Ian Dickinson, HP Labs
author:
   (email)
version:
   CVS $Id: DIGAdapter.java,v 1.26 2008/01/02 12:07:11 andy_seaborne Exp $


Field Summary
final public static  StringANON_MARKER
    
final public static  ListKNOWN_CONCEPTS
    
final public static  DIGProfilePELLET_PROFILE
    
final public static  DIGProfileRACER_17_PROFILE
    
final public static  ListXSD_INT_TYPES
    
protected  Modelm_axioms
    
protected  Setm_conceptNames
    
protected  booleanm_conceptNamesAsked
    
protected  Setm_indNames
    
protected  booleanm_indNamesAsked
    
protected  DIGProfilem_profile
     The profile for the DIG interface this reasoner is interacting with.
protected  Setm_roleNames
    
protected  booleanm_roleNamesAsked
    
protected  OntModelm_sourceData
    
protected static  DIGQueryTranslator[]s_queryTable
    

Constructor Summary
public  DIGAdapter(OntModelSpec spec, Graph source)
    

Construct a DIG adapter for the given source data graph, which is encoding an ontology in a language represented by the given model spec.

public  DIGAdapter(OntModelSpec spec, Graph source, DIGConnection connection, Model axioms)
    

Construct a DIG adapter for the given source data graph, which is encoding an ontology in a language represented by the given model spec.


Parameters:
  spec - An ont model spec encoding the ontology language of the source graph
Parameters:
  source - The graph that contains the source data on which the DIG reasonerwill operate
Parameters:
  connection - A pre-configured DIG connection to use to communicate with theexternal reasoner
Parameters:
  axioms - A model containing axioms appropriate to the ontology languagethis adapter is processing.

Method Summary
public  voidaddClassDescription(Element elem, com.hp.hpl.jena.graph.Node node)
    

Add a DIG reference to the class identifed in the source graph by the given Jena graph Node to the given XML element.

public  voidaddClassDescription(Element elem, com.hp.hpl.jena.graph.Node node, Model sourceData)
    

Add a DIG reference to the class identifed in the source graph by the given Jena graph Node to the given XML element.

public  voidaddClassDescription(Element elem, Resource res, Model sourceData)
    

Add a DIG reference to the class identifed in the source graph by the given Jena resource to the given XML element.

protected  ElementaddElement(Element parent, String childName)
    
protected  voidaddNamedDefs(Element tell, Iterator i, String defType, Set nameCollection)
    
protected  ElementaddNamedElement(Element parent, String elemName, String uri)
    
protected  voidaddNamedEntities(Element tell)
    

In Dig, defXXX elements are required to introduce all named entities, such as concepts and roles.

public  voidclose()
    
protected  SetcollectNamedTerms(String queryType, String[] path)
    
protected  voidcollectRoleProperties(Collection roles)
    
public  ElementcreateQueryElement(Document query, String elemName)
    
public  ExtendedIteratorfind(TriplePattern pattern)
    

Basic pattern lookup interface - answer an iterator over the triples matching the given pattern.

public  ExtendedIteratorfind(TriplePattern pattern, Model premises)
    

Basic pattern lookup interface - answer an iterator over the triples matching the given (S,P,O) pattern, given also some premises for the query.

public  DIGConnectiongetConnection()
    
public  DIGIdentifiergetDigIdentifier()
    
public  GraphgetGraph()
    
protected  SetgetKnownConcepts()
    
protected  SetgetKnownIndividuals()
    
protected  SetgetKnownRoles()
    
public  StringgetNodeID(com.hp.hpl.jena.graph.Node n)
    
public  ProfilegetOntLanguage()
    
public  DIGProfilegetProfile()
    
public  DIGQueryTranslatorgetQueryTranslator(TriplePattern pattern, Model premises)
    

Answer the query translator that matches the given pattern, if any


Parameters:
  pattern - The triple pattern that has been received
Parameters:
  premises - A model containing the premises to a query (e.g.
public  IteratorgetRecentWarnings()
    
public  StringgetResourceID(Resource r)
    
public  OntModelSpecgetSourceSpecification()
    
public  booleanisConcept(com.hp.hpl.jena.graph.Node node, Model premises)
    
public  booleanisIndividual(com.hp.hpl.jena.graph.Node node)
    
public  booleanisRole(com.hp.hpl.jena.graph.Node node, Model premises)
    
public  voidresetKB()
    
public  voidsetProfile(DIGProfile profile)
    
protected  voidtranslateAllDifferent(Element expr, RDFList diffMembers)
    
protected  voidtranslateAllDifferentAxioms(Element expr)
    
protected  voidtranslateAttribRangeAxioms(Element expr, String propURI, Iterator i, String propType)
    
protected  voidtranslateAttribute(Element expr, DatatypeProperty attrib, Model source)
    
protected  voidtranslateAttributes(Element expr)
    
protected  voidtranslateBinaryPropertyAxioms(Element expr, String propURI, String axiomType, Iterator i, String propType)
    
protected  voidtranslateClassDescription(Element parent, OntClass classDescr, Model source)
    
protected  voidtranslateClassDisjointAxioms(Element tell)
    
protected  voidtranslateClassEquivalences(Element tell)
    
protected  voidtranslateClassExpressions(Element tell, Property p, int classExprType)
    

Translate class expressions, such as union classes, intersection classes, etc, into the DIG.

concept language.
protected  voidtranslateClassExpressions(Element tell, StmtIterator i, int classExprType, Model source)
    
protected  voidtranslateClassIdentifier(Element expr, Resource c)
    
protected  voidtranslateClassList(Element expr, RDFList operands, Model source)
    
protected  voidtranslateClasses(Element tell)
    
protected  voidtranslateComplementClass(Element expr, OntClass cls, Model source)
    
protected  voidtranslateDifferentIndividuals(Element expr, Individual ind, Individual other)
    
protected  voidtranslateDomainRangeAxioms(Element expr, String propURI, String axiomType, Iterator i, String propType, Model source)
    
protected  voidtranslateEnumeratedClass(Element expr, OntClass cls, Model source)
    
protected  voidtranslateHasValueRestriction(Element expr, HasValueRestriction r)
    

Translate a has value restriction to DIG form.

protected  voidtranslateIndividual(Element expr, Resource r)
    
protected  voidtranslateIndividuals(Element expr)
    
protected  voidtranslateInstanceAttrib(Element expr, Individual ind, OntProperty p, Literal obj)
    
protected  voidtranslateInstanceRole(Element expr, Individual ind, OntProperty p, Individual obj)
    
protected  voidtranslateInstanceTypes(Element expr, Individual ind)
    
protected  voidtranslateIntersectionClass(Element expr, OntClass cls, Model source)
    
protected  voidtranslateInverseAxiom(Element expr, Property p, String propType, Property inv)
    
protected  voidtranslateInverseAxioms(Element expr, ObjectProperty p, String propType)
    
protected  voidtranslateInverseFunctionalAxiom(Element expr, ObjectProperty role, String propType)
    
public  DocumenttranslateKbToDig()
    
protected  voidtranslateLiteral(Literal lit, Element parent)
    
protected  voidtranslateRestrictionClass(Element expr, Resource c, Model source)
    
protected  voidtranslateRestrictions(Element tell)
    
protected  voidtranslateRole(Element expr, ObjectProperty role, Model source)
    
protected  voidtranslateRoles(Element expr)
    
protected  voidtranslateSameIndividuals(Element expr, Individual ind, Individual other)
    
protected  voidtranslateSubClassAxioms(Element tell)
    
protected  voidtranslateUnaryPropertyAxiom(Element expr, String propURI, String axiomType, String propType)
    
protected  voidtranslateUnionClass(Element expr, OntClass cls, Model source)
    
public  booleanuploadKB()
    

Upload the entire contents of the local knowledge base (OWL/DAML model) to the DIG reasoner, using a single large TELL verb.

True if the ontology model was uploaded to DIG without any warnings.

Field Detail
ANON_MARKER
final public static String ANON_MARKER(Code)
Mark a bNode identifier



KNOWN_CONCEPTS
final public static List KNOWN_CONCEPTS(Code)
Well known concept URI's



PELLET_PROFILE
final public static DIGProfile PELLET_PROFILE(Code)
DIG profile for Pellet



RACER_17_PROFILE
final public static DIGProfile RACER_17_PROFILE(Code)
DIG profile for 1.7



XSD_INT_TYPES
final public static List XSD_INT_TYPES(Code)
Well known integer type URI's, these we will translate into DIG integer attributes



m_axioms
protected Model m_axioms(Code)
Model containing axiom statements



m_conceptNames
protected Set m_conceptNames(Code)
The set of known concept names from the DIG reasoner



m_conceptNamesAsked
protected boolean m_conceptNamesAsked(Code)
Flag that is set to true once we have asked the remote reasoner for its list of concept names



m_indNames
protected Set m_indNames(Code)
The set of known individual names from the DIG reasoner



m_indNamesAsked
protected boolean m_indNamesAsked(Code)
Flag that is set to true once we have asked the remote reasoner for its list of individual names



m_profile
protected DIGProfile m_profile(Code)
The profile for the DIG interface this reasoner is interacting with. Pellet



m_roleNames
protected Set m_roleNames(Code)
The set of known role names from the DIG reasoner



m_roleNamesAsked
protected boolean m_roleNamesAsked(Code)
Flag that is set to true once we have asked the remote reasoner for its list of role names



m_sourceData
protected OntModel m_sourceData(Code)
The graph that contains the data we are uploading to the external DIG reasoner



s_queryTable
protected static DIGQueryTranslator[] s_queryTable(Code)
The table that represents the query translations we know about




Constructor Detail
DIGAdapter
public DIGAdapter(OntModelSpec spec, Graph source)(Code)

Construct a DIG adapter for the given source data graph, which is encoding an ontology in a language represented by the given model spec. Allocates a new DIG connection using the default connection URL (http://localhost:8081).


Parameters:
  spec - An ont model spec encoding the ontology language of the source graph
Parameters:
  source - The graph that contains the source data on which the DIG reasonerwill operate



DIGAdapter
public DIGAdapter(OntModelSpec spec, Graph source, DIGConnection connection, Model axioms)(Code)

Construct a DIG adapter for the given source data graph, which is encoding an ontology in a language represented by the given model spec.


Parameters:
  spec - An ont model spec encoding the ontology language of the source graph
Parameters:
  source - The graph that contains the source data on which the DIG reasonerwill operate
Parameters:
  connection - A pre-configured DIG connection to use to communicate with theexternal reasoner
Parameters:
  axioms - A model containing axioms appropriate to the ontology languagethis adapter is processing. May be null.




Method Detail
addClassDescription
public void addClassDescription(Element elem, com.hp.hpl.jena.graph.Node node)(Code)

Add a DIG reference to the class identifed in the source graph by the given Jena graph Node to the given XML element. If the class is a named class, this will be a <catom> element, otherwise it will be a class description axiom. Assumes that the instance variable m_sourceData provides the statements that further define the class if it is a description not a name.


Parameters:
  elem - The parent XML element to which the class description will be attached
Parameters:
  node - An RDF graph node representing a class we wish to describe.



addClassDescription
public void addClassDescription(Element elem, com.hp.hpl.jena.graph.Node node, Model sourceData)(Code)

Add a DIG reference to the class identifed in the source graph by the given Jena graph Node to the given XML element. If the class is a named class, this will be a <catom> element, otherwise it will be a class description axiom.


Parameters:
  elem - The parent XML element to which the class description will be attached
Parameters:
  node - An RDF graph node representing a class we wish to describe.
Parameters:
  sourceData - A model containing the statements about the given class descriptionresource



addClassDescription
public void addClassDescription(Element elem, Resource res, Model sourceData)(Code)

Add a DIG reference to the class identifed in the source graph by the given Jena resource to the given XML element. If the class is a named class, this will be a <catom> element, otherwise it will be a class description axiom.


Parameters:
  elem - The parent XML element to which the class description will be attached
Parameters:
  res - An RDF resource representing a class we wish to describe.
Parameters:
  sourceData - A model containing the statements about the given class descriptionresource



addElement
protected Element addElement(Element parent, String childName)(Code)
Add to the given element a child element with the given name



addNamedDefs
protected void addNamedDefs(Element tell, Iterator i, String defType, Set nameCollection)(Code)

Add the named definitions from the given iterator to the tell document we are building.


Parameters:
  tell - The document being built
Parameters:
  i - An iterator over resources
Parameters:
  defType - The type of DIG element we want to build
Parameters:
  nameCollection - Optional set of names of this type of entity to collect



addNamedElement
protected Element addNamedElement(Element parent, String elemName, String uri)(Code)

Answer a element with the given element name, and with a attribute 'name' with the given uri as name.


Parameters:
  parent - The parent node to add to
Parameters:
  elemName - The element name, eg defconcept
Parameters:
  uri - The URI of the definition A named element




addNamedEntities
protected void addNamedEntities(Element tell)(Code)

In Dig, defXXX elements are required to introduce all named entities, such as concepts and roles. This method collects such definitions and adds the defXXX elements as children of the tell element.


Parameters:
  tell - The XML element, typically <tells>, to which to attach thedeclarations



close
public void close()(Code)

Close this adapter, and release the connector to the external DIG KB.




collectNamedTerms
protected Set collectNamedTerms(String queryType, String[] path)(Code)

Answer an iterator of named terms known to the DIG reasoner, from the cache if possible.


Parameters:
  queryType - The query verb for the ask
Parameters:
  path - A list of element names to extract the term names from the returned document An iterator of the known names of a particular type



collectRoleProperties
protected void collectRoleProperties(Collection roles)(Code)
Add all object properties (roles) to the given collection



createQueryElement
public Element createQueryElement(Document query, String elemName)(Code)

Create a new element to represent a query, adding to it a unique query ID.


Parameters:
  query - The query document
Parameters:
  elemName - The string name of the query element The new query element



find
public ExtendedIterator find(TriplePattern pattern)(Code)

Basic pattern lookup interface - answer an iterator over the triples matching the given pattern. Where possible, this query will first be given to the external reasoner, with the local graph used to generate supplemental bindings.


Parameters:
  pattern - a TriplePattern to be matched against the data An ExtendedIterator over all Triples in the data setthat match the pattern



find
public ExtendedIterator find(TriplePattern pattern, Model premises)(Code)

Basic pattern lookup interface - answer an iterator over the triples matching the given (S,P,O) pattern, given also some premises for the query. Where possible, this query will first be given to the external reasoner, with the local graph used to generate supplemental bindings.


Parameters:
  pattern - a TriplePattern to be matched against the data
Parameters:
  premises - A model containing additional premises for the find query,typically used to allow the subject and/or object to be an expressionrather than just a simple node An ExtendedIterator over all Triples in the data setthat match the pattern



getConnection
public DIGConnection getConnection()(Code)

Answer this adapter's connection to the database.

The DIG connector this adapter is using, or null if the connection hasbeen closed.



getDigIdentifier
public DIGIdentifier getDigIdentifier()(Code)

Answer the DIG identification structure we obtain by querying the attached reasoner.

An object containing the results of querying the reasoner for its identityand capabilities



getGraph
public Graph getGraph()(Code)

Answer the graph of local (source) data.

The graph containing the local source data.



getKnownConcepts
protected Set getKnownConcepts()(Code)

Answer an iterator of the concept names known to the DIG reasoner, from the cache if possible.

An iterator of the known concept names



getKnownIndividuals
protected Set getKnownIndividuals()(Code)

Answer an iterator of the individual names known to the DIG reasoner, from the cache if possible.

An iterator of the known individual names



getKnownRoles
protected Set getKnownRoles()(Code)

Answer an iterator of the role names known to the DIG reasoner, from the cache if possible.

An iterator of the known role names



getNodeID
public String getNodeID(com.hp.hpl.jena.graph.Node n)(Code)

Answer an identifier for a node, named or anon


Parameters:
  n - An RDF node A unique identifier for the node as a string, which will eitherbe the resource URI for named nodes, or a unique ID string for bNodes



getOntLanguage
public Profile getOntLanguage()(Code)

Answer the ontology language profile we're assuming in this reasoner.

The ontology language via the language profile



getProfile
public DIGProfile getProfile()(Code)

Answer the DIG profile for the DIG interface this reasoner is attached to.

A profile detailing the parameters of the DIG variant this reasoner is interacting with.



getQueryTranslator
public DIGQueryTranslator getQueryTranslator(TriplePattern pattern, Model premises)(Code)

Answer the query translator that matches the given pattern, if any


Parameters:
  pattern - The triple pattern that has been received
Parameters:
  premises - A model containing the premises to a query (e.g. a class expression) A DIG translator that can translate this pattern to a DIG query,or null if no matches.



getRecentWarnings
public Iterator getRecentWarnings()(Code)

Answer an iterator over any recent warnings returned from from the remote DIG reasoner.

An iterator over any warnings; if there are no warnings the returnvalue will be an iterator that returns hasNext() = false.



getResourceID
public String getResourceID(Resource r)(Code)

Answer an identifier for a resource, named or bNode


Parameters:
  r - A resource A unique identifier for the resource as a string, which will eitherbe the resource URI for named resources, or a unique ID string for bNodes



getSourceSpecification
public OntModelSpec getSourceSpecification()(Code)

Answer the ontology language specification for the source model underlying this DIG adapter.

The ontology model spec



isConcept
public boolean isConcept(com.hp.hpl.jena.graph.Node node, Model premises)(Code)

Answer true if the given node corresponds to one of the concepts known to the DIG reasoner.


Parameters:
  node - A node to test
Parameters:
  premises - A model defining premises that may encode more information aboutnode, or may be null True if node is a known concept



isIndividual
public boolean isIndividual(com.hp.hpl.jena.graph.Node node)(Code)

Answer true if the given node corresponds to one of the individuals known to the DIG reasoner.


Parameters:
  node - A node to test True if node is a known individual



isRole
public boolean isRole(com.hp.hpl.jena.graph.Node node, Model premises)(Code)

Answer true if the given node corresponds to one of the roles known to the DIG reasoner.


Parameters:
  node - A node to test
Parameters:
  premises - A model defining premises that may encode more information aboutnode, or may be null True if node is a known role



resetKB
public void resetKB()(Code)

Clear the old contents of the DIG knowledge base




setProfile
public void setProfile(DIGProfile profile)(Code)

Set the profile specifying the variable parts of the DIG profile that are being used in this instance.


Parameters:
  profile - The new DIG profile



translateAllDifferent
protected void translateAllDifferent(Element expr, RDFList diffMembers)(Code)
Translate a single AllDifferent declaration as a set of pair-wise disjoints



translateAllDifferentAxioms
protected void translateAllDifferentAxioms(Element expr)(Code)
Translate all of the AllDifferent axioms in the KB



translateAttribRangeAxioms
protected void translateAttribRangeAxioms(Element expr, String propURI, Iterator i, String propType)(Code)
Concrete ranges have special treatment



translateAttribute
protected void translateAttribute(Element expr, DatatypeProperty attrib, Model source)(Code)
Attributes (datatype properties) have fewer axiom choices than roles



translateAttributes
protected void translateAttributes(Element expr)(Code)
Translate all of the attribute (datatype properties) in the KB



translateBinaryPropertyAxioms
protected void translateBinaryPropertyAxioms(Element expr, String propURI, String axiomType, Iterator i, String propType)(Code)
Helper method for binary axioms each argument of which is an ratom element



translateClassDescription
protected void translateClassDescription(Element parent, OntClass classDescr, Model source)(Code)

Translate a node representing a class expression (presumed anonymous, though this is not tested) into the appropriate DIG class axiom.


Parameters:
  parent - The XML node that will be the parent of the class description axiom
Parameters:
  classDescr - An OntClass representing the class expression to be translated



translateClassDisjointAxioms
protected void translateClassDisjointAxioms(Element tell)(Code)

Translate any statements from the KB that indicates disjointness between two classes.


Parameters:
  tell - The XML element representing the tell verb we will attach thetranslations to.



translateClassEquivalences
protected void translateClassEquivalences(Element tell)(Code)

Translate the class equivalence axioms in the source model into DIG equalsc axioms.


Parameters:
  tell - The node representing the DIG tell verb



translateClassExpressions
protected void translateClassExpressions(Element tell, Property p, int classExprType)(Code)

Translate class expressions, such as union classes, intersection classes, etc, into the DIG.

concept language. The translations are attached to the given tell node.


Parameters:
  tell - The node representing the DIG tell verb
Parameters:
  p - A property that will require an implicit equivalence to be made explicitin a correct translation to DIG
Parameters:
  classExprType - Denotes the type of class expression we are translating



translateClassExpressions
protected void translateClassExpressions(Element tell, StmtIterator i, int classExprType, Model source)(Code)

A named owl:class with a class-construction axiom directly attached is implicitly an equivalence axiom with the anonymous class that has the given class construction.


Parameters:
  tell - The node representing the DIG tell verb
Parameters:
  i - A statement iterator whose subjects denote the class expressions to be translated
Parameters:
  classExprType - Denotes the type of class expression we are translating



translateClassIdentifier
protected void translateClassIdentifier(Element expr, Resource c)(Code)

Translate a given class resource into a DIG concept description, as a child of the given expression element


Parameters:
  expr - The parent expression element
Parameters:
  c - The concept resource



translateClassList
protected void translateClassList(Element expr, RDFList operands, Model source)(Code)

Translate a list of class descriptions into DIG concept descriptions




translateClasses
protected void translateClasses(Element tell)(Code)

Translate all of the classes in the current KB into descriptions using the DIG concept language, and attach the axioms generated to the given element.


Parameters:
  tell - The XML element, typically <tells>, to whichto attach the generated translations.



translateComplementClass
protected void translateComplementClass(Element expr, OntClass cls, Model source)(Code)
Translate a complement class to a not element



translateDifferentIndividuals
protected void translateDifferentIndividuals(Element expr, Individual ind, Individual other)(Code)
Translate differentFrom(i0, i1) we assert disjoint( iset(i0), iset(i1) )



translateDomainRangeAxioms
protected void translateDomainRangeAxioms(Element expr, String propURI, String axiomType, Iterator i, String propType, Model source)(Code)
Domain and range are translated as dig domain and range elements



translateEnumeratedClass
protected void translateEnumeratedClass(Element expr, OntClass cls, Model source)(Code)
Translate an enumerated class to an iset element



translateHasValueRestriction
protected void translateHasValueRestriction(Element expr, HasValueRestriction r)(Code)

Translate a has value restriction to DIG form. This is slightly tricky, because there is no direct translation in the DIG concept language. We translate a has value restriction with an individual value to a existential restriction of the singleton concept. We translate a has value restriction with a datatype value either to an exists restriction on an integer equality or a string equality, depending on the value.


Parameters:
  expr - The parent expression node
Parameters:
  r - The has value restriction to translate



translateIndividual
protected void translateIndividual(Element expr, Resource r)(Code)
Translate the various axioms pertaining to an individual



translateIndividuals
protected void translateIndividuals(Element expr)(Code)
Translate the individuals in the KB to DIG form



translateInstanceAttrib
protected void translateInstanceAttrib(Element expr, Individual ind, OntProperty p, Literal obj)(Code)
Translate a datatype property into a DIG value element



translateInstanceRole
protected void translateInstanceRole(Element expr, Individual ind, OntProperty p, Individual obj)(Code)
Translate an object property into a DIG related element



translateInstanceTypes
protected void translateInstanceTypes(Element expr, Individual ind)(Code)
The rdf:type of each individual becomes a DIG instanceof element



translateIntersectionClass
protected void translateIntersectionClass(Element expr, OntClass cls, Model source)(Code)
Translate an intersection class to an and element



translateInverseAxiom
protected void translateInverseAxiom(Element expr, Property p, String propType, Property inv)(Code)
Translate inverseOf as equality between the role and the inverse of the named inverse role



translateInverseAxioms
protected void translateInverseAxioms(Element expr, ObjectProperty p, String propType)(Code)
Axioms for all of the inverses of a property



translateInverseFunctionalAxiom
protected void translateInverseFunctionalAxiom(Element expr, ObjectProperty role, String propType)(Code)
To translate an inverse functional property, we must introduce a new skolem constant for the inverse role



translateKbToDig
public Document translateKbToDig()(Code)

Answer an XML document that contains the DIG translation of the local graph, wrapped as a tell verb

An XML document containing the tell verb



translateLiteral
protected void translateLiteral(Literal lit, Element parent)(Code)
Translate an RDF literal to an IVAL or SVAL element



translateRestrictionClass
protected void translateRestrictionClass(Element expr, Resource c, Model source)(Code)

Translate a given restriction resource into a DIG concept description, as a child of the given expression element


Parameters:
  expr - The parent expression element
Parameters:
  c - The restriction concept resource



translateRestrictions
protected void translateRestrictions(Element tell)(Code)

Translate the restrictions in the source model into the DIG concept language.


Parameters:
  tell - The node representing the DIG tell verb



translateRole
protected void translateRole(Element expr, ObjectProperty role, Model source)(Code)
Translate the various axioms that can apply to roles



translateRoles
protected void translateRoles(Element expr)(Code)
Translate all of the roles (ObjectProperties) in the KB



translateSameIndividuals
protected void translateSameIndividuals(Element expr, Individual ind, Individual other)(Code)
Translate sameAs(i0, i1) we assert equalc( iset(i0), iset(i1) )



translateSubClassAxioms
protected void translateSubClassAxioms(Element tell)(Code)

Translate the sub-class axioms in the source model into DIG impliesc axioms


Parameters:
  tell - The node representing the DIG tell verb



translateUnaryPropertyAxiom
protected void translateUnaryPropertyAxiom(Element expr, String propURI, String axiomType, String propType)(Code)
Helper method for unary axioms, the argument of which is an ratom element



translateUnionClass
protected void translateUnionClass(Element expr, OntClass cls, Model source)(Code)
Translate an union class to an or element



uploadKB
public boolean uploadKB()(Code)

Upload the entire contents of the local knowledge base (OWL/DAML model) to the DIG reasoner, using a single large TELL verb.

True if the ontology model was uploaded to DIG without any warnings. Recent warningsare available via DIGAdapter.getRecentWarnings
exception:
  DigReasonerException - If the upload fails for any reason. The error message fromthe DIG reasoner will be returned.



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.