|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.jastor.inference.OntologyProperty
public class OntologyProperty
Represents an Ontology Property
| Field Summary | |
|---|---|
static org.openrdf.model.URI |
DEFAULT_RANGE
this uri is a placeholder for the default range of a property that is returned by getAllReturnTypes. |
static int |
ROLE_EXTENSIONCLASS
This property is defined in an extension class |
static int |
ROLE_HERE
This property is defined within itself |
static int |
ROLE_LOOSE_RESTRICTION
This property is a placeholder for a loose restriction to send downstream |
| Constructor Summary | |
|---|---|
OntologyProperty(_Property ontProperty,
JastorContext ctx)
This version of the constructor should only be use if the instance is used for utility methods on the property..i.e. |
|
OntologyProperty(_Property ontProperty,
OntologyClass ontologyClass)
Create a new Property |
|
| Method Summary | |
|---|---|
void |
addRestriction(Restriction res)
Add a restriction to the property |
void |
addRestrictions(java.util.List<Restriction> res)
Add a list of restrictions to the property |
static java.lang.String |
capitalize(java.lang.String string)
Capitalize the first letter of a String |
boolean |
equals(java.lang.Object o)
|
OntologyClass |
getActiveClass()
Get the ontology class begin generated. |
OntologyComment |
getComment()
Get the comment info for this property |
static Class |
getDomain(_Property ontProperty)
Get the domain bean for the given property |
java.util.List<org.openrdf.model.Value> |
getHasValueValues()
Return a list of RDFNodes that are values of hasValue for this property |
OntologyClass |
getOntologyClass()
Get the ontology class that declares this property |
_Property |
getOntProperty()
Get the jastor Property bean for this property |
Restriction |
getPrimaryRestriction()
yields the restriction declared with the original declaration of the property |
java.lang.String |
getPropertyCapped()
Return the name of the property capitalized, should be prepended for use in method names |
java.lang.String |
getPropertyCapped(org.openrdf.model.Resource restrictedRange)
Return the name of the property capitalized, should be prepended for use in method names * |
java.lang.String |
getPropertyName()
Return the name of the property to be used for variable names and as a prefix for vocabulary property constants |
java.lang.String |
getPropertyName(org.openrdf.model.Resource restrictedRange)
Return the name of the property to be used for variable names and constants using the restricted range argument |
static GraphThing |
getRange(_Property ontProperty)
Get the range bean for the given property |
OntologyClass |
getRangeOntologyClass()
Get the ontology class for the default range of this property |
OntologyClass |
getRangeOntologyClass(org.openrdf.model.Resource range)
Get the ontology class for the given range of this property |
java.lang.String |
getRangeURI()
Get the string representation of the full range datatype URI |
java.lang.String |
getRangeURI(org.openrdf.model.Resource res)
Get the string representation of the full range datatype URI |
java.util.List<Restriction> |
getRestrictions()
Get the list of restrictions for the property |
java.lang.String |
getReturnType()
Get the string representation of the full java name of the return type for this property. |
java.lang.String |
getReturnType(org.openrdf.model.Resource range)
Get the string representation of the full java name of the return type for this property. |
int |
getRole()
Get the role of the property's participation in the owning class. |
java.lang.String |
getURI()
Get the Property's URI |
boolean |
isDatatypeProperty()
Determine if this is a Datatype property |
boolean |
isLooseRestriction()
Returns whether or not this instance is a placeholder for a restriction on a property |
boolean |
isMultiValued()
Determine if this property can take on multiple values |
boolean |
isObjectProperty()
Determine if this is an Object property |
boolean |
isSingleValued()
Determine if this property is single valued |
java.lang.Iterable<org.openrdf.model.Resource> |
listAllRanges()
Return an an Iterable of Resources that represent all possible ranges for this property gathered from the entire hierarchy. |
java.lang.Iterable<org.openrdf.model.Resource> |
listAllRanges(boolean activeClassOnly)
Return an an interator or Resources that represent all possible ranges for this property. |
java.lang.Iterable<org.openrdf.model.Resource> |
listAlternativeRanges(boolean activeClassOnly)
Return an an Iterable of Resources that represent additional ranges for this property. |
java.lang.Iterable<org.openrdf.model.Resource> |
listRanges(boolean all,
boolean activeClassOnly)
Return an Iterable of ranges for this property |
java.util.Iterator<Restriction> |
listRestrictions()
Get the iterator of restrictions for the property |
void |
setActiveClass(OntologyClass activeClass)
Set the active class for the property |
static void |
setDomain(_Property ontProperty,
org.openrdf.model.Resource domain)
Set the domain bean for the given property |
void |
setDuplicateProperty(boolean duplicateProperty)
Set whether there can be duplicate properties |
static void |
setRange(_Property ontProperty,
org.openrdf.model.Resource range)
Set the range bean for the given property |
void |
setRole(int role)
set the role of the property |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.openrdf.model.URI DEFAULT_RANGE
public static final int ROLE_HERE
public static final int ROLE_EXTENSIONCLASS
public static final int ROLE_LOOSE_RESTRICTION
| Constructor Detail |
|---|
public OntologyProperty(_Property ontProperty,
OntologyClass ontologyClass)
throws JastorException
ontProperty - the underlying Jastor property beanontologyClass - The parent class for this property
JastorException
public OntologyProperty(_Property ontProperty,
JastorContext ctx)
throws JastorException
ontProperty - the underlying Jastor property beanctx - the parent jastor context
JastorException| Method Detail |
|---|
public boolean isLooseRestriction()
public int getRole()
public void setRole(int role)
role - the role of the propertypublic OntologyClass getActiveClass()
public void setActiveClass(OntologyClass activeClass)
activeClass - the active class for the propertypublic OntologyClass getOntologyClass()
public _Property getOntProperty()
public OntologyComment getComment()
public Restriction getPrimaryRestriction()
public void addRestriction(Restriction res)
res - restriction to addpublic void addRestrictions(java.util.List<Restriction> res)
res - a list of restrictions to the propertypublic java.util.Iterator<Restriction> listRestrictions()
public java.util.List<Restriction> getRestrictions()
public boolean isMultiValued()
public boolean isSingleValued()
public boolean isObjectProperty()
public boolean isDatatypeProperty()
public java.lang.String getPropertyName()
public java.lang.String getPropertyName(org.openrdf.model.Resource restrictedRange)
restrictedRange - restrictedRange argument
public java.lang.String getPropertyCapped()
public java.lang.String getPropertyCapped(org.openrdf.model.Resource restrictedRange)
restrictedRange - restrictedRange argument
public java.lang.Iterable<org.openrdf.model.Resource> listRanges(boolean all,
boolean activeClassOnly)
all - whether or not to include the default range in addition to all default rangesactiveClassOnly - whether or not to include ranges in the activeClass only
public java.lang.Iterable<org.openrdf.model.Resource> listAlternativeRanges(boolean activeClassOnly)
activeClassOnly - only return active class ranges
public java.lang.Iterable<org.openrdf.model.Resource> listAllRanges()
public java.lang.Iterable<org.openrdf.model.Resource> listAllRanges(boolean activeClassOnly)
activeClassOnly - only return active class ranges
public java.lang.String getReturnType()
public java.lang.String getReturnType(org.openrdf.model.Resource range)
range - indicates an alternative range or the DEFAULT_RANGE
public java.lang.String getRangeURI(org.openrdf.model.Resource res)
res - resource to get string representation
public java.lang.String getRangeURI()
public OntologyClass getRangeOntologyClass()
public OntologyClass getRangeOntologyClass(org.openrdf.model.Resource range)
range - indicates an alternative range or the DEFAULT_RANGE
public java.util.List<org.openrdf.model.Value> getHasValueValues()
public void setDuplicateProperty(boolean duplicateProperty)
duplicateProperty - whether there can be duplicate propertiespublic java.lang.String getURI()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic static java.lang.String capitalize(java.lang.String string)
string - String to Capitalize
public static GraphThing getRange(_Property ontProperty)
ontProperty - property to get bean
public static Class getDomain(_Property ontProperty)
ontProperty - property to get bean
public static void setRange(_Property ontProperty,
org.openrdf.model.Resource range)
ontProperty - property to get beanrange - the range resource to set
public static void setDomain(_Property ontProperty,
org.openrdf.model.Resource domain)
ontProperty - property to get beandomain - the domain resource to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||