本文整理了Java中com.fasterxml.jackson.module.jsonSchema.JsonSchema.getId()
方法的一些代码示例,展示了JsonSchema.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonSchema.getId()
方法的具体详情如下:
包路径:com.fasterxml.jackson.module.jsonSchema.JsonSchema
类名称: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());
}
内容来源于网络,如有侵权,请联系作者删除!