com.sun.xml.internal.bind.v2.model.core.AttributePropertyInfo Java Examples
The following examples show how to use
com.sun.xml.internal.bind.v2.model.core.AttributePropertyInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XmlSchemaGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #2
Source File: XmlSchemaGenerator.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #3
Source File: XmlSchemaGenerator.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }
Example #4
Source File: XmlSchemaGenerator.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #5
Source File: XmlSchemaGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #6
Source File: XmlSchemaGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }
Example #7
Source File: XmlSchemaGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #8
Source File: XmlSchemaGenerator.java From hottub with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #9
Source File: XmlSchemaGenerator.java From hottub with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }
Example #10
Source File: XmlSchemaGenerator.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #11
Source File: XmlSchemaGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #12
Source File: XmlSchemaGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }
Example #13
Source File: XmlSchemaGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #14
Source File: XmlSchemaGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #15
Source File: XmlSchemaGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }
Example #16
Source File: XmlSchemaGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #17
Source File: XmlSchemaGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #18
Source File: XmlSchemaGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }
Example #19
Source File: XmlSchemaGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #20
Source File: XmlSchemaGenerator.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #21
Source File: XmlSchemaGenerator.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }
Example #22
Source File: XmlSchemaGenerator.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Generate an attribute for the specified property on the specified complexType * * @param ap the attribute * @param attr the schema definition to which the attribute will be added */ private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) { // attr is either a top-level ComplexType or a ComplexExtension // // [RESULT] // // <complexType ...> // <...>...</> // <attribute name="foo" type="xs:int"/> // </> // // or // // <complexType ...> // <complexContent> // <extension ...> // <...>...</> // </> // </> // <attribute name="foo" type="xs:int"/> // </> // // or it could also be an in-lined type (attr ref) // LocalAttribute localAttribute = attr.attribute(); final String attrURI = ap.getXmlName().getNamespaceURI(); if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) { localAttribute.name(ap.getXmlName().getLocalPart()); writeAttributeTypeRef(ap, localAttribute); attributeFormDefault.writeForm(localAttribute,ap.getXmlName()); } else { // generate an attr ref localAttribute.ref(ap.getXmlName()); } if(ap.isRequired()) { // TODO: not type safe localAttribute.use("required"); } }
Example #23
Source File: XmlSchemaGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) { attributeDecls.put( ap.getXmlName().getLocalPart(), ap ); addDependencyTo(ap.getTarget().getTypeName()); }
Example #24
Source File: XmlSchemaGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) { if( ap.isCollection() ) writeTypeRef(a.simpleType().list(), ap, "itemType"); else writeTypeRef(a, ap, "type"); }