info.sswap.api.model
Interface SSWAPPredicate

All Superinterfaces:
SSWAPElement, SSWAPModel
All Known Implementing Classes:
PredicateImpl

public interface SSWAPPredicate
extends SSWAPElement

Represents an RDF predicate in SSWAP. Predicates are distinct from properties, in that a predicate refers to the term itself, while a property is an instance of a predicate on an individual with an associated value (see SSWAPProperty). A SSWAPPredicate contains global statements, along with methods to manipulate owl:DatatypeProperty or owl:ObjectProperty definitions (e.g., adding their domains, ranges etc.).

Usually, a SSWAPPredicate is not created de novo; it is read from the Internet via SSWAPDocument.getPredicate(java.net.URI).

Author:
Blazej Bulka
See Also:
SSWAPDocument, SSWAPProperty

Method Summary
 void addAnnotationPredicate(SSWAPPredicate predicate, SSWAPElement value)
          Annotates a predicate with the given annotation predicate.
 void addDomain(SSWAPType type)
          Adds an rdfs:domain axiom to this predicate
 void addEquivalentPredicate(SSWAPPredicate predicate)
          Adds an owl:equivalentProperty axiom to this predicate
 void addInverseOf(SSWAPPredicate predicate)
          Adds owl:inverseOf axiom to this predicate
 void addRange(SSWAPDatatype datatype)
          Adds an rdfs:range axiom to this predicate
 void addRange(SSWAPType type)
          Adds an rdfs:range axiom to this predicate
 void addSubPredicateOf(SSWAPPredicate predicate)
          Adds an rdfs:subPropertyOf axiom to this type
 void addType(SSWAPType type)
          Adds the type information to this property (i.e., whether this is a DatatypeProperty, an ObjectProperty, FunctionalProperty, InverseProperty etc.)
 java.lang.String getDatatypePredicateRange()
          Gets the datatype for the range for a datatype predicate.
 java.util.Collection<java.lang.String> getDatatypePredicateRanges()
          Gets all the datatypes for the range for a datatype predicate.
 SSWAPType getDomain()
          Retrieves information about the domain of the specified predicate.
 SSWAPType getObjectPredicateRange()
          Gets the type for the range for an object predicate.
 java.util.Collection<SSWAPType> getObjectPredicateRanges()
          Gets all the types for the range for an object predicate.
 boolean isAnnotationPredicate()
          Checks whether the given predicate is defined as an annotation predicate
 boolean isDatatypePredicate()
          Checks whether the given predicate is defined as a datatype predicate
 boolean isObjectPredicate()
          Checks whether the given predicate is defined as an object predicate
 boolean isReserved()
          Checks whether the given predicate belongs to restricted vocabulary (e.g., predicates defined in RDF, RDFS, OWL or SSWAP namespaces).
 boolean isStrictSubPredicateOf(SSWAPPredicate sup)
          Checks whether this predicate is a strict sub predicate of the other.
 boolean isSubPredicateOf(SSWAPPredicate sup)
          Checks whether this predicate is a sub predicate of other.
 
Methods inherited from interface info.sswap.api.model.SSWAPElement
addComment, addLabel, asBoolean, asDouble, asIndividual, asInteger, asList, asLiteral, asString, getComment, getLabel, isIndividual, isList, isLiteral
 
Methods inherited from interface info.sswap.api.model.SSWAPModel
addImport, checkProfile, dereference, dereference, doClosure, getDocument, getImports, getInputStream, getNsPrefixMap, getReasoningService, getTypeSignature, getURI, isDereferenced, removeImport, removeNsPrefix, serialize, serialize, setNsPrefix, validate
 

Method Detail

addType

void addType(SSWAPType type)
Adds the type information to this property (i.e., whether this is a DatatypeProperty, an ObjectProperty, FunctionalProperty, InverseProperty etc.)

Parameters:
type - the type to be added.

addSubPredicateOf

void addSubPredicateOf(SSWAPPredicate predicate)
Adds an rdfs:subPropertyOf axiom to this type

Parameters:
predicate - the super predicate type

addDomain

