- throw new DatabaseException("Cannot locate writer for " + NameUtils.getSafeName(graph, child.instance) + ", " + child.instance);\r
+ Resource type = graph.getSingleType(child.instance);\r
+ Resource ontology = getOntology(type);\r
+ if (ontology != null) {\r
+ XMLWriter xmlWriter = subWriters.get(ontology);\r
+ if (xmlWriter != null) {\r
+ childWriter = xmlWriter.writers.get(type);\r
+ }\r
+ }\r
+ if (childWriter == null)\r
+ throw new DatabaseException("Cannot locate writer for " + NameUtils.getSafeName(graph, child.instance) + ", " + child.instance);\r