Examples of prettyprint()


Examples of org.elasticsearch.common.xcontent.XContentBuilder.prettyPrint()

      // default to JSON
      contentType = XContentType.JSON;
    }
    XContentBuilder builder = new XContentBuilder(XContentFactory.xContent(contentType), new BytesStreamOutput());
    if (request.paramAsBoolean("pretty", false)) {
      builder.prettyPrint().lfAtEnd();
    }
    String casing = request.param("case");
    if (casing != null && "camelCase".equals(casing)) {
      builder.fieldCaseConversion(XContentBuilder.FieldCaseConversion.CAMELCASE);
    } else {
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.prettyPrint()

      // default to JSON
      contentType = XContentType.JSON;
    }
    XContentBuilder builder = new XContentBuilder(XContentFactory.xContent(contentType), new BytesStreamOutput());
    if (request.paramAsBoolean("pretty", false)) {
      builder.prettyPrint().lfAtEnd();
    }
    String casing = request.param("case");
    if (casing != null && "camelCase".equals(casing)) {
      builder.fieldCaseConversion(XContentBuilder.FieldCaseConversion.CAMELCASE);
    } else {
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.prettyPrint()

                    fos = new LZFOutputStream(fos);
                }
                LocalGatewayMetaState stateToWrite = builder.build();
                XContentBuilder xContentBuilder = XContentFactory.contentBuilder(XContentType.JSON, fos);
                if (prettyPrint) {
                    xContentBuilder.prettyPrint();
                }
                xContentBuilder.startObject();
                LocalGatewayMetaState.Builder.toXContent(stateToWrite, xContentBuilder, ToXContent.EMPTY_PARAMS);
                xContentBuilder.endObject();
                xContentBuilder.close();
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.prettyPrint()

                    fos = new LZFOutputStream(fos);
                }

                XContentBuilder xContentBuilder = XContentFactory.contentBuilder(XContentType.JSON, fos);
                if (prettyPrint) {
                    xContentBuilder.prettyPrint();
                }
                xContentBuilder.startObject();
                LocalGatewayStartedShards.Builder.toXContent(stateToWrite, xContentBuilder, ToXContent.EMPTY_PARAMS);
                xContentBuilder.endObject();
                xContentBuilder.close();
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.prettyPrint()

public abstract class BaseQueryBuilder implements QueryBuilder {

    @Override public String toString() {
        try {
            XContentBuilder builder = XContentFactory.safeJsonBuilder();
            builder.prettyPrint();
            toXContent(builder, EMPTY_PARAMS);
            return builder.string();
        } catch (Exception e) {
            throw new QueryBuilderException("Failed to build query", e);
        }
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.prettyPrint()

            contentType = XContentType.JSON;
        }
        CachedStreamOutput.Entry cachedEntry = CachedStreamOutput.popEntry();
        XContentBuilder builder = new XContentBuilder(XContentFactory.xContent(contentType), cachedEntry.cachedBytes(), cachedEntry);
        if (request.paramAsBoolean("pretty", false)) {
            builder.prettyPrint();
        }
        String casing = request.param("case");
        if (casing != null && "camelCase".equals(casing)) {
            builder.fieldCaseConversion(XContentBuilder.FieldCaseConversion.CAMELCASE);
        } else {
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson.prettyPrint()

            return builder.toString();
        }

        Lesson lesson = getLesson();
        LessonInstance lessonInstance = lesson.getLessonInstanceFor(getDate());
        return lessonInstance != null ? lessonInstance.prettyPrint() : lesson.prettyPrint();
    }

    public String getShiftTypesPrettyPrint() {
        return isExtraLesson() ? BundleUtil.getString(Bundle.ENUMERATION, "EXTRA_SUMMARY") : getShift()
                .getShiftTypesPrettyPrint();
View Full Code Here

Examples of org.fenixedu.academic.domain.LessonInstance.prettyPrint()

            return builder.toString();
        }

        Lesson lesson = getLesson();
        LessonInstance lessonInstance = lesson.getLessonInstanceFor(getDate());
        return lessonInstance != null ? lessonInstance.prettyPrint() : lesson.prettyPrint();
    }

    public String getShiftTypesPrettyPrint() {
        return isExtraLesson() ? BundleUtil.getString(Bundle.ENUMERATION, "EXTRA_SUMMARY") : getShift()
                .getShiftTypesPrettyPrint();
View Full Code Here

Examples of org.kie.services.client.serialization.jaxb.impl.JaxbRestRequestException.prettyPrint()

      
        // Build and send response
        Exception responseException = addException ? e : null;
        JaxbRestRequestException response = new JaxbRestRequestException(uriInfo.getRequestUri().toString(), responseException, requestStatus);
        try {
            responseBuilder.entity(response.prettyPrint());
        } catch (JAXBException jaxbe) {
            responseBuilder.entity(JaxbRestRequestException.convertStackTraceToString(jaxbe));
        }
      
        Variant variant = getVariant(headers);
View Full Code Here

Examples of org.springframework.util.StopWatch.prettyPrint()

            } else {
                System.out.println("No contacts found which this user has permission to");
            }

            System.out.println();
            System.out.println(stopWatch.prettyPrint());
        }

        SecurityContextHolder.clearContext();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.