简体   繁体   English

是否有适用于Java的Schematics(Python)工具?

[英]Are there any Tools like Schematics (Python) for Java?

Are there similar tools to this neat Python library: https://github.com/j2labs/schematics in Java? 这个整洁的Python库是否有类似的工具: https//github.com/j2labs/schematics in Java?

Schematics is an easy way to model data. Schematics是一种简单的数据建模方法。 It provides mechanisms for structuring data, initializing data, serializing data, formatting data and validating data against type definitions, like an email address. 它提供了构造数据,初始化数据,序列化数据,格式化数据和根据类型定义验证数据的机制,如电子邮件地址。

... ...

Schematics' main goal is to provide similar functionality to a type system along with a way to generate the schematics we send to the Internet, or store in a database, or send to some Java process, or basically any use case with structured data. Schematics的主要目标是为类型系统提供类似的功能,以及生成我们发送到Internet的示意图,或存储在数据库中,或发送到某个Java进程,或基本上任何结构化数据的用例。

I guess JSR 303, bean validation would be the closest equivalent: 我猜JSR 303, bean验证将是最接近的等价物:

Bean Validation defines a metadata model and API for JavaBean validation. Bean Validation为JavaBean验证定义了元数据模型和API。 The metadata source is annotations, with the ability to override and extend the meta-data through the use of XML validation descriptors. 元数据源是注释,能够通过使用XML验证描述符来覆盖和扩展元数据。 The Hibernate team provides with Hibernate Validator the reference implementation of Bean Validation and also created the Bean Validation TCK any implementation of JSR 303 needs to pass. Hibernate团队为Hibernate Validator提供了Bean Validation的参考实现,并且还创建了Bean Validation TCK,JSR 303的任何实现都需要通过。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM