org.apache.juneau.http.annotation.Query.format()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.apache.juneau.http.annotation.Query.format方法的一些代码示例,展示了Query.format的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.format方法的具体详情如下:
包路径:org.apache.juneau.http.annotation.Query
类名称:Query
方法名:format

Query.format介绍

暂无

代码示例

代码示例来源:origin: org.apache.juneau/juneau-marshall

  1. /**
  2. * Returns <jk>true</jk> if the specified annotation contains all default values.
  3. *
  4. * @param a The annotation to check.
  5. * @return <jk>true</jk> if the specified annotation contains all default values.
  6. */
  7. public static boolean empty(Query a) {
  8. if (a == null)
  9. return true;
  10. return
  11. allEmpty(a.description(), a._default(), a.example(), a.api())
  12. && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf())
  13. && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems())
  14. && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems())
  15. && empty(a.items());
  16. }

代码示例来源:origin: apache/juneau

  1. /**
  2. * Returns <jk>true</jk> if the specified annotation contains all default values.
  3. *
  4. * @param a The annotation to check.
  5. * @return <jk>true</jk> if the specified annotation contains all default values.
  6. */
  7. public static boolean empty(Query a) {
  8. if (a == null)
  9. return true;
  10. return
  11. allEmpty(a.description(), a._default(), a.example(), a.api())
  12. && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf())
  13. && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems())
  14. && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems())
  15. && empty(a.items());
  16. }

代码示例来源:origin: apache/juneau

  1. /**
  2. * Returns <jk>true</jk> if the specified annotation contains all default values.
  3. *
  4. * @param a The annotation to check.
  5. * @return <jk>true</jk> if the specified annotation contains all default values.
  6. */
  7. public static boolean empty(Query a) {
  8. if (a == null)
  9. return true;
  10. return
  11. allEmpty(a.description(), a._default(), a.example(), a.api())
  12. && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf())
  13. && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems())
  14. && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems())
  15. && empty(a.items());
  16. }

代码示例来源:origin: org.apache.juneau/juneau-marshall

  1. HttpPartSchemaBuilder apply(Query a) {
  2. name(a.value());
  3. name(a.name());
  4. required(a.required());
  5. type(a.type());
  6. format(a.format());
  7. allowEmptyValue(a.allowEmptyValue());
  8. items(a.items());
  9. collectionFormat(a.collectionFormat());
  10. _default(a._default().length == 0 ? null : joinnl(a._default()));
  11. maximum(HttpPartSchema.toNumber(a.maximum()));
  12. exclusiveMaximum(a.exclusiveMaximum());
  13. minimum(HttpPartSchema.toNumber(a.minimum()));
  14. exclusiveMinimum(a.exclusiveMinimum());
  15. maxLength(a.maxLength());
  16. minLength(a.minLength());
  17. pattern(a.pattern());
  18. maxItems(a.maxItems());
  19. minItems(a.minItems());
  20. uniqueItems(a.uniqueItems());
  21. _enum(HttpPartSchema.toSet(a._enum()));
  22. multipleOf(HttpPartSchema.toNumber(a.multipleOf()));
  23. skipIfEmpty(a.skipIfEmpty());
  24. parser(a.parser());
  25. serializer(a.serializer());
  26. return this;
  27. }

代码示例来源:origin: apache/juneau

  1. private ObjectMap merge(ObjectMap om, Query a) throws ParseException {
  2. if (empty(a))
  3. return om;
  4. om = newMap(om);
  5. if (a.api().length > 0)
  6. om.putAll(parseMap(a.api()));
  7. return om
  8. .appendSkipFalse("allowEmptyValue", a.allowEmptyValue())
  9. .appendSkipEmpty("collectionFormat", a.collectionFormat())
  10. .appendSkipEmpty("default", joinnl(a._default()))
  11. .appendSkipEmpty("description", resolve(a.description()))
  12. .appendSkipEmpty("enum", toSet(a._enum()))
  13. .appendSkipEmpty("x-example", resolve(a.example()))
  14. .appendSkipFalse("exclusiveMaximum", a.exclusiveMaximum())
  15. .appendSkipFalse("exclusiveMinimum", a.exclusiveMinimum())
  16. .appendSkipEmpty("format", a.format())
  17. .appendSkipEmpty("items", merge(om.getObjectMap("items"), a.items()))
  18. .appendSkipEmpty("maximum", a.maximum())
  19. .appendSkipMinusOne("maxItems", a.maxItems())
  20. .appendSkipMinusOne("maxLength", a.maxLength())
  21. .appendSkipEmpty("minimum", a.minimum())
  22. .appendSkipMinusOne("minItems", a.minItems())
  23. .appendSkipMinusOne("minLength", a.minLength())
  24. .appendSkipEmpty("multipleOf", a.multipleOf())
  25. .appendSkipEmpty("pattern", a.pattern())
  26. .appendSkipFalse("required", a.required())
  27. .appendSkipEmpty("type", a.type())
  28. .appendSkipFalse("uniqueItems", a.uniqueItems())
  29. ;
  30. }

