Creating Explicit member portion of the xbrl instance using XWand API
There are no direct APIs to create dimension elements in XWand APIs, but you can create dimension elements by DOM-APIs as follows;
XBRLProcessor xbrlProc = new XBRLProcessor();
DocumentBuilder parser = xbrlProc.getParser();
Instance instance = ...;
Context con = instance.getContextById("Context_Instant_JP");
ContextEntity ent = con.getEntity();
Segment seg = instance.createSegment();
ent.setSegment(seg);
Document doc = parser.newDocument();
DocumentFragment docFrag = doc.createDocumentFragment();
// "explicitMember" element
Element expMemElem = doc.createElementNS("http://xbrl.org/2006/xbrldi",
"xbrldi:explicitMember");
// "dimension" attribute
expMemElem.setAttribute("dimension", "p0:AreaDim");
// member name
expMemElem.appendChild(doc.createTextNode("p0:JP"));
docFrag.appendChild(expMemElem);
seg.setSegmentElements(docFrag);