Example usage for javax.xml.bind.annotation XmlNsForm UNQUALIFIED

List of usage examples for javax.xml.bind.annotation XmlNsForm UNQUALIFIED

Introduction

In this page you can find the example usage for javax.xml.bind.annotation XmlNsForm UNQUALIFIED.

Prototype

XmlNsForm UNQUALIFIED

To view the source code for javax.xml.bind.annotation XmlNsForm UNQUALIFIED.

Click Source Link

Usage

From source file:org.javelin.sws.ext.bind.internal.model.AnalyzeSimpleTypesTest.java

@Test
public void analyzeBuiltInDatatype() throws Exception {
    TypedPatternRegistry context = (TypedPatternRegistry) SweJaxbContextFactory.createContext("", null);

    PropertyCallback<String> pc = new PropertyCallback<String>(context, String.class,
            SweJaxbConstants.XSD_STRING, XmlAccessType.NONE, XmlNsForm.QUALIFIED, XmlNsForm.UNQUALIFIED);
    TypedPattern<String> pattern = pc.analyze();
    assertTrue(pattern.isSimpleType());//from w  w  w. j  a  v  a  2 s .c om
    assertThat(pattern.getJavaType(), equalTo(String.class));
    assertThat(pattern.getSchemaType(), equalTo(new QName(Constants.URI_2001_SCHEMA_XSD, "string")));

    @SuppressWarnings("unchecked")
    Map<Class<?>, TypedPattern<?>> patterns = (Map<Class<?>, TypedPattern<?>>) ReflectionTestUtils
            .getField(context, "patterns");
    TypedPattern<?> pattern2 = patterns.get(String.class);

    assertSame("Primitive and built-in types should be analyzed only at context creation time.", pattern,
            pattern2);
}