com.fasterxml.jackson.module.jsonSchema.JsonSchema.getId()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(128)

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

JsonSchema.getId介绍

暂无

代码示例

代码示例来源:origin: dremio/dremio-oss

private void addRef(JsonSchema schema, Map<String, JsonSchema> refs) {
 if (schema.getId() != null && !refs.containsKey(schema.getId())) {
  refs.put(schema.getId(), schema);
 }
}

代码示例来源:origin: dremio/dremio-oss

private void shortId(StringBuilder sb, JsonSchema s) {
 if (s.getId() != null) {
  sb.append(" /** ").append(shortId(s.getId())).append(" **/");
 }
}

代码示例来源:origin: com.intel.icecp/icecp-core

public <T extends Object> T readObject(Class<T> objectClass) throws SchemaErrorException, IOException {
  try {
    return objectClass.cast(readObject(objectClass, schema, schema.getId(), NO_ARRAY));
  } catch (EOFException eof) {
    hasNext = false;
    return null;
  } catch (NoSuchFieldException | SecurityException | InstantiationException | IllegalAccessException | NoSuchMethodException | IllegalArgumentException | InvocationTargetException refEx) {
    hasNext = false;
    return null;
  }
}

代码示例来源:origin: com.intel.icecp/icecp-core

public GenericObject readObject() throws SchemaErrorException, IOException {
  try {
    return (GenericObject) readObject(null, schema, schema.getId(), NO_ARRAY);
  } catch (EOFException | NoSuchFieldException | SecurityException | InstantiationException | IllegalAccessException | NoSuchMethodException | IllegalArgumentException | InvocationTargetException eof) {
    hasNext = false;
    return null;
  }
}

代码示例来源:origin: org.apache.pulsar/pulsar-broker

private boolean isCompatibleJsonSchema(SchemaData from, SchemaData to) {
  try {
    ObjectMapper objectMapper = getObjectMapper();
    JsonSchema fromSchema = objectMapper.readValue(from.getData(), JsonSchema.class);
    JsonSchema toSchema = objectMapper.readValue(to.getData(), JsonSchema.class);
    return fromSchema.getId().equals(toSchema.getId());
  } catch (IOException e) {
    return false;
  }
}

代码示例来源:origin: dremio/dremio-oss

String id = schema.getId();
if (id == null && schema instanceof ReferenceSchema) {
 id = schema.get$ref();

代码示例来源:origin: com.fasterxml.jackson.module/jackson-module-jsonSchema

protected boolean _equals(JsonSchema that)
  {
    return equals(getId(), getId())
        // 27-Apr-2015, tatu: Should not need to check type explicitly
//                 && equals(getType(), getType())
        && equals(getRequired(), that.getRequired())
        && equals(getReadonly(), that.getReadonly())
        && equals(get$ref(), that.get$ref())
        && equals(get$schema(), that.get$schema())
        && arraysEqual(getDisallow(), that.getDisallow())
        && arraysEqual(getExtends(), that.getExtends());
  }

代码示例来源:origin: FasterXML/jackson-module-jsonSchema

protected boolean _equals(JsonSchema that)
  {
    return equals(getId(), getId())
        // 27-Apr-2015, tatu: Should not need to check type explicitly
//                 && equals(getType(), getType())
        && equals(getRequired(), that.getRequired())
        && equals(getReadonly(), that.getReadonly())
        && equals(get$ref(), that.get$ref())
        && equals(get$schema(), that.get$schema())
        && arraysEqual(getDisallow(), that.getDisallow())
        && arraysEqual(getExtends(), that.getExtends());
  }

相关文章