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

Java XSModelGroupDecl类代码示例

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

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



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

示例1: findModelGroups

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
private static Collection<? extends XSDeclaration> findModelGroups(final XSComplexType complexType) {
	XSContentType contentType = complexType.getExplicitContent();
	if (contentType == null) {
		contentType = complexType.getContentType();
	}
	final XSParticle particle = contentType.asParticle();
	if (particle != null && !particle.isRepeated()) {
		final XSTerm term = particle.getTerm();
		if (term instanceof XSModelGroupDecl) {
			return Collections.singletonList((XSModelGroupDecl)term);
		} else {
			final XSModelGroup modelGroup = term.asModelGroup();
			return modelGroup != null ? findModelGroups(modelGroup) : Collections.<XSModelGroupDecl>emptyList();
		}
	} else {
		return Collections.emptyList();
	}
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:19,代码来源:GroupInterfaceGenerator.java


示例2: _valueToDocument

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
private static void _valueToDocument( Value value, Element element, Document doc, XSType type )
{
	if ( type.isSimpleType() ) {
		element.appendChild( doc.createTextNode( value.strValue() ) );
	} else if ( type.isComplexType() ) {
		String name;
		Value currValue;
		XSComplexType complexType = type.asComplexType();

		// Iterate over attributes
		Collection< ? extends XSAttributeUse > attributeUses = complexType.getAttributeUses();
		for( XSAttributeUse attrUse : attributeUses ) {
			name = attrUse.getDecl().getName();
			if ( (currValue=getAttributeOrNull( value, name )) != null ) {
				element.setAttribute( name, currValue.strValue() );
			}
		}

		XSContentType contentType = complexType.getContentType();
		XSParticle particle = contentType.asParticle();
		if ( contentType.asSimpleType() != null ) {
			element.appendChild( doc.createTextNode( value.strValue() ) );
		} else if ( particle != null ) {
			XSTerm term = particle.getTerm();
			XSModelGroupDecl modelGroupDecl;
			XSModelGroup modelGroup = null;
			if ( (modelGroupDecl=term.asModelGroupDecl()) != null ) {
				modelGroup = modelGroupDecl.getModelGroup();
			} else if ( term.isModelGroup() ) {
				modelGroup = term.asModelGroup();
			}
			if ( modelGroup != null ) {
				_valueToDocument( value, element, doc, modelGroup );
			}
		}
	}
}
 
开发者ID:jolie,项目名称:jolie,代码行数:38,代码来源:XmlUtils.java


示例3: loadComplexType

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
private TypeDefinition loadComplexType( XSComplexType complexType, boolean lazy, TypeDefinition lazyType )
	throws ConversionException
{
	XSParticle particle;
	XSContentType contentType;
	contentType = complexType.getContentType();

	if ( (particle = contentType.asParticle()) == null ) {
		return null;//createAnyOrUndefined( complexType.getName(), complexType );

	}

	TypeInlineDefinition jolieType;

	if ( lazy ) {
		jolieType = (TypeInlineDefinition) lazyType;
	} else {
		jolieType = createComplexType( complexType, complexType.getName().replace("-","_") + TYPE_SUFFIX, particle );
	}

	if ( contentType.asSimpleType() != null ) {
		checkStrictModeForSimpleType( contentType );

	} else if ( (particle = contentType.asParticle()) != null ) {
		XSTerm term = particle.getTerm();
		XSModelGroupDecl modelGroupDecl = null;
		XSModelGroup modelGroup = null;
		modelGroup = getModelGroup( modelGroupDecl, term );


		if ( modelGroup != null ) {
			groupProcessing( modelGroup, particle, jolieType );
		}
	}
	return jolieType;


}
 
开发者ID:jolie,项目名称:jolie,代码行数:39,代码来源:XsdToJolieConverterImpl.java


示例4: getModelGroup

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
private XSModelGroup getModelGroup( XSModelGroupDecl modelGroupDecl, XSTerm term )
{
	if ( (modelGroupDecl = term.asModelGroupDecl()) != null ) {
		return modelGroupDecl.getModelGroup();
	} else if ( term.isModelGroup() ) {
		return term.asModelGroup();
	} else {
		return null;
	}
}
 
开发者ID:jolie,项目名称:jolie,代码行数:11,代码来源:XsdToJolieConverterImpl.java


示例5: iterateModelGroupDecls

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public Iterator<XSModelGroupDecl> iterateModelGroupDecls() {
    return new Iterators.Map<XSModelGroupDecl,XSSchema>(iterateSchema()) {
        protected Iterator<XSModelGroupDecl> apply(XSSchema u) {
            return u.iterateModelGroupDecls();
        }
    };
}
 
开发者ID:jolie,项目名称:jolie,代码行数:8,代码来源:SchemaSetImpl.java


示例6: schema

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public void schema(XSSchema s) {
    // QUICK HACK: don't print the built-in components
    if (s.getTargetNamespace().equals(Const.schemaNamespace)) {
        return;
    }

    SchemaTreeNode newNode = new SchemaTreeNode("Schema "
            + s.getLocator().getSystemId(), s.getLocator());
    this.currNode = newNode;
    this.model.addSchemaNode(newNode);

    for (XSAttGroupDecl groupDecl : s.getAttGroupDecls().values()) {
        attGroupDecl(groupDecl);
    }

    for (XSAttributeDecl attrDecl : s.getAttributeDecls().values()) {
        attributeDecl(attrDecl);
    }

    for (XSComplexType complexType : s.getComplexTypes().values()) {
        complexType(complexType);
    }

    for (XSElementDecl elementDecl : s.getElementDecls().values()) {
        elementDecl(elementDecl);
    }

    for (XSModelGroupDecl modelGroupDecl : s.getModelGroupDecls().values()) {
        modelGroupDecl(modelGroupDecl);
    }

    for (XSSimpleType simpleType : s.getSimpleTypes().values()) {
        simpleType(simpleType);
    }
}
 
开发者ID:jolie,项目名称:jolie,代码行数:36,代码来源:SchemaTreeTraverser.java


示例7: modelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public void modelGroupDecl(XSModelGroupDecl decl) {
    SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
            "Group name=\"{0}\"", new Object[]{decl.getName()}),
            decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    modelGroup(decl.getModelGroup());

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
开发者ID:jolie,项目名称:jolie,代码行数:12,代码来源:SchemaTreeTraverser.java


示例8: modelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public void modelGroupDecl( XSModelGroupDecl decl ) {
    println(MessageFormat.format("<group name=\"{0}\">",
        new Object[]{
            decl.getName()
        }));
    indent++;

    modelGroup(decl.getModelGroup());

    indent--;
    println("</group>");
}
 
开发者ID:jolie,项目名称:jolie,代码行数:13,代码来源:SchemaWriter.java


示例9: findElementDecls

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
private List<PropertyUse> findElementDecls(final XSModelGroupDecl modelGroup) {
	final List<PropertyUse> elementDecls = new ArrayList<>();
	for (final XSParticle child : modelGroup.getModelGroup()) {
		XSTerm term = child.getTerm();
		if (term instanceof XSElementDecl) {
			elementDecls.add(new PropertyUse(term));
		} else if (term instanceof XSModelGroupDecl && ((XSModelGroupDecl)term).getName().equals(modelGroup.getName())) {
			elementDecls.addAll(findElementDecls((XSModelGroupDecl)term));
		}
	}
	return elementDecls;
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:13,代码来源:GroupInterfaceGenerator.java


示例10: createGroup

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
private void createGroup(XSModelGroupDecl modelGroupDecl) {
	EClass eClass = ecoreFactory.createEClass();
	eClass.setName(modelGroupDecl.getName());
	ePackage.getEClassifiers().add(eClass);
	for (XSParticle particle : modelGroupDecl.getModelGroup().getChildren()) {
		XSTerm term = particle.getTerm();
		if (term.isElementDecl()) {
			String name = term.asElementDecl().getName();
			EClassifier subClass = ePackage.getEClassifier(name);
			if (subClass != null && subClass instanceof EClass) {
				((EClass) subClass).getESuperTypes().add(eClass);
			}
		}
	}
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:16,代码来源:XSDSchemaReader.java


示例11: schema

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public void schema( XSSchema s ) {

		// QUICK HACK: don't print the built-in components
		if(s.getTargetNamespace().equals(Const.schemaNamespace))
			return;

		println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace()));
		indent++;

		Iterator<?> itr;

		itr = s.iterateAttGroupDecls();
		while(itr.hasNext())
			attGroupDecl( (XSAttGroupDecl)itr.next() );

		itr = s.iterateAttributeDecls();
		while(itr.hasNext())
			attributeDecl( (XSAttributeDecl)itr.next() );

		itr = s.iterateComplexTypes();
		while(itr.hasNext())
			complexType( (XSComplexType)itr.next() );

		itr = s.iterateElementDecls();
		while(itr.hasNext())
			elementDecl( (XSElementDecl)itr.next() );

		itr = s.iterateModelGroupDecls();
		while(itr.hasNext())
			modelGroupDecl( (XSModelGroupDecl)itr.next() );

		itr = s.iterateSimpleTypes();
		while(itr.hasNext())
			simpleType( (XSSimpleType)itr.next() );

		indent--;
		println("</schema>");
	}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:39,代码来源:SchemaWriter.java


示例12: modelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public void modelGroupDecl( XSModelGroupDecl decl ) {
	println(MessageFormat.format("<group name=\"{0}\">", decl.getName()));
	indent++;

	modelGroup(decl.getModelGroup());

	indent--;
	println("</group>");
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:10,代码来源:SchemaWriter.java


示例13: modelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
/**
 * @see com.sun.xml.xsom.visitor.XSTermFunction#modelGroupDecl(com.sun.xml.xsom.XSModelGroupDecl)
 */
public Boolean modelGroupDecl(XSModelGroupDecl decl) {
    return Boolean.FALSE;
}
 
开发者ID:jolie,项目名称:jolie,代码行数:7,代码来源:XSFinder.java


示例14: modelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public T modelGroupDecl(XSModelGroupDecl decl) {
    return core.modelGroupDecl(decl);
}
 
开发者ID:jolie,项目名称:jolie,代码行数:4,代码来源:XSFunctionFilter.java


示例15: modelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public String modelGroupDecl(XSModelGroupDecl decl) {
    return localize("modelGroupDecl");
}
 
开发者ID:jolie,项目名称:jolie,代码行数:4,代码来源:NameGetter.java


示例16: modelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
/**
 * @see com.sun.xml.xsom.visitor.XSTermFunction#modelGroupDecl(XSModelGroupDecl)
 */
public String modelGroupDecl(XSModelGroupDecl decl) {
    String name = decl.getName();
    if( name == null ) name = "";
    return name + " " + nameGetter.modelGroupDecl( decl );
}
 
开发者ID:jolie,项目名称:jolie,代码行数:9,代码来源:ComponentNameFunction.java


示例17: getModelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public XSModelGroupDecl getModelGroupDecl( String ns, String localName ) {
    XSSchema schema = getSchema(ns);
    if(schema==null)    return null;

    return schema.getModelGroupDecl(localName);
}
 
开发者ID:jolie,项目名称:jolie,代码行数:7,代码来源:SchemaSetImpl.java


示例18: addModelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public void addModelGroupDecl(XSModelGroupDecl newDecl, boolean overwrite) {
    if(overwrite || !modelGroups.containsKey(newDecl.getName()))
        modelGroups.put(newDecl.getName(), newDecl);
}
 
开发者ID:jolie,项目名称:jolie,代码行数:5,代码来源:SchemaImpl.java


示例19: getModelGroupDecls

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public Map<String,XSModelGroupDecl> getModelGroupDecls() {
    return modelGroupsView;
}
 
开发者ID:jolie,项目名称:jolie,代码行数:4,代码来源:SchemaImpl.java


示例20: getModelGroupDecl

import com.sun.xml.xsom.XSModelGroupDecl; //导入依赖的package包/类
public XSModelGroupDecl getModelGroupDecl(String name) {
    return modelGroups.get(name);
}
 
开发者ID:jolie,项目名称:jolie,代码行数:4,代码来源:SchemaImpl.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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