|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.impl.empire.model.ModelImpl
info.sswap.impl.empire.model.ElementImpl
info.sswap.impl.empire.model.PredicateImpl
public class PredicateImpl
Implementation of SSWAPPredicate. (A definition of a property.)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.clarkparsia.empire.SupportsRdfId |
---|
com.clarkparsia.empire.SupportsRdfId.BNodeKey, com.clarkparsia.empire.SupportsRdfId.RdfKey<T>, com.clarkparsia.empire.SupportsRdfId.URIKey |
Field Summary | |
---|---|
private static java.util.Set<com.hp.hpl.jena.rdf.model.Property> |
BUILTIN_ANNOTATION_PROPS
|
private com.clarkparsia.empire.SupportsRdfId.RdfKey |
rdfKey
The RDF identifier of this type. |
private com.hp.hpl.jena.rdf.model.Resource |
resource
The Jena resource that defines this type (important for fast access to type information). |
Constructor Summary | |
---|---|
PredicateImpl(SourceModel parent,
java.net.URI uri)
Creates a property definition. |
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 propertyDef)
Adds an owl:equivalentProperty axiom to this predicate |
void |
addInverseOf(SSWAPPredicate propertyDef)
Adds owl:inverseOf axiom to this predicate |
void |
addRange(SSWAPDatatype type)
Adds an rdfs:range axiom to this predicate |
void |
addRange(SSWAPType type)
Adds an rdfs:range axiom to this predicate |
void |
addSubPredicateOf(SSWAPPredicate propertyDef)
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.) |
boolean |
equals(java.lang.Object o)
|
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. |
com.clarkparsia.empire.SupportsRdfId.RdfKey |
getRdfId()
Gets the RDF identifier of this type. |
private ReasoningServiceImpl |
getReasoningServiceImpl()
|
(package private) com.hp.hpl.jena.rdf.model.Resource |
getResource()
Gets the corresponding Jena resource for this property. |
int |
hashCode()
Overridden hash code method to make sure that the generated hashcodes are consistent with the overriden equals() method. |
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. |
void |
setRdfId(com.clarkparsia.empire.SupportsRdfId.RdfKey rdfKey)
Sets the RDF identifier of this type. |
Methods inherited from class info.sswap.impl.empire.model.ElementImpl |
---|
addComment, addLabel, asBoolean, asDouble, asIndividual, asInteger, asList, asLiteral, asString, getComment, getJenaResource, getLabel, isAnonymous, isIndividual, isList, isLiteral |
Methods inherited from class info.sswap.impl.empire.model.ModelImpl |
---|
addImport, assertModel, assertSourceModel, checkProfile, dereference, dereference, doClosure, getAllDependentObjects, getDependentObject, getDocument, getExpressivity, getImports, getInputStream, getNsPrefixMap, getReasoningService, getSourceModel, getTypeSignature, getURI, hasSourceModel, hasSourceModelWithEntityManager, isDereferenced, persist, rdfIdEquals, rdfIdHashCode, refresh, refreshSiblings, removeImport, removeNsPrefix, serialize, serialize, setDereferenced, setNsPrefix, setSourceModel, setURI, validate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
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 |
Field Detail |
---|
private static final java.util.Set<com.hp.hpl.jena.rdf.model.Property> BUILTIN_ANNOTATION_PROPS
private com.clarkparsia.empire.SupportsRdfId.RdfKey rdfKey
private com.hp.hpl.jena.rdf.model.Resource resource
Constructor Detail |
---|
public PredicateImpl(SourceModel parent, java.net.URI uri)
parent
- the source model to which this predicate belongsuri
- the URI of the property.Method Detail |
---|
com.hp.hpl.jena.rdf.model.Resource getResource()
public com.clarkparsia.empire.SupportsRdfId.RdfKey getRdfId()
getRdfId
in interface com.clarkparsia.empire.SupportsRdfId
public void setRdfId(com.clarkparsia.empire.SupportsRdfId.RdfKey rdfKey)
setRdfId
in interface com.clarkparsia.empire.SupportsRdfId
rdfKey
- the RDF identifier of this type (URL or BNode identifier).public void addDomain(SSWAPType type)
SSWAPPredicate
addDomain
in interface SSWAPPredicate
type
- the domain of this predicatepublic void addEquivalentPredicate(SSWAPPredicate propertyDef)
SSWAPPredicate
addEquivalentPredicate
in interface SSWAPPredicate
propertyDef
- the other equivalent predicatepublic void addInverseOf(SSWAPPredicate propertyDef)
SSWAPPredicate
addInverseOf
in interface SSWAPPredicate
propertyDef
- the inverse predicate to this onepublic void addRange(SSWAPType type)
SSWAPPredicate
addRange
in interface SSWAPPredicate
type
- the domain of this predicatepublic void addRange(SSWAPDatatype type)
SSWAPPredicate
addRange
in interface SSWAPPredicate
type
- the domain of this predicatepublic void addSubPredicateOf(SSWAPPredicate propertyDef)
SSWAPPredicate
addSubPredicateOf
in interface SSWAPPredicate
propertyDef
- the super predicate typepublic void addType(SSWAPType type)
SSWAPPredicate
addType
in interface SSWAPPredicate
type
- the type to be added.public void addAnnotationPredicate(SSWAPPredicate predicate, SSWAPElement value)
SSWAPPredicate
addAnnotationPredicate
in interface SSWAPPredicate
predicate
- the predicate to be used in annotationpublic boolean isObjectPredicate()
SSWAPPredicate
isObjectPredicate
in interface SSWAPPredicate
public boolean isDatatypePredicate()
SSWAPPredicate
isDatatypePredicate
in interface SSWAPPredicate
public boolean isAnnotationPredicate()
SSWAPPredicate
isAnnotationPredicate
in interface SSWAPPredicate
private ReasoningServiceImpl getReasoningServiceImpl()
public boolean isSubPredicateOf(SSWAPPredicate sup)
SSWAPPredicate
isSubPredicateOf
in interface SSWAPPredicate
sup
- the potential super predicate
public boolean isStrictSubPredicateOf(SSWAPPredicate sup)
SSWAPPredicate
isStrictSubPredicateOf
in interface SSWAPPredicate
sup
- the potential strict super predicate
public SSWAPType getObjectPredicateRange()
SSWAPPredicate
getObjectPredicateRange
in interface SSWAPPredicate
public java.util.Collection<SSWAPType> getObjectPredicateRanges()
SSWAPPredicate
getObjectPredicateRanges
in interface SSWAPPredicate
public java.lang.String getDatatypePredicateRange()
SSWAPPredicate
getDatatypePredicateRange
in interface SSWAPPredicate
public java.util.Collection<java.lang.String> getDatatypePredicateRanges()
SSWAPPredicate
getDatatypePredicateRanges
in interface SSWAPPredicate
public SSWAPType getDomain()
SSWAPPredicate
getDomain
in interface SSWAPPredicate
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isReserved()
SSWAPPredicate
isReserved
in interface SSWAPPredicate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |