Class PropertyDaoJena
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDaoCon
-
- edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDao
-
- edu.cornell.mannlib.vitro.webapp.dao.jena.PropertyDaoJena
-
- All Implemented Interfaces:
PropertyDao
- Direct Known Subclasses:
DataPropertyDaoJena,ObjectPropertyDaoJena,PropertyInstanceDaoJena
public class PropertyDaoJena extends JenaBaseDao implements PropertyDao
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface edu.cornell.mannlib.vitro.webapp.dao.PropertyDao
PropertyDao.FullPropertyKey
-
-
Field Summary
Fields Modifier and Type Field Description protected DatasetWrapperFactorydwfprotected static StringFAUX_PROPERTY_FLAGprotected static org.apache.commons.logging.Loglogprotected static StringPREFIXESprotected RDFServicerdfService-
Fields inherited from class edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDao
DEFAULT_NAMESPACE, KEEP_ONLY_IF_FALSE, KEEP_ONLY_IF_TRUE, NONUSER_NAMESPACES, PREFERRED_LANGUAGES, PSEUDO_BNODE_NS, XSD, xsdDateFormat, xsdDateTimeFormat
-
Fields inherited from class edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDaoCon
ADDITIONAL_LINK, APPLICATION_ABOUTTEXT, APPLICATION_ACKNOWLEGETEXT, APPLICATION_CONTACTMAIL, APPLICATION_COPYRIGHTANCHOR, APPLICATION_COPYRIGHTURL, APPLICATION_CORRECTIONMAIL, APPLICATION_THEMEDIR, CLASSGROUP, DATAPROPERTY_ISEXTERNALID, DESCRIPTION_ANNOT, DISPLAY_LIMIT, DISPLAY_RANK, DISPLAY_RANK_ANNOT, EDITING, EXAMPLE, EXAMPLE_ANNOT, IN_CLASSGROUP, IND_MAIN_IMAGE, LINK, LINK_ANCHOR, LINK_DISPLAYRANK, LINK_TYPE, LINK_URL, MODTIME, MONIKER, ONTOLOGY_PREFIX_ANNOT, PERMISSION, PERMISSION_SET_FOR_NEW_USERS, PERMISSION_SET_FOR_PUBLIC, PERMISSIONSET, PERMISSIONSET_HAS_PERMISSION, PORTAL, PRIMARY_LINK, PROPERTY_ADDLINKSUPPRESSED, PROPERTY_COLLATEBYSUBCLASSANNOT, PROPERTY_CUSTOM_LIST_VIEW_ANNOT, PROPERTY_CUSTOMDISPLAYVIEWANNOT, PROPERTY_CUSTOMENTRYFORMANNOT, PROPERTY_CUSTOMSEARCHVIEWANNOT, PROPERTY_CUSTOMSHORTVIEWANNOT, PROPERTY_DELETELINKSUPPRESSED, PROPERTY_EDITLINKSUPPRESSED, PROPERTY_ENTITYSORTDIRECTION, PROPERTY_ENTITYSORTFIELD, PROPERTY_FULLPROPERTYNAMEANNOT, PROPERTY_INPROPERTYGROUPANNOT, PROPERTY_OBJECTINDIVIDUALSORTPROPERTY, PROPERTY_OFFERCREATENEWOPTIONANNOT, PROPERTY_SELECTFROMEXISTINGANNOT, PROPERTY_STUBOBJECTPROPERTYANNOT, PROPERTYGROUP, PUBLIC_DESCRIPTION_ANNOT, SEARCH_BOOST_ANNOT, SHORTDEF, USERACCOUNT, USERACCOUNT_ARGON2_PASSWORD, USERACCOUNT_EMAIL_ADDRESS, USERACCOUNT_EMAIL_KEY, USERACCOUNT_EXTERNAL_AUTH_ID, USERACCOUNT_EXTERNAL_AUTH_ONLY, USERACCOUNT_FIRST_NAME, USERACCOUNT_HAS_PERMISSION_SET, USERACCOUNT_LAST_LOGIN_TIME, USERACCOUNT_LAST_NAME, USERACCOUNT_LOGIN_COUNT, USERACCOUNT_MD5_PASSWORD, USERACCOUNT_OLD_PASSWORD, USERACCOUNT_PASSWORD_CHANGE_REQUIRED, USERACCOUNT_PASSWORD_LINK_EXPIRES, USERACCOUNT_PROXY_EDITOR_FOR, USERACCOUNT_ROOT_USER, USERACCOUNT_STATUS, VITRO_PUBLIC_ONTOLOGY
-
-
Constructor Summary
Constructors Constructor Description PropertyDaoJena(RDFService rdfService, DatasetWrapperFactory dwf, WebappDaoFactoryJena wadf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEquivalentProperty(Property property, Property equivalentProperty)voidaddEquivalentProperty(String propertyURI, String equivalentPropertyURI)voidaddSubproperty(ObjectProperty property, ObjectProperty subproperty)voidaddSubproperty(Property property, Property subproperty)voidaddSubproperty(String propertyURI, String subpropertyURI)voidaddSuperproperty(ObjectProperty property, ObjectProperty superproperty)voidaddSuperproperty(Property property, Property superproperty)voidaddSuperproperty(String propertyURI, String superpropertyURI)List<PropertyInstance>getAllPossiblePropInstForIndividual(String individualURI)List<PropertyInstance>getAllPropInstByVClass(String classURI)List<PropertyInstance>getAllPropInstByVClasses(List<VClass> vclasses)List<String>getAllSubPropertyURIs(String propertyURI)List<String>getAllSuperPropertyURIs(String propertyURI)List<VClass>getClassesWithRestrictionOnProperty(String propertyURI)Finds the classes that have a definition involving a restriction on the given property.List<String>getEquivalentPropertyURIs(String propertyURI)protected org.apache.jena.ontology.OntModelgetOntModel()protected List<org.apache.jena.rdf.model.Resource>getPropertiesWithAppropriateDomainFor(String vclassURI)requires SPARQL 1.1 (or ARQ) property path supportprotected voidgetPropertyQueryResults(String queryString, ResultSetConsumer consumer)protected RDFServicegetRDFService()HashSet<String>getRestrictedClasses(org.apache.jena.ontology.OntClass ontClass)Find named classes to which a restriction "applies"List<String>getSubPropertyURIs(String propertyURI)List<String>getSuperPropertyURIs(String propertyURI, boolean direct)protected voidremoveABoxStatementsWithPredicate(Property predicate)protected voidremoveABoxStatementsWithPredicate(String predicateURI)voidremoveEquivalentProperty(Property property, Property equivalentProperty)voidremoveEquivalentProperty(String propertyURI, String equivalentPropertyURI)voidremoveSubproperty(ObjectProperty property, ObjectProperty subproperty)voidremoveSubproperty(Property property, Property subproperty)voidremoveSubproperty(String propertyURI, String subpropertyURI)voidremoveSuperproperty(ObjectProperty property, ObjectProperty superproperty)voidremoveSuperproperty(Property property, Property superproperty)voidremoveSuperproperty(String propertyURI, String superpropertyURI)-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDao
addPropertyBooleanValue, addPropertyDateTimeValue, addPropertyDateValue, addPropertyFloatValue, addPropertyIntValue, addPropertyLongValue, addPropertyNonNegativeIntValue, addPropertyResourceURIValue, addPropertyResourceValue, addPropertyStringValue, checkURI, getClassURIStr, getDefaultLanguage, getLabel, getLabelLiteral, getLabelLiteral, getLabelOrId, getLocalNameOrId, getOntClass, getOntModelSelector, getPropertyBooleanValue, getPropertyDateTimeValue, getPropertyDateValue, getPropertyFloatValue, getPropertyIntValue, getPropertyLongValue, getPropertyNonNegativeIntegerValue, getPropertyNonNegativeIntValue, getPropertyResourceURIValues, getPropertyStringValue, getSmartRemoval, getWebappDaoFactory, getWritableOntModelList, isBooleanClassExpression, listDirectObjectPropertySubjects, listDirectObjectPropertyValues, makeNodeForURI, removeRulesMentioningResource, smartRemove, tryLiteralForPreferredLanguages, updatePlainLiteralValue, updatePlainLiteralValue, updatePropertyBooleanValue, updatePropertyDateTimeValue, updatePropertyDateValue, updatePropertyFloatValue, updatePropertyIntValue, updatePropertyLongValue, updatePropertyNonNegativeIntegerValue, updatePropertyNonNegativeIntValue, updatePropertyResourceURIValue, updatePropertyResourceURIValue, updatePropertyResourceURIValues, updatePropertyResourceValue, updatePropertyResourceValue, updatePropertyStringValue, updateRDFSLabel, updateRDFSLabel
-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDaoCon
getConstModel
-
-
-
-
Field Detail
-
log
protected static final org.apache.commons.logging.Log log
-
FAUX_PROPERTY_FLAG
protected static final String FAUX_PROPERTY_FLAG
- See Also:
- Constant Field Values
-
PREFIXES
protected static final String PREFIXES
-
rdfService
protected RDFService rdfService
-
dwf
protected DatasetWrapperFactory dwf
-
-
Constructor Detail
-
PropertyDaoJena
public PropertyDaoJena(RDFService rdfService, DatasetWrapperFactory dwf, WebappDaoFactoryJena wadf)
-
-
Method Detail
-
getOntModel
protected org.apache.jena.ontology.OntModel getOntModel()
- Overrides:
getOntModelin classJenaBaseDao
-
getRDFService
protected RDFService getRDFService()
-
addSuperproperty
public void addSuperproperty(ObjectProperty property, ObjectProperty superproperty)
-
addSuperproperty
public void addSuperproperty(String propertyURI, String superpropertyURI)
- Specified by:
addSuperpropertyin interfacePropertyDao
-
removeSuperproperty
public void removeSuperproperty(ObjectProperty property, ObjectProperty superproperty)
-
removeSuperproperty
public void removeSuperproperty(String propertyURI, String superpropertyURI)
- Specified by:
removeSuperpropertyin interfacePropertyDao
-
addSubproperty
public void addSubproperty(ObjectProperty property, ObjectProperty subproperty)
-
addSubproperty
public void addSubproperty(String propertyURI, String subpropertyURI)
- Specified by:
addSubpropertyin interfacePropertyDao
-
removeSubproperty
public void removeSubproperty(ObjectProperty property, ObjectProperty subproperty)
-
removeSubproperty
public void removeSubproperty(String propertyURI, String subpropertyURI)
- Specified by:
removeSubpropertyin interfacePropertyDao
-
getSubPropertyURIs
public List<String> getSubPropertyURIs(String propertyURI)
- Specified by:
getSubPropertyURIsin interfacePropertyDao
-
getAllSubPropertyURIs
public List<String> getAllSubPropertyURIs(String propertyURI)
- Specified by:
getAllSubPropertyURIsin interfacePropertyDao
-
getSuperPropertyURIs
public List<String> getSuperPropertyURIs(String propertyURI, boolean direct)
- Specified by:
getSuperPropertyURIsin interfacePropertyDao
-
getAllSuperPropertyURIs
public List<String> getAllSuperPropertyURIs(String propertyURI)
- Specified by:
getAllSuperPropertyURIsin interfacePropertyDao
-
addSubproperty
public void addSubproperty(Property property, Property subproperty)
- Specified by:
addSubpropertyin interfacePropertyDao
-
addSuperproperty
public void addSuperproperty(Property property, Property superproperty)
- Specified by:
addSuperpropertyin interfacePropertyDao
-
removeSubproperty
public void removeSubproperty(Property property, Property subproperty)
- Specified by:
removeSubpropertyin interfacePropertyDao
-
removeSuperproperty
public void removeSuperproperty(Property property, Property superproperty)
- Specified by:
removeSuperpropertyin interfacePropertyDao
-
addEquivalentProperty
public void addEquivalentProperty(String propertyURI, String equivalentPropertyURI)
- Specified by:
addEquivalentPropertyin interfacePropertyDao
-
addEquivalentProperty
public void addEquivalentProperty(Property property, Property equivalentProperty)
- Specified by:
addEquivalentPropertyin interfacePropertyDao
-
getEquivalentPropertyURIs
public List<String> getEquivalentPropertyURIs(String propertyURI)
- Specified by:
getEquivalentPropertyURIsin interfacePropertyDao
-
removeEquivalentProperty
public void removeEquivalentProperty(String propertyURI, String equivalentPropertyURI)
- Specified by:
removeEquivalentPropertyin interfacePropertyDao
-
removeEquivalentProperty
public void removeEquivalentProperty(Property property, Property equivalentProperty)
- Specified by:
removeEquivalentPropertyin interfacePropertyDao
-
removeABoxStatementsWithPredicate
protected void removeABoxStatementsWithPredicate(Property predicate)
-
removeABoxStatementsWithPredicate
protected void removeABoxStatementsWithPredicate(String predicateURI)
-
getClassesWithRestrictionOnProperty
public List<VClass> getClassesWithRestrictionOnProperty(String propertyURI)
Finds the classes that have a definition involving a restriction on the given property.- Specified by:
getClassesWithRestrictionOnPropertyin interfacePropertyDao- Parameters:
propertyURI- identifier of a property- Returns:
- a list of VClass objects representing the classes that have definitions involving a restriction on the given property.
-
getRestrictedClasses
public HashSet<String> getRestrictedClasses(org.apache.jena.ontology.OntClass ontClass)
Find named classes to which a restriction "applies"- Parameters:
ontClass- Ontology class- Returns:
- set of class URIs Note: this method assumes that the caller holds a read lock on the ontology model.
-
getPropertyQueryResults
protected void getPropertyQueryResults(String queryString, ResultSetConsumer consumer)
-
getPropertiesWithAppropriateDomainFor
protected List<org.apache.jena.rdf.model.Resource> getPropertiesWithAppropriateDomainFor(String vclassURI)
requires SPARQL 1.1 (or ARQ) property path support- Parameters:
vclassURI- VClass URI- Returns:
- list of property resources with union domains that include the vclass
-
getAllPossiblePropInstForIndividual
public List<PropertyInstance> getAllPossiblePropInstForIndividual(String individualURI)
-
getAllPropInstByVClass
public List<PropertyInstance> getAllPropInstByVClass(String classURI)
-
getAllPropInstByVClasses
public List<PropertyInstance> getAllPropInstByVClasses(List<VClass> vclasses)
-
-