Java源码示例:com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder

示例1
public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {

        boolean forConstant =
            getCustomization(use).isConstantProperty() &&
            use.getFixedValue()!=null;

        String name = getPropertyName(forConstant);
        if(name==null) {
            NameConverter conv = getBuilder().getNameConverter();
            if(forConstant)
                name = conv.toConstantName(use.getDecl().getName());
            else
                name = conv.toPropertyName(use.getDecl().getName());
            if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
                name = JJavaName.getPluralForm(name);
        }

        markAsAcknowledged();
        constantPropertyErrorCheck();

        return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
                BGMBuilder.getName(use.getDecl()), tu,
                BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
    }
 
示例2
public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {

        boolean forConstant =
            getCustomization(use).isConstantProperty() &&
            use.getFixedValue()!=null;

        String name = getPropertyName(forConstant);
        if(name==null) {
            NameConverter conv = getBuilder().getNameConverter();
            if(forConstant)
                name = conv.toConstantName(use.getDecl().getName());
            else
                name = conv.toPropertyName(use.getDecl().getName());
            if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
                name = JJavaName.getPluralForm(name);
        }

        markAsAcknowledged();
        constantPropertyErrorCheck();

        return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
                BGMBuilder.getName(use.getDecl()), tu,
                BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
    }
 
示例3
public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    this.parent = p;
    this.shortName = model.allocator.assignClassName(parent,shortName);
    this.typeName = typeName;
    this.elementName = elementName;

    Language schemaLanguage = model.options.getSchemaLanguage();
    if ((schemaLanguage != null) &&
        (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
        BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
        if(factoryMethod!=null) {
            factoryMethod.markAsAcknowledged();
            this.squeezedName = factoryMethod.name;
        }
    }

    model.add(this);
}
 
示例4
public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {

        boolean forConstant =
            getCustomization(use).isConstantProperty() &&
            use.getFixedValue()!=null;

        String name = getPropertyName(forConstant);
        if(name==null) {
            NameConverter conv = getBuilder().getNameConverter();
            if(forConstant)
                name = conv.toConstantName(use.getDecl().getName());
            else
                name = conv.toPropertyName(use.getDecl().getName());
            if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
                name = JJavaName.getPluralForm(name);
        }

        markAsAcknowledged();
        constantPropertyErrorCheck();

        return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
                BGMBuilder.getName(use.getDecl()), tu,
                BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
    }
 
示例5
public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    this.parent = p;
    this.shortName = model.allocator.assignClassName(parent,shortName);
    this.typeName = typeName;
    this.elementName = elementName;

    Language schemaLanguage = model.options.getSchemaLanguage();
    if ((schemaLanguage != null) &&
        (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
        BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
        if(factoryMethod!=null) {
            factoryMethod.markAsAcknowledged();
            this.squeezedName = factoryMethod.name;
        }
    }

    model.add(this);
}
 
示例6
public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {

        boolean forConstant =
            getCustomization(use).isConstantProperty() &&
            use.getFixedValue()!=null;

        String name = getPropertyName(forConstant);
        if(name==null) {
            NameConverter conv = getBuilder().getNameConverter();
            if(forConstant)
                name = conv.toConstantName(use.getDecl().getName());
            else
                name = conv.toPropertyName(use.getDecl().getName());
            if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
                name = JJavaName.getPluralForm(name);
        }

        markAsAcknowledged();
        constantPropertyErrorCheck();

        return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
                BGMBuilder.getName(use.getDecl()), tu,
                BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
    }
 
示例7
public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    this.parent = p;
    this.shortName = model.allocator.assignClassName(parent,shortName);
    this.typeName = typeName;
    this.elementName = elementName;

    Language schemaLanguage = model.options.getSchemaLanguage();
    if ((schemaLanguage != null) &&
        (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
        BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
        if(factoryMethod!=null) {
            factoryMethod.markAsAcknowledged();
            this.squeezedName = factoryMethod.name;
        }
    }

    model.add(this);
}
 
示例8
public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {

        boolean forConstant =
            getCustomization(use).isConstantProperty() &&
            use.getFixedValue()!=null;

        String name = getPropertyName(forConstant);
        if(name==null) {
            NameConverter conv = getBuilder().getNameConverter();
            if(forConstant)
                name = conv.toConstantName(use.getDecl().getName());
            else
                name = conv.toPropertyName(use.getDecl().getName());
            if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
                name = JJavaName.getPluralForm(name);
        }

        markAsAcknowledged();
        constantPropertyErrorCheck();

        return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
                BGMBuilder.getName(use.getDecl()), tu,
                BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
    }
 
示例9
public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    this.parent = p;
    this.shortName = model.allocator.assignClassName(parent,shortName);
    this.typeName = typeName;
    this.elementName = elementName;

    Language schemaLanguage = model.options.getSchemaLanguage();
    if ((schemaLanguage != null) &&
        (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
        BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
        if(factoryMethod!=null) {
            factoryMethod.markAsAcknowledged();
            this.squeezedName = factoryMethod.name;
        }
    }

    model.add(this);
}
 
