From 85e9e16659d1fd5abf093a1b94f8271275787bd2 Mon Sep 17 00:00:00 2001 From: brianjlowe Date: Wed, 6 Nov 2013 12:45:59 -0500 Subject: [PATCH] supporting stub deletion annotation in faux properties --- .../vitro/webapp/dao/jena/ObjectPropertyDaoJena.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java index 4031627d2..cb4ea280a 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java @@ -319,7 +319,7 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp " ?updateLevel ?editLinkSuppressed ?addLinkSuppressed ?deleteLinkSuppressed \n" + " ?collateBySubclass ?displayLimit ?individualSortProperty \n" + " ?entitySortDirection ?selectFromExisting ?offerCreateNew \n" + - " ?publicDescription \n" + + " ?publicDescription ?stubDeletion \n" + " WHERE { \n" + " ?context config:configContextFor <" + propertyURI + "> . \n"; if (domainURI != null) { @@ -349,6 +349,7 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp " OPTIONAL { ?configuration <" + PROPERTY_SELECTFROMEXISTINGANNOT.getURI() + "> ?selectFromExisting } \n" + " OPTIONAL { ?configuration <" + PROPERTY_OFFERCREATENEWOPTIONANNOT.getURI() + "> ?offerCreateNew } \n" + " OPTIONAL { ?configuration <" + PUBLIC_DESCRIPTION_ANNOT.getURI() + "> ?publicDescription } \n" + + " OPTIONAL { ?configuration <" + PROPERTY_STUBOBJECTPROPERTYANNOT.getURI() + "> ?stubDeletion } \n" + "}"; Query q = QueryFactory.create(propQuery); @@ -432,6 +433,10 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp if (offerCreateNewLit != null) { op.setOfferCreateNewOption(offerCreateNewLit.getBoolean()); } + Literal stubDeletionLit = qsoln.getLiteral("stubDeletion"); + if (stubDeletionLit != null) { + op.setStubObjectRelation(stubDeletionLit.getBoolean()); + } Literal publicDescriptionLit = qsoln.getLiteral("publicDescription"); if (publicDescriptionLit != null) { op.setPublicDescription(publicDescriptionLit.getLexicalForm());