private String getEndIndentionWithReturn(int n) { return getEol() + getIndention(n) + "}"; }
private String reformatIndent(String input, int startIndent) { String ret = ""; BufferedReader reader = new BufferedReader(new StringReader(input)); try { String oneLine; while ((oneLine = reader.readLine()) != null) { ret = ret + getIndention(startIndent) + oneLine + getEol(); } } catch (IOException e) { LOG.log(Level.WARNING, "reformatIndent failed.", e); } return ret; }
private String reformatIndent(String input, int startIndent) { String ret = ""; BufferedReader reader = new BufferedReader(new StringReader(input)); try { String oneLine; while ((oneLine = reader.readLine()) != null) { ret = ret + getIndention(startIndent) + oneLine + getEol(); } } catch (IOException e) { LOG.log(Level.WARNING, "reformatIndent failed.", e); } return ret; }
private String getBeginIndentionWithReturnForList(int n) { return "[" + getEol() + getIndention(n); }
private String getBeginIndentionWithReturn(int n) { return "{" + getEol() + getIndention(n); }
private String getEndIndentionWithReturnForList(int n) { return getEol() + getIndention(n) + "]"; }
private String getBeginIndentionWithReturn(int n) { return "{" + getEol() + getIndention(n); }
private String getEndIndentionWithReturn(int n) { return getEol() + getIndention(n) + "}"; }
private String getBeginIndentionWithReturnForList(int n) { return "[" + getEol() + getIndention(n); }
private String getEndIndentionWithReturnForList(int n) { return getEol() + getIndention(n) + "]"; }
if (cls.getName().endsWith(clsName) && JsonSchemaLookup.getSingleton().getSchemaForClass(cls).length() > 0) { ret = ret + getIndention(2) + "\"" + cls.getName() + "\" : " + getEol(); Class<?> partClass = mpi.getTypeClass(); if (partClass != null && partClass.getName().endsWith(clsName)) { ret = ret + getIndention(2) + "\"" + partClass.getName() + "\" : " + getEol(); Class<?> partClass = mpi.getTypeClass(); if (partClass != null && partClass.getName().endsWith(clsName)) { ret = ret + getIndention(2) + "\"" + partClass.getName() + "\" : " + getEol();
if (cls.getName().endsWith(clsName) && JsonSchemaLookup.getSingleton().getSchemaForClass(cls).length() > 0) { ret = ret + getIndention(2) + "\"" + cls.getName() + "\" : " + getEol(); Class<?> partClass = mpi.getTypeClass(); if (partClass != null && partClass.getName().endsWith(clsName)) { ret = ret + getIndention(2) + "\"" + partClass.getName() + "\" : " + getEol(); Class<?> partClass = mpi.getTypeClass(); if (partClass != null && partClass.getName().endsWith(clsName)) { ret = ret + getIndention(2) + "\"" + partClass.getName() + "\" : " + getEol();
if (JsonSchemaLookup.getSingleton() .getSchemaForClass(cls).length() > 0) { ret = ret + getIndention(2) + "\"" + cls.getName() + "\" : " + getEol(); + getBeginIndentionWithReturn(0); for (BindingOperationInfo boi : bindingInfo.getOperations()) { ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getName().getLocalPart() + "\" " + " : " + getBeginIndentionWithReturn(3); ret = ret + getIndention(3) + "\"output\" : " + getBeginIndentionWithReturn(4) + "\"type\" : \"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\"" ret = ret + getEol() + getIndention(1) + "\"definitions\" : " + getBeginIndentionWithReturn(0); for (BindingOperationInfo boi : bindingInfo.getOperations()) { && !addedType.contains(boi.getOperationInfo().getInput().getName().getLocalPart())) { ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getInput().getName().getLocalPart() + "\" : " + getBeginIndentionWithReturnForList(0); ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\" : " + getBeginIndentionWithReturnForList(0);
if (JsonSchemaLookup.getSingleton() .getSchemaForClass(cls).length() > 0) { ret = ret + getIndention(2) + "\"" + cls.getName() + "\" : " + getEol(); + getBeginIndentionWithReturn(0); for (BindingOperationInfo boi : bindingInfo.getOperations()) { ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getName().getLocalPart() + "\" " + " : " + getBeginIndentionWithReturn(3); ret = ret + getIndention(3) + "\"output\" : " + getBeginIndentionWithReturn(4) + "\"type\" : \"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\"" ret = ret + getEol() + getIndention(1) + "\"definitions\" : " + getBeginIndentionWithReturn(0); for (BindingOperationInfo boi : bindingInfo.getOperations()) { && !addedType.contains(boi.getOperationInfo().getInput().getName().getLocalPart())) { ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getInput().getName().getLocalPart() + "\" : " + getBeginIndentionWithReturnForList(0); ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\" : " + getBeginIndentionWithReturnForList(0);
ret = ret + getIndention(2) + "\"output\" : " + getBeginIndentionWithReturn(4) + "\"type\" : \"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\"" + getEndIndentionWithReturn(2); ret = ret + getEol() + getIndention(1) + "\"definitions\" : " + getBeginIndentionWithReturn(2); if (boi.getInput() != null && boi.getInput().getMessageParts() != null) { ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\" : " + getBeginIndentionWithReturnForList(0);
ret = ret + getIndention(2) + "\"output\" : " + getBeginIndentionWithReturn(4) + "\"type\" : \"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\"" + getEndIndentionWithReturn(2); ret = ret + getEol() + getIndention(1) + "\"definitions\" : " + getBeginIndentionWithReturn(2); if (boi.getInput() != null && boi.getInput().getMessageParts() != null) { ret = ret + getIndention(2) + "\"" + boi.getOperationInfo().getOutput().getName().getLocalPart() + "\" : " + getBeginIndentionWithReturnForList(0);