}
}
private String writeReference(String key, Document document, DocumentType type, String reference, String refKey) {
String referenceKey = document.get(refKey).toString();
NodeReference refGlobal = getReferenceGlobal(reference);
refGlobal.appendSubscript(referenceKey);
if (refGlobal.exists()) {
return referenceKey;
}
referenceTempList.clear();
NodeReference oldIndexGlobal = indexGlobal;
indexGlobal = getIndexGlobal(reference);
write(key,document,type,referenceTempList);
//document.setDBID(name,key);
indexGlobal = oldIndexGlobal;
refGlobal.set(referenceTempList);