代码示例来源:origin: apache/juneau

  1. HttpPartSchemaBuilder apply(Query a) {
  2. name(a.value());
  3. name(a.name());
  4. required(a.required());
  5. type(a.type());
  6. format(a.format());
  7. allowEmptyValue(a.allowEmptyValue());
  8. items(a.items());
  9. collectionFormat(a.collectionFormat());
  10. _default(a._default().length == 0 ? null : joinnl(a._default()));
  11. maximum(HttpPartSchema.toNumber(a.maximum()));
  12. exclusiveMaximum(a.exclusiveMaximum());
  13. minimum(HttpPartSchema.toNumber(a.minimum()));
  14. exclusiveMinimum(a.exclusiveMinimum());
  15. maxLength(a.maxLength());
  16. minLength(a.minLength());
  17. pattern(a.pattern());
  18. maxItems(a.maxItems());
  19. minItems(a.minItems());
  20. uniqueItems(a.uniqueItems());
  21. _enum(HttpPartSchema.toSet(a._enum()));
  22. multipleOf(HttpPartSchema.toNumber(a.multipleOf()));
  23. skipIfEmpty(a.skipIfEmpty());
  24. parser(a.parser());
  25. serializer(a.serializer());
  26. return this;
  27. }

代码示例来源:origin: apache/juneau

  1. HttpPartSchemaBuilder apply(Query a) {
  2. name(a.value());
  3. name(a.name());
  4. required(a.required());
  5. type(a.type());
  6. format(a.format());
  7. allowEmptyValue(a.allowEmptyValue());
  8. items(a.items());
  9. collectionFormat(a.collectionFormat());
  10. _default(a._default().length == 0 ? null : joinnl(a._default()));
  11. maximum(HttpPartSchema.toNumber(a.maximum()));
  12. exclusiveMaximum(a.exclusiveMaximum());
  13. minimum(HttpPartSchema.toNumber(a.minimum()));
  14. exclusiveMinimum(a.exclusiveMinimum());
  15. maxLength(a.maxLength());
  16. minLength(a.minLength());
  17. pattern(a.pattern());
  18. maxItems(a.maxItems());
  19. minItems(a.minItems());
  20. uniqueItems(a.uniqueItems());
  21. _enum(HttpPartSchema.toSet(a._enum()));
  22. multipleOf(HttpPartSchema.toNumber(a.multipleOf()));
  23. skipIfEmpty(a.skipIfEmpty());
  24. parser(a.parser());
  25. serializer(a.serializer());
  26. return this;
  27. }

代码示例来源:origin: org.apache.juneau/juneau-rest-server

  1. private ObjectMap merge(ObjectMap om, Query a) throws ParseException {
  2. if (empty(a))
  3. return om;
  4. om = newMap(om);
  5. if (a.api().length > 0)
  6. om.putAll(parseMap(a.api()));
  7. return om
  8. .appendSkipFalse("allowEmptyValue", a.allowEmptyValue())
  9. .appendSkipEmpty("collectionFormat", a.collectionFormat())
  10. .appendSkipEmpty("default", joinnl(a._default()))
  11. .appendSkipEmpty("description", resolve(a.description()))
  12. .appendSkipEmpty("enum", toSet(a._enum()))
  13. .appendSkipEmpty("x-example", resolve(a.example()))
  14. .appendSkipFalse("exclusiveMaximum", a.exclusiveMaximum())
  15. .appendSkipFalse("exclusiveMinimum", a.exclusiveMinimum())
  16. .appendSkipEmpty("format", a.format())
  17. .appendSkipEmpty("items", merge(om.getObjectMap("items"), a.items()))
  18. .appendSkipEmpty("maximum", a.maximum())
  19. .appendSkipMinusOne("maxItems", a.maxItems())
  20. .appendSkipMinusOne("maxLength", a.maxLength())
  21. .appendSkipEmpty("minimum", a.minimum())
  22. .appendSkipMinusOne("minItems", a.minItems())
  23. .appendSkipMinusOne("minLength", a.minLength())
  24. .appendSkipEmpty("multipleOf", a.multipleOf())
  25. .appendSkipEmpty("pattern", a.pattern())
  26. .appendSkipFalse("required", a.required())
  27. .appendSkipEmpty("type", a.type())
  28. .appendSkipFalse("uniqueItems", a.uniqueItems())
  29. ;
  30. }

代码示例来源:origin: apache/juneau

  1. private ObjectMap merge(ObjectMap om, Query a) throws ParseException {
  2. if (empty(a))
  3. return om;
  4. om = newMap(om);
  5. if (a.api().length > 0)
  6. om.putAll(parseMap(a.api()));
  7. return om
  8. .appendSkipFalse("allowEmptyValue", a.allowEmptyValue())
  9. .appendSkipEmpty("collectionFormat", a.collectionFormat())
  10. .appendSkipEmpty("default", joinnl(a._default()))
  11. .appendSkipEmpty("description", resolve(a.description()))
  12. .appendSkipEmpty("enum", toSet(a._enum()))
  13. .appendSkipEmpty("x-example", resolve(a.example()))
  14. .appendSkipFalse("exclusiveMaximum", a.exclusiveMaximum())
  15. .appendSkipFalse("exclusiveMinimum", a.exclusiveMinimum())
  16. .appendSkipEmpty("format", a.format())
  17. .appendSkipEmpty("items", merge(om.getObjectMap("items"), a.items()))
  18. .appendSkipEmpty("maximum", a.maximum())
  19. .appendSkipMinusOne("maxItems", a.maxItems())
  20. .appendSkipMinusOne("maxLength", a.maxLength())
  21. .appendSkipEmpty("minimum", a.minimum())
  22. .appendSkipMinusOne("minItems", a.minItems())
  23. .appendSkipMinusOne("minLength", a.minLength())
  24. .appendSkipEmpty("multipleOf", a.multipleOf())
  25. .appendSkipEmpty("pattern", a.pattern())
  26. .appendSkipFalse("required", a.required())
  27. .appendSkipEmpty("type", a.type())
  28. .appendSkipFalse("uniqueItems", a.uniqueItems())
  29. ;
  30. }

相关文章