• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XSComponent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.xml.internal.xsom.XSComponent的典型用法代码示例。如果您正苦于以下问题:Java XSComponent类的具体用法?Java XSComponent怎么用?Java XSComponent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XSComponent类属于com.sun.xml.internal.xsom包,在下文中一共展示了XSComponent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: CClassInfo

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
public CClassInfo(Model model,JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
    super(model,source,location,customizations);
    this.model = model;
    int idx = fullName.indexOf('.');
    if(idx<0) {
        this.parent = model.getPackage(cm.rootPackage());
        this.shortName = model.allocator.assignClassName(parent,fullName);
    } else {
        this.parent = model.getPackage(cm._package(fullName.substring(0,idx)));
        this.shortName = model.allocator.assignClassName(parent,fullName.substring(idx+1));
    }
    this.typeName = typeName;
    this.elementName = elementName;

    model.add(this);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:CClassInfo.java


示例2: select

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
public Iterator<XSComponent> select(Iterator<? extends XSComponent> contextNode) {
    Iterator<XSComponent> nodeSet = (Iterator)contextNode;

    int len = steps.length;
    for( int i=0; i<len; i++ ) {
        if(i!=0 && i!=len-1 && !steps[i-1].axis.isModelGroup() && steps[i].axis.isModelGroup()) {
            // expand the current nodeset by adding abbreviatable complex type and model groups.
            // note that such expansion is not allowed to occure in in between model group axes.

            // TODO: this step is not needed if the next step is known not to react to
            // complex type nor model groups, such as, say Axis.FACET
            nodeSet = new Iterators.Unique<XSComponent>(
                new Iterators.Map<XSComponent,XSComponent>(nodeSet) {
                    protected Iterator<XSComponent> apply(XSComponent u) {
                        return new Iterators.Union<XSComponent>(
                            Iterators.singleton(u),
                            Axis.INTERMEDIATE_SKIP.iterator(u) );
                    }
                }
            );
        }
        nodeSet = steps[i].evaluate(nodeSet);
    }

    return nodeSet;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:SCDImpl.java


示例3: check

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:UnusedCustomizationChecker.java


示例4: containingChoice

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
private boolean containingChoice(CClassInfo typeBean) {
    XSComponent component = typeBean.getSchemaComponent();
    if (component instanceof XSComplexType) {
        XSContentType contentType = ((XSComplexType) component).getContentType();
        XSParticle particle = contentType.asParticle();
        if (particle != null) {
            XSTerm term = particle.getTerm();
            XSModelGroup modelGroup = term.asModelGroup();
            if (modelGroup != null) {
                return (modelGroup.getCompositor() == XSModelGroup.Compositor.CHOICE);
            }
        }
    }

    return false;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:AbstractMappingImpl.java


示例5: getSoleElementReferer

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
/**
 * If only one global {@link XSElementDecl} is refering to {@link XSType},
 * return that element, otherwise null.
 */
private @Nullable XSElementDecl getSoleElementReferer(@NotNull XSType t) {
    Set<XSComponent> referer = builder.getReferer(t);

    XSElementDecl sole = null;
    for (XSComponent r : referer) {
        if(r instanceof XSElementDecl) {
            XSElementDecl x = (XSElementDecl) r;
            if(!x.isGlobal())
                // local element references can be ignored, as their names are either given
                // by the property, or by the JAXBElement (for things like mixed contents)
                continue;
            if(sole==null)  sole=x;
            else            return null;    // more than one
        } else {
            // if another type refers to this type, that means
            // this type has a sub-type, so type substitution is possible now.
            return null;
        }
    }

    return sole;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:DefaultClassBinder.java


示例6: createValueProperty

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
public CValuePropertyInfo createValueProperty(String defaultName,boolean forConstant,
    XSComponent source,TypeUse tu, QName typeName) {

    markAsAcknowledged();
    constantPropertyErrorCheck();

    String name = getPropertyName(forConstant);
    if(name==null) {
        name = defaultName;
        if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
            name = JJavaName.getPluralForm(name);
    }

    CValuePropertyInfo prop = wrapUp(new CValuePropertyInfo(name, source, getCustomizations(source), source.getLocator(), tu, typeName), source);
    BIInlineBinaryData.handle(source, prop);
    return prop;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:BIProperty.java


示例7: ying

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
/**
 * If the component maps to a property, forwards to purple, otherwise to green.
 *
 * If the component is mapped to a type, this method needs to return true.
 * See the chart at the class javadoc.
 */
public void ying( XSComponent sc, @Nullable XSComponent referer ) {
    if(sc.apply(toPurple)==true || getClassSelector().bindToType(sc,referer)!=null)
        sc.visit(purple);
    else
        sc.visit(green);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:BGMBuilder.java


示例8: selectSingle

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
public XSComponent selectSingle(String scd, NamespaceContext nsContext) {
    try {
        return SCD.create(scd,nsContext).selectSingle(this);
    } catch (ParseException e) {
        throw new IllegalArgumentException(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ComponentImpl.java


示例9: select

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
public Collection<XSComponent> select(String scd, NamespaceContext nsContext) {
    try {
        return SCD.create(scd,nsContext).select(this);
    } catch (ParseException e) {
        throw new IllegalArgumentException(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:SchemaImpl.java


示例10: iterator

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
/**
 * Default implementation that simply delegate sto {@link #iterator(XSComponent)}
 */
public Iterator<T> iterator(Iterator<? extends XSComponent> contextNodes) {
    return new Iterators.Map<T,XSComponent>(contextNodes) {
        protected Iterator<? extends T> apply(XSComponent u) {
            return iterator(u);
        }
    };
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:AbstractAxisImpl.java


示例11: iterator

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
public Iterator<XSSchema> iterator(Iterator<? extends XSComponent> contextNodes) {
    if(!contextNodes.hasNext())
        return Iterators.empty();
    else
        // this assumes that all current nodes belong to the same owner.
        return iterator(contextNodes.next());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:Axis.java


示例12: descendants

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
/**
 * Iterate all descendant model groups of the given model group, including itself.
 */
private Iterator<XSComponent> descendants(XSModelGroup mg) {
    // TODO: write a tree iterator
    // for now, we do it eagerly because I'm lazy
    List<XSComponent> r = new ArrayList<XSComponent>();
    visit(mg,r);
    return r.iterator();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:Axis.java


示例13: checkExpectedContentTypes

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
private void checkExpectedContentTypes(XSComponent c) {
    if(c.getForeignAttribute(WellKnownNamespace.XML_MIME_URI, Const.EXPECTED_CONTENT_TYPES)==null)
        return; // no such attribute
    if(c instanceof XSParticle)
        return; // particles get the same foreign attributes as local element decls,
                // so we need to skip them

    if(!stb.isAcknowledgedXmimeContentTypes(c)) {
        // this is not used
        getErrorReporter().warning(c.getLocator(),Messages.WARN_UNUSED_EXPECTED_CONTENT_TYPES);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:UnusedCustomizationChecker.java


示例14: AbstractCTypeInfoImpl

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
protected AbstractCTypeInfoImpl(Model model, XSComponent source, CCustomizations customizations) {
    if(customizations==null)
        customizations = CCustomizations.EMPTY;
    else
        customizations.setParent(model,this);
    this.customizations = customizations;
    this.source = source;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:AbstractCTypeInfoImpl.java


示例15: mangleClassName

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
/**
 * Transforms the default name produced from XML name
 * by following the customization.
 *
 * This shouldn't be applied to a class name specified
 * by a customization.
 *
 * @param cmp
 *      The schema component from which the default name is derived.
 */
public String mangleClassName( String name, XSComponent cmp ) {
    if( cmp instanceof XSType )
        return nameXmlTransform.typeName.mangle(name);
    if( cmp instanceof XSElementDecl )
        return nameXmlTransform.elementName.mangle(name);
    if( cmp instanceof XSAttributeDecl )
        return nameXmlTransform.attributeName.mangle(name);
    if( cmp instanceof XSModelGroup || cmp instanceof XSModelGroupDecl )
        return nameXmlTransform.modelGroupName.mangle(name);

    // otherwise no modification
    return name;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:BISchemaBinding.java


示例16: handle

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
/**
 * 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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:BIInlineBinaryData.java


示例17: createContentExtendedMixedReferenceProperty

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
public CReferencePropertyInfo createContentExtendedMixedReferenceProperty(
        String defaultName, XSComponent source, RawTypeSet types) {
        return createReferenceProperty(
                defaultName,
                false,
                source,
                types,
                true,
                false,
                true,
                true);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:BIProperty.java


示例18: getCustomizations

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
private CCustomizations getCustomizations( XSAttributeUse src ) {
    // customizations for an attribute use should include those defined in the local attribute.
    // this is so that the schema like:
    //
    // <xs:attribute name="foo" type="xs:int">
    //   <xs:annotation><xs:appinfo>
    //     <hyperjaxb:... />
    //
    // would be picked up
    if(src.getDecl().isLocal())
        return getCustomizations(src,src.getDecl());
    else
        return getCustomizations((XSComponent)src);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:BIProperty.java


示例19: getReferer

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
/**
 * Find all types that refer to the given complex type.
 */
public Set<XSComponent> getReferer(XSType c) {
    if(refFinder==null) {
        refFinder = new RefererFinder();
        refFinder.schemaSet(Ring.get(XSSchemaSet.class));
    }
    return refFinder.getReferer(c);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:BGMBuilder.java


示例20: getCustomizations

import com.sun.xml.internal.xsom.XSComponent; //导入依赖的package包/类
private CCustomizations getCustomizations( XSComponent... src ) {
    CCustomizations c = null;
    for (XSComponent s : src) {
        CCustomizations r = getCustomizations(s);
        if(c==null)     c = r;
        else            c = CCustomizations.merge(c,r);
    }
    return c;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:BIProperty.java



注:本文中的com.sun.xml.internal.xsom.XSComponent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SpringServletContainerInitializer类代码示例发布时间:2022-05-23
下一篇:
Java WaitContainerResultCallback类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap