supporting stub deletion annotation in faux properties

This commit is contained in:
brianjlowe 2013-11-06 12:45:59 -05:00
parent c2e8541732
commit 85e9e16659

View file

@ -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());