diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java index 978eeef54..29b3b8397 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java @@ -654,13 +654,16 @@ public class IndividualDaoJena extends JenaBaseDao implements IndividualDao { * In Jena it can be difficult to get an object with a given dataproperty if * you do not care about the datatype or lang of the literal. Use this * method if you would like to ignore the lang and datatype. + * + * Note: this method doesn't require that a property be declared in the + * ontology as a data property -- only that it behaves as one. */ public List getIndividualsByDataProperty(String dataPropertyUri, String value){ Property prop = null; if( RDFS.label.getURI().equals( dataPropertyUri )){ prop = RDFS.label; }else{ - prop = getOntModel().getDatatypeProperty(dataPropertyUri); + prop = getOntModel().getProperty(dataPropertyUri); } if( prop == null ) { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java index 9604599bd..7e12cf122 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoSDB.java @@ -222,6 +222,9 @@ public class IndividualDaoSDB extends IndividualDaoJena { * In Jena it can be difficult to get an object with a given dataproperty if * you do not care about the datatype or lang of the literal. Use this * method if you would like to ignore the lang and datatype. + * + * Note: this method doesn't require that a property be declared in the + * ontology as a data property -- only that it behaves as one. */ @Override public List getIndividualsByDataProperty(String dataPropertyUri, String value){ @@ -229,7 +232,7 @@ public class IndividualDaoSDB extends IndividualDaoJena { if( RDFS.label.getURI().equals( dataPropertyUri )){ prop = RDFS.label; }else{ - prop = getOntModel().getDatatypeProperty(dataPropertyUri); + prop = getOntModel().getProperty(dataPropertyUri); } if( prop == null ) {