1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package dev.metaschema.databind.model.annotations;
7   
8   import static java.lang.annotation.RetentionPolicy.RUNTIME;
9   
10  import java.lang.annotation.ElementType;
11  import java.lang.annotation.Retention;
12  import java.lang.annotation.Target;
13  
14  import dev.metaschema.core.model.IBoundObject;
15  import dev.metaschema.databind.model.IBoundModule;
16  import edu.umd.cs.findbugs.annotations.NonNull;
17  
18  /**
19   * Marks a class as a Metaschema module definition.
20   */
21  @Retention(RUNTIME)
22  @Target(ElementType.TYPE)
23  public @interface MetaschemaModule {
24    /**
25     * Get the classes representing the global fields defined on this Module.
26     *
27     * @return an array of field classes
28     */
29    @NonNull
30    Class<? extends IBoundObject>[] fields() default {};
31  
32    /**
33     * Get the classes representing the global assemblies defined on this Module.
34     *
35     * @return an array of assembly classes
36     */
37    @NonNull
38    Class<? extends IBoundObject>[] assemblies() default {};
39  
40    /**
41     * Get the classes representing the Metaschemas imported by this Module.
42     *
43     * @return an array of imported Metaschemas
44     */
45    @NonNull
46    Class<? extends IBoundModule>[] imports() default {};
47  
48    /**
49     * Get the namespace prefix bindings for this module.
50     *
51     * @return an array of namespace bindings
52     */
53    @NonNull
54    NsBinding[] nsBindings() default {};
55  
56    /**
57     * Get any remarks for this metaschema.
58     *
59     * @return a markdown string or {@code "##none"} if no remarks are provided
60     */
61    @NonNull
62    String remarks() default ModelUtil.NO_STRING_VALUE;
63  }