void addDomain(SSWAPType type)
Adds an rdfs:domain axiom to this predicate

Parameters:
type - the domain of this predicate

addRange

void addRange(SSWAPType type)
Adds an rdfs:range axiom to this predicate

Parameters:
type - the domain of this predicate

addRange

void addRange(SSWAPDatatype datatype)
Adds an rdfs:range axiom to this predicate

Parameters:
datatype - the domain of this predicate

addEquivalentPredicate

void addEquivalentPredicate(SSWAPPredicate predicate)
Adds an owl:equivalentProperty axiom to this predicate

Parameters:
predicate - the other equivalent predicate

addInverseOf

void addInverseOf(SSWAPPredicate predicate)
Adds owl:inverseOf axiom to this predicate

Parameters:
predicate - the inverse predicate to this one

addAnnotationPredicate

void addAnnotationPredicate(SSWAPPredicate predicate,
                            SSWAPElement value)
Annotates a predicate with the given annotation predicate.

Parameters:
predicate - the predicate to be used in annotation

isSubPredicateOf

boolean isSubPredicateOf(SSWAPPredicate sup)
Checks whether this predicate is a sub predicate of other.

Parameters:
sup - the potential super predicate
Returns:
true if this is a subpredicate of sup

isStrictSubPredicateOf

boolean isStrictSubPredicateOf(SSWAPPredicate sup)
Checks whether this predicate is a strict sub predicate of the other.

Parameters:
sup - the potential strict super predicate
Returns:
true if this is a strict sub predicate of sup

getObjectPredicateRange

SSWAPType getObjectPredicateRange()
                                  throws java.lang.IllegalArgumentException
Gets the type for the range for an object predicate. If the predicate has more than one type for the range, this method will return an intersection of all these types. If the range is not defined, this method will return owl:Thing.

Returns:
the type for the range for an object predicate
Throws:
java.lang.IllegalArgumentException - if this predicate is not an object predicate

getObjectPredicateRanges

java.util.Collection<SSWAPType> getObjectPredicateRanges()
                                                         throws java.lang.IllegalArgumentException
Gets all the types for the range for an object predicate.

Returns:
the collection of types for the object predicate
Throws:
java.lang.IllegalArgumentException - if this predicate is not an object predicate

getDatatypePredicateRange

java.lang.String getDatatypePredicateRange()
                                           throws java.lang.IllegalArgumentException
Gets the datatype for the range for a datatype predicate. In the rare case, when a datatype predicate has more than one range, this method will only return the first datatype. To retrieve all datatypes use getDatatypePredicateRanges().

Returns:
the URI of the datatype or null, if not known
Throws:
java.lang.IllegalArgumentException - if this predicate is not a datatype predicate

getDatatypePredicateRanges

java.util.Collection<java.lang.String> getDatatypePredicateRanges()
                                                                  throws java.lang.IllegalArgumentException
Gets all the datatypes for the range for a datatype predicate.

Returns:
collection of URIs for the range of the datatype predicate
Throws:
java.lang.IllegalArgumentException - if this predicate is not a datatype predicate

getDomain

SSWAPType getDomain()
Retrieves information about the domain of the specified predicate. If the domain of the predicate has more than one type, this method will return an intersection of all the types in the domain. If the domain is not defined, this method will return owl:Thing.

Returns:
the type for the domain of this predicate

isObjectPredicate

boolean isObjectPredicate()
Checks whether the given predicate is defined as an object predicate

Returns:
true if the predicate is defined as an object predicate

isDatatypePredicate

boolean isDatatypePredicate()
Checks whether the given predicate is defined as a datatype predicate

Returns:
true if the predicate is defined as a datatype predicate

isAnnotationPredicate

boolean isAnnotationPredicate()
Checks whether the given predicate is defined as an annotation predicate

Returns:
true if the predicate is defined as an annotation predicate

isReserved

boolean isReserved()
Checks whether the given predicate belongs to restricted vocabulary (e.g., predicates defined in RDF, RDFS, OWL or SSWAP namespaces).

Returns:
true if the predicate belongs to restricted vocabulary.


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.