001/* 002 * Portions of this software was developed by employees of the National Institute 003 * of Standards and Technology (NIST), an agency of the Federal Government and is 004 * being made available as a public service. Pursuant to title 17 United States 005 * Code Section 105, works of NIST employees are not subject to copyright 006 * protection in the United States. This software may be subject to foreign 007 * copyright. Permission in the United States and in foreign countries, to the 008 * extent that NIST may hold copyright, to use, copy, modify, create derivative 009 * works, and distribute this software and its documentation without fee is hereby 010 * granted on a non-exclusive basis, provided that this notice and disclaimer 011 * of warranty appears in all copies. 012 * 013 * THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER 014 * EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY 015 * THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF 016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM 017 * INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE 018 * SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT 019 * SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, 020 * INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, 021 * OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, 022 * CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR 023 * PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT 024 * OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER. 025 */ 026 027package gov.nist.secauto.metaschema.databind.model.annotations; 028 029import static java.lang.annotation.ElementType.PACKAGE; 030import static java.lang.annotation.RetentionPolicy.RUNTIME; 031 032import java.lang.annotation.Retention; 033import java.lang.annotation.Target; 034 035/** 036 * This annotation provides package-level Module information. 037 */ 038@Retention(RUNTIME) 039@Target(PACKAGE) 040public @interface XmlSchema { 041 /** 042 * Defines the XML namespace URI and prefix to use for this model. If a prefix 043 * is not provided, the XML prefix will be auto-generated. 044 * 045 * @return an array of namespace definitions 046 */ 047 XmlNs[] xmlns() default {}; 048 049 /** 050 * Name of the XML namespace. 051 * <p> 052 * If the value is "##none", then there is no prefix defined. 053 * 054 * @return a namespace string in the form of a URI 055 */ 056 String namespace() default Constants.NO_STRING_VALUE; 057 058 /** 059 * The location of the associated XML schema. 060 * 061 * @return a location string in the form of a URI 062 */ 063 String xmlSchemaLocation() default NO_LOCATION; 064 065 /** 066 * The location of the associated JSON schema. 067 * 068 * @return a location string in the form of a URI 069 */ 070 String jsonSchemaLocation() default NO_LOCATION; 071 072 /** 073 * Get the default XML element form. 074 * 075 * @return the XML element form 076 */ 077 XmlNsForm xmlElementFormDefault() default XmlNsForm.UNSET; 078 079 /** 080 * Get the default XML attribute form. 081 * 082 * @return the XML attribute form 083 */ 084 XmlNsForm xmlAttributeFormDefault() default XmlNsForm.UNSET; 085 086 /** 087 * The default value of a schema location, which indicates that no schema will 088 * be associated. 089 * <p> 090 * The value "##none" was chosen because ## is not a valid sequence in 091 * xs:anyURI. 092 */ 093 String NO_LOCATION = Constants.NO_STRING_VALUE; 094}