com.sun.xml.internal.bind.v2.model.core.TypeInfo Java Examples

The following examples show how to use com.sun.xml.internal.bind.v2.model.core.TypeInfo. 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 TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an <import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #2
Source File: XmlSchemaGenerator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #3
Source File: XmlSchemaGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an {@code <import>}
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #4
Source File: XmlSchemaGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #5
Source File: XmlSchemaGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #6
Source File: XmlSchemaGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #7
Source File: XmlSchemaGenerator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #8
Source File: XmlSchemaGenerator.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #9
Source File: PropertyInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #10
Source File: ModelBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #11
Source File: PropertyInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #12
Source File: PropertyInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #13
Source File: ModelBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #14
Source File: ModelBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #15
Source File: ModelBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #16
Source File: PropertyInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #17
Source File: PropertyInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #18
Source File: ModelBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #19
Source File: PropertyInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #20
Source File: ModelBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #21
Source File: PropertyInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #22
Source File: PropertyInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
 *
 * Derived class can do additional actions to complete the model.
 */
protected void link() {
    if(id==ID.IDREF) {
        // make sure that the refereced type has ID
        for (TypeInfo<T,C> ti : ref()) {
            if(!ti.canBeReferencedByIDREF())
                parent.builder.reportError(new IllegalAnnotationException(
                Messages.INVALID_IDREF.format(
                    parent.builder.nav.getTypeName(ti.getType())), this ));
        }
    }
}
 
Example #23
Source File: ModelBuilder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #24
Source File: ModelBuilder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example #25
Source File: RegistryInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Set<TypeInfo<T,C>> getReferences() {
    return references;
}
 
Example #26
Source File: MapPropertyInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Collection<? extends TypeInfo<T,C>> ref() {
    return Arrays.asList(getKeyType(),getValueType());
}
 
Example #27
Source File: ElementPropertyInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public TypeInfo<TypeT,ClassDeclT> get(int index) {
    return getTypes().get(index).getTarget();
}
 
Example #28
Source File: ElementPropertyInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public List<? extends TypeInfo<TypeT,ClassDeclT>> ref() {
    return ref;
}
 
Example #29
Source File: RegistryInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Set<TypeInfo<T,C>> getReferences() {
    return references;
}
 
Example #30
Source File: MapPropertyInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Collection<? extends TypeInfo<T,C>> ref() {
    return Arrays.asList(getKeyType(),getValueType());
}