示例10
public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {

        boolean forConstant =
            getCustomization(use).isConstantProperty() &&
            use.getFixedValue()!=null;

        String name = getPropertyName(forConstant);
        if(name==null) {
            NameConverter conv = getBuilder().getNameConverter();
            if(forConstant)
                name = conv.toConstantName(use.getDecl().getName());
            else
                name = conv.toPropertyName(use.getDecl().getName());
            if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
                name = JJavaName.getPluralForm(name);
        }

        markAsAcknowledged();
        constantPropertyErrorCheck();

        return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
                BGMBuilder.getName(use.getDecl()), tu,
                BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
    }
 
示例11
public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    this.parent = p;
    this.shortName = model.allocator.assignClassName(parent,shortName);
    this.typeName = typeName;
    this.elementName = elementName;

    Language schemaLanguage = model.options.getSchemaLanguage();
    if ((schemaLanguage != null) &&
        (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
        BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
        if(factoryMethod!=null) {
            factoryMethod.markAsAcknowledged();
            this.squeezedName = factoryMethod.name;
        }
    }

    model.add(this);
}
 
示例12
public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    this.parent = p;
    this.shortName = model.allocator.assignClassName(parent,shortName);
    this.typeName = typeName;
    this.elementName = elementName;

    Language schemaLanguage = model.options.getSchemaLanguage();
    if ((schemaLanguage != null) &&
        (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
        BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
        if(factoryMethod!=null) {
            factoryMethod.markAsAcknowledged();
            this.squeezedName = factoryMethod.name;
        }
    }

    model.add(this);
}
 
示例13
public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    this.parent = p;
    this.shortName = model.allocator.assignClassName(parent,shortName);
    this.typeName = typeName;
    this.elementName = elementName;

    Language schemaLanguage = model.options.getSchemaLanguage();
    if ((schemaLanguage != null) &&
        (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
        BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
        if(factoryMethod!=null) {
            factoryMethod.markAsAcknowledged();
            this.squeezedName = factoryMethod.name;
        }
    }

    model.add(this);
}
 
示例14
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例15
private static BIProperty getDefault( BGMBuilder builder, XSComponent c ) {
    while(c!=null) {
        c = c.apply(defaultCustomizationFinder);
        if(c!=null) {
            BIProperty prop = builder.getBindInfo(c).get(BIProperty.class);
            if(prop!=null)  return prop;
        }
    }

    // default to the global one
    return builder.getGlobalBinding().getDefaultProperty();
}
 
示例16
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例17
/**
 * Sets the owner schema component and a reference to BGMBuilder.
 * This method is called from the BGMBuilder before
 * any BIDeclaration inside it is used.
 */
public void setOwner( BGMBuilder _builder, XSComponent _owner ) {
    this.owner = _owner;
    this.builder = _builder;
    for (BIDeclaration d : decls)
        d.onSetOwner();
}
 
示例18
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例19
private static BIProperty getDefault( BGMBuilder builder, XSComponent c ) {
    while(c!=null) {
        c = c.apply(defaultCustomizationFinder);
        if(c!=null) {
            BIProperty prop = builder.getBindInfo(c).get(BIProperty.class);
            if(prop!=null)  return prop;
        }
    }

    // default to the global one
    return builder.getGlobalBinding().getDefaultProperty();
}
 
示例20
private static BIProperty getDefault( BGMBuilder builder, XSComponent c ) {
    while(c!=null) {
        c = c.apply(defaultCustomizationFinder);
        if(c!=null) {
            BIProperty prop = builder.getBindInfo(c).get(BIProperty.class);
            if(prop!=null)  return prop;
        }
    }

    // default to the global one
    return builder.getGlobalBinding().getDefaultProperty();
}
 
示例21
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例22
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例23
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例24
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例25
private static BIProperty getDefault( BGMBuilder builder, XSComponent c ) {
    while(c!=null) {
        c = c.apply(defaultCustomizationFinder);
        if(c!=null) {
            BIProperty prop = builder.getBindInfo(c).get(BIProperty.class);
            if(prop!=null)  return prop;
        }
    }

    // default to the global one
    return builder.getGlobalBinding().getDefaultProperty();
}
 
示例26
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例27
/**
 * Sets the owner schema component and a reference to BGMBuilder.
 * This method is called from the BGMBuilder before
 * any BIDeclaration inside it is used.
 */
public void setOwner( BGMBuilder _builder, XSComponent _owner ) {
    this.owner = _owner;
    this.builder = _builder;
    for (BIDeclaration d : decls)
        d.onSetOwner();
}
 
示例28
/**
 * Sets the owner schema component and a reference to BGMBuilder.
 * This method is called from the BGMBuilder before
 * any BIDeclaration inside it is used.
 */
public void setOwner( BGMBuilder _builder, XSComponent _owner ) {
    this.owner = _owner;
    this.builder = _builder;
    for (BIDeclaration d : decls)
        d.onSetOwner();
}
 
示例29
/**
 * If the given component has {@link BIInlineBinaryData} customization,
 * reflect that to the specified property.
 */
public static void handle(XSComponent source, CPropertyInfo prop) {
    BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
    if(inline!=null) {
        prop.inlineBinaryData = true;
        inline.markAsAcknowledged();
    }
}
 
示例30
private static BIProperty getDefault( BGMBuilder builder, XSComponent c ) {
    while(c!=null) {
        c = c.apply(defaultCustomizationFinder);
        if(c!=null) {
            BIProperty prop = builder.getBindInfo(c).get(BIProperty.class);
            if(prop!=null)  return prop;
        }
    }

    // default to the global one
    return builder.getGlobalBinding().getDefaultProperty();
}