for(Variable property : procedural.getProperties(graph/*, DocumentationResource.URIs.Document_AttributeRelation*/)) {
if(property instanceof StandardAssertedGraphPropertyVariable) {
StandardAssertedGraphPropertyVariable ass = (StandardAssertedGraphPropertyVariable)property;
- if("datadefinitions".equals(ass.property.name) || "commands".equals(ass.property.name)) {
+ if("datadefinitions".equals(ass.property.name) || "commands".equals(ass.property.name) || "pollingFunction".equals(ass.property.name)) {
Object value = property.getPossibleValue(graph);
if(value != null) map.put(ass.property.name, new ConstantPropertyVariable(parent, ass.property.name, value, null));
}
PrimitivePropertyStatementsProcedure foo = new PrimitivePropertyStatementsProcedure();
dqs.forEachDirectPersistentStatement(graph, parent.getRepresents(graph), foo);
-
+
for(Statement stm : foo.result) {
Resource predicate = stm.getPredicate();
PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(predicate));
+
if(info.isHasProperty && info.hasClassification(DocumentationResource.URIs.Document_AttributeRelation)) {
if(map == null) map = new HashMap<String,Variable>();
Variable prop = new StandardGraphPropertyVariable(graph, parent, predicate);
Object value = prop.getValue(graph);
map.put(info.name, new ConstantPropertyVariable(parent, info.name, value, null));
+ } else {
+ Resource definition = graph.getPossibleObject(predicate, DOC.Document_definesAttributeRelation);
+ if(definition != null) {
+ if(map == null) map = new HashMap<String,Variable>();
+ try {
+ PropertyInfo info2 = graph.syncRequest(new PropertyInfoRequest(definition));
+ Variable prop = new StandardGraphPropertyVariable(graph, parent, definition);
+ map.put(info2.name, new PrimitiveValueVariable(parent, info2.name, prop));
+ } catch (DatabaseException e) {
+ Logger.defaultLogError(e);
+ }
+ }
}
}