⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 annotations.java

📁 对xml很好的java处理引擎,编译中绑定xml
💻 JAVA
字号:
package org.jibx.schema.elements;import org.jibx.schema.SchemaTestBase;/** * Test handling of simple schemas with annotations. */public class Annotations extends SchemaTestBase{    public static final String EMPTY_ANNOTATION =        "<schema targetNamespace='urn:anything'" +        "    xmlns='http://www.w3.org/2001/XMLSchema'" +        "    elementFormDefault='qualified'>\n" +        "  <annotation/>\n" +        "</schema>";    public static final String DOCUMENTATION_ANNOTATION =        "<schema targetNamespace='urn:anything'" +        "    xmlns='http://www.w3.org/2001/XMLSchema'" +        "    elementFormDefault='qualified'>\n" +        "  <annotation>\n" +        "    <documentation source='urn:a' xml:lang='en'>\n" +        "      this is <b xmlns='urn:b'>all</b> good" +        "    </documentation>\n" +        "  </annotation>\n" +        "</schema>";    public static final String APPINFO_ANNOTATION =        "<schema targetNamespace='urn:anything'" +        "    xmlns='http://www.w3.org/2001/XMLSchema'" +        "    elementFormDefault='qualified'>\n" +        "  <annotation>\n" +        "    <appinfo>\n" +        "      <j:jibx xmlns:j='http://www.jibx.org'>special good stuff</j:jibx>\n" +        "    </appinfo>\n" +        "  </annotation>\n" +        "</schema>";    public static final String MULTIPLE_ANNOTATION =        "<schema targetNamespace='urn:anything'" +        "    xmlns='http://www.w3.org/2001/XMLSchema'" +        "    elementFormDefault='qualified'>\n" +        "  <annotation>\n" +        "    <appinfo>\n" +        "      <j:jibx xmlns:j='http://www.jibx.org'>special good stuff</j:jibx>\n" +        "    </appinfo>\n" +        "    <documentation>\n" +        "      this is <b xmlns='urn:b'>all</b> good" +        "    </documentation>\n" +        "    <documentation xml:lang='en'>\n" +        "      this is <b xmlns='urn:b'>all</b> good" +        "    </documentation>\n" +        "    <appinfo>\n" +        "      <j:jibx xmlns:j='http://www.jibx.org' source='http://www.jibx.org'>\n" +        "        more good stuff" +        "      </j:jibx>\n" +        "    </appinfo>\n" +        "    <appinfo>\n" +        "      <j:jibx xmlns:j='http://www.jibx.org'>last good stuff</j:jibx>\n" +        "    </appinfo>\n" +        "  </annotation>\n" +        "</schema>";    public void testEmptyAnnotation() throws Exception {        runNoErrors(EMPTY_ANNOTATION);    }        public void testDocumentationAnnotation() throws Exception {        runNoErrors(DOCUMENTATION_ANNOTATION);    }        public void testAppInfoAnnotation() throws Exception {        runNoErrors(APPINFO_ANNOTATION);    }        public void testMultipleAnnotation() throws Exception {        runNoErrors(MULTIPLE_ANNOTATION);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -