+ @Override
+ public Collection<String> getKeys(ReadGraph graph, Variable parent) throws DatabaseException {
+
+ if(parent instanceof StandardProceduralChildVariable) {
+
+ StandardProceduralChildVariable procedural = (StandardProceduralChildVariable)parent;
+ List<String> result = new ArrayList<>();
+ for(Variable property : procedural.getProperties(graph)) {
+ if(property instanceof StandardAssertedGraphPropertyVariable) {
+ StandardAssertedGraphPropertyVariable ass = (StandardAssertedGraphPropertyVariable)property;
+ if("dataDefinitions".equals(ass.property.name) || "commands".equals(ass.property.name) || "pollingFunction".equals(ass.property.name)) {
+ result.add(ass.property.name);
+ continue;
+ }
+ }
+ Resource predicate = property.getPossiblePredicateResource(graph);
+ if(predicate != null) {
+ PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(predicate));
+ if(info.hasClassification(DocumentationResource.URIs.Document_AttributeRelation)) {
+ result.add(info.name);
+ }
+ }
+ }
+
+ return result;
+
+ } else {
+
+ Resource parentRes = parent.getRepresents(graph);
+ return graph.syncRequest(new DocumentPropertyKeys(parentRes), TransientCacheAsyncListener.instance());
+
+ }
+
+ }
+
+ @Override
+ public Object getValue(ReadGraph graph, Variable context, String key) throws DatabaseException {
+ return context.getPropertyValue(graph, key);
+ }
+
+ }
+
+ public static DocumentProperties primitiveProperties() throws DatabaseException {
+ return new StandardDocumentProperties();
+ }
+