f6a3d47f157c15bf408d25eb5680d44995107a65
[jalview.git] / src / com / github / reinert / jjschema / Attributes.java
1 /*
2  * Copyright (c) 2014, Danilo Reinert (daniloreinert@growbit.com)
3  *
4  * This software is dual-licensed under:
5  *
6  * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
7  *   later version;
8  * - the Apache Software License (ASL) version 2.0.
9  *
10  * The text of both licenses is available under the src/resources/ directory of
11  * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively).
12  *
13  * Direct link to the sources:
14  *
15  * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
16  * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
17  */
18
19 package com.github.reinert.jjschema;
20
21 import java.lang.annotation.ElementType;
22 import java.lang.annotation.Retention;
23 import java.lang.annotation.RetentionPolicy;
24 import java.lang.annotation.Target;
25
26 /**
27  * Annotation for the attributes of JSON Schema
28  *
29  * @author reinert
30  */
31 @Retention(RetentionPolicy.RUNTIME)
32 @Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
33 public @interface Attributes {
34     String $ref() default "";
35
36     String id() default "";
37
38     String title() default "";
39
40     String description() default "";
41
42     long maximum() default -1l;
43
44     boolean exclusiveMaximum() default false;
45
46     int minimum() default -1;
47
48     boolean exclusiveMinimum() default false;
49
50     String pattern() default "";
51
52     boolean required() default false;
53
54     String[] enums() default {};
55
56     int minItems() default 0;
57
58     long maxItems() default -1l;
59
60     boolean uniqueItems() default false;
61
62     int multipleOf() default 0;
63
64     int minLength() default 0;
65
66     long maxLength() default -1l;
67 }