com.hp.hpl.jena.ontology.daml
Interface DAMLCommon

All Superinterfaces:
FrontsNode, OntResource, RDFNode, Resource
All Known Subinterfaces:
DAMLClass, DAMLDataInstance, DAMLDatatype, DAMLDatatypeProperty, DAMLInstance, DAMLObjectProperty, DAMLOntology, DAMLProperty, DAMLRestriction

public interface DAMLCommon
extends OntResource

Abstract super-class for all DAML resources (including properties). Defines shared implementations and common services, such as property manipulation, vocabulary management and rdf:type management. Also defines accessors for common properties, including comment, label, and equivalentTo.

Version:
CVS info: $Id: DAMLCommon.java,v 1.10 2005/02/21 12:04:58 andy_seaborne Exp $
Author:
Ian Dickinson, HP Labs (email)

Method Summary
 DAMLModel getDAMLModel()
          Answer the DAML model wherein this value is stored.
 ExtendedIterator getEquivalenceSet()
          Answer the set of equivalent values to this value, but not including the value itself.
 ExtendedIterator getEquivalentValues()
          Answer an iterator over all of the DAML objects that are equivalent to this value under the daml:equivalentTo relation.
 ExtendedIterator getRDFTypes(boolean complete)
          Answer an iterator over all of the types to which this resource belongs.
 DAMLVocabulary getVocabulary()
          Answer the DAML+OIL vocabulary that corresponds to the namespace that this value was declared in.
 LiteralAccessor prop_comment()
          Accessor for the property of the comment on the value, whose value is a literal (string).
 PropertyAccessor prop_equivalentTo()
          Property accessor for the equivalentTo property.
 LiteralAccessor prop_label()
          Accessor for the property of the label on the value, whose value is a literal (string).
 PropertyAccessor prop_type()
          Property accessor for the rdf:type property of a DAML value.
 void setRDFType(Resource rdfClass, boolean replace)
          Deprecated. Use OntResource.addRDFType(com.hp.hpl.jena.rdf.model.Resource) or OntResource.setRDFType(com.hp.hpl.jena.rdf.model.Resource).
 
Methods inherited from interface com.hp.hpl.jena.ontology.OntResource
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfo
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.Resource
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getNode, getProperty, getRequiredProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, removeAll, removeProperties, toString
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFNode
as, canAs, inModel, isAnon, isLiteral, isResource, isURIResource, visitWith
 
Methods inherited from interface com.hp.hpl.jena.graph.FrontsNode
asNode
 

Method Detail

getDAMLModel

DAMLModel getDAMLModel()

Answer the DAML model wherein this value is stored.

Returns:
a DAMLModel reference.

setRDFType

void setRDFType(Resource rdfClass,
                boolean replace)
Deprecated. Use OntResource.addRDFType(com.hp.hpl.jena.rdf.model.Resource) or OntResource.setRDFType(com.hp.hpl.jena.rdf.model.Resource).

Add an RDF type property for this node in the underlying model. If the replace flag is true, this type will replace any current type property for the node. Otherwise, the type will be in addition to any existing type property.

Deprecated in favour of OntResource.addRDFType(com.hp.hpl.jena.rdf.model.Resource) for add, or OntResource.setRDFType(com.hp.hpl.jena.rdf.model.Resource) for replace.

Parameters:
rdfClass - The RDF resource denoting the class that will be new value for the rdf:type property.
replace - If true, the given class will replace any existing type property for this value, otherwise it will be added as an extra type statement.

getRDFTypes

ExtendedIterator getRDFTypes(boolean complete)

Answer an iterator over all of the types to which this resource belongs. Optionally, restrict the results to the most specific types, so that any class that is subsumed by another class in this resource's set of types is not reported.

Note: that the interpretation of the complete flag has changed since Jena 1.x. Previously, the boolean flag was to generated the transitive closure of the class hierarchy; this is now handled by the underlyin inference graph (if specified). Now the flag is used to restrict the returned values to the most-specific types for this resource.

Parameters:
complete - If true, return all known types; if false, return only the most-specific types.
Returns:
an iterator over the set of this value's classes

getVocabulary

DAMLVocabulary getVocabulary()

Answer the DAML+OIL vocabulary that corresponds to the namespace that this value was declared in.

Returns:
A vocabulary object

getEquivalentValues

ExtendedIterator getEquivalentValues()

Answer an iterator over all of the DAML objects that are equivalent to this value under the daml:equivalentTo relation. Note that the first member of the iteration is always the DAML value on which the method is invoked: trivially, a value is a member of the set of values equivalent to itself. If the caller wants the set of values equivalent to this one, not including itself, simply ignore the first element of the iteration.

Returns:
An iterator ranging over every equivalent DAML value

getEquivalenceSet

ExtendedIterator getEquivalenceSet()

Answer the set of equivalent values to this value, but not including the value itself. The iterator will range over a set: each element occurs only once.

Returns:
An iteration ranging over the set of values that are equivalent to this value, but not itself.

prop_label

LiteralAccessor prop_label()

Accessor for the property of the label on the value, whose value is a literal (string).

Returns:
Literal accessor for the label property

prop_comment

LiteralAccessor prop_comment()

Accessor for the property of the comment on the value, whose value is a literal (string).

Returns:
Literal accessor for the comment property

prop_equivalentTo

PropertyAccessor prop_equivalentTo()

Property accessor for the equivalentTo property. This denotes that two terms have the same meaning. The DAML spec helpfully says: for equivalentTo(X, Y), read X is an equivalent term to Y.

Returns:
Property accessor for equivalentTo.

prop_type

PropertyAccessor prop_type()

Property accessor for the rdf:type property of a DAML value.

Returns:
Property accessor for rdf:type


Copyright © 2000, 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP