com.hp.hpl.jena.daml.common
Class DAMLHierarchy

java.lang.Object
  |
  +--com.hp.hpl.jena.daml.common.DAMLHierarchy

public class DAMLHierarchy
extends java.lang.Object

Represents knowledge about the class and property hierarchies in the DAML spec, so that these can be available without forcing the user to import the DAML specification into their model each time. Uses Singleton pattern.

Version:
CVS info: $Id: DAMLHierarchy.java,v 1.3 2002/02/22 17:02:05 ian_dickinson Exp $
Author:
Ian Dickinson, HP Labs (email)

Field Summary
 Resource[][] DAML_STANDARD_CLASS_HIERARCHY
          Map of DAML and RDF standard classes that are super-classes of other DAML standard classes.
 Resource[][] DAML_STANDARD_EQUIVALENCES
          Known equivalences between DAML and RDFS values
 Property[] TRANSITIVE_PROPERTIES
          A list of well-known properties that are known a priori to be transitive
 
Method Summary
 java.util.Iterator getEquivalentValues(Resource res)
          Answer an iteration of those values that are equivalent to the given resource.
static DAMLHierarchy getInstance()
          Answer the singleton instance.
 boolean isDAMLSubClassOf(java.lang.String uri0, java.lang.String uri1)
          Answer true if the first URI represents a class in the standard DAML ontology that is a super-class of the class denoted by the second URI.
 boolean isTransitiveProperty(Resource res)
          Answer true if the given property is well-known to be transitive.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAML_STANDARD_CLASS_HIERARCHY

public Resource[][] DAML_STANDARD_CLASS_HIERARCHY
Map of DAML and RDF standard classes that are super-classes of other DAML standard classes. Assumes each class has at most one super-class.

DAML_STANDARD_EQUIVALENCES

public Resource[][] DAML_STANDARD_EQUIVALENCES
Known equivalences between DAML and RDFS values

TRANSITIVE_PROPERTIES

public Property[] TRANSITIVE_PROPERTIES
A list of well-known properties that are known a priori to be transitive
Method Detail

getInstance

public static DAMLHierarchy getInstance()
Answer the singleton instance.
Returns:
the unique DAMLHierarchy

isDAMLSubClassOf

public boolean isDAMLSubClassOf(java.lang.String uri0,
                                java.lang.String uri1)
Answer true if the first URI represents a class in the standard DAML ontology that is a super-class of the class denoted by the second URI. This is used to provide background knowledge from the standard DAML ontology without having to explicitly import it each time.
Parameters:
uri0 - A class URI
uri1 - A class URI
Returns:
true if the class denoted by uri0 is a sub-class of the class denoted by uri1

isTransitiveProperty

public boolean isTransitiveProperty(Resource res)
Answer true if the given property is well-known to be transitive. That is, it is transitive even though it is not marked as being in the class of transitive properties defined by the TransitiveProperty class. Note: this test does not check for rdf:type TransitiveProperty, it only tests the table of well-known transitive properties.
Parameters:
res - A resource
Returns:
True if the resource is a Property, and it is a member of the set of well-known transitive properties.

getEquivalentValues

public java.util.Iterator getEquivalentValues(Resource res)
Answer an iteration of those values that are equivalent to the given resource.
Parameters:
res - A resource, that may have known equivalent values
Returns:
an iteration over the resource's equivalent values, which may be empty but will not be null.


Copyright © 2001 Hewlett-Packard. All Rights Reserved.