JBoss XML Binding 2.0.3.GA

org.jboss.xb.annotations
Annotation Type JBossXmlNsPrefix


@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface JBossXmlNsPrefix

Sometimes, it is desirable to bind a class into different schemas with different namespaces or bind a class hierarchy into a specific target namespace and some of the classes into a different namespace the value of which depends on the root element's namespace. XmlElement's namespace attribute cannot be used in a case like that. What we need is to specify a prefix instead of the namespace itself and define the namespace to prefix mapping in the JBossXmlSchema annotation. This annotation is used to reference a namespace by its prefix.

Version:
$Revision: 1.1 $
Author:
Alexey Loubyansky

Required Element Summary
 String prefix
           
 
Optional Element Summary
 boolean applyToComponentContent
          True means the type of the property (including its child elements, their types and model groups recursively) will be bound to the namespace specified by the prefix.
 boolean applyToComponentQName
          True means the element or model group the property is bound to will be bound to the namespace specified by the prefix.
 boolean schemaTargetIfNotMapped
          If the prefix mapping is not found and the value is true then the target schema namespace will be used, if the value is false then an exception will be thrown.
 

Element Detail

prefix

public abstract String prefix

schemaTargetIfNotMapped

public abstract boolean schemaTargetIfNotMapped
If the prefix mapping is not found and the value is true then the target schema namespace will be used, if the value is false then an exception will be thrown.

Returns:
Default:
false

applyToComponentQName

public abstract boolean applyToComponentQName
True means the element or model group the property is bound to will be bound to the namespace specified by the prefix. False means the element or model group will be in the schema's target namespace.

Returns:
Default:
true

applyToComponentContent

public abstract boolean applyToComponentContent
True means the type of the property (including its child elements, their types and model groups recursively) will be bound to the namespace specified by the prefix. False means the type of the property (including its child elements, their types and model groups recursively) will be bound to the schema's target namespace.

Returns:
Default:
true

JBoss XML Binding 2.0.3.GA

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.