当前位置: 首页>>代码示例>>Java>>正文


Java XmlSchemaAnnotated类代码示例

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


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

示例1: addSchemaCommentAnnotation

import org.apache.ws.commons.schema.XmlSchemaAnnotated; //导入依赖的package包/类
protected XmlSchemaAnnotation addSchemaCommentAnnotation(XmlSchemaAnnotated annoted, String comment, String description) {
	XmlSchemaAnnotation annotation = new XmlSchemaAnnotation();
	if ((comment != null) && (comment.length() > 0)) {
		XmlSchemaDocumentation documentation = new XmlSchemaDocumentation();
		documentation.setMarkup(XMLUtils.asNodeList(new String[]{XMLUtils.getCDataXml(comment)}));
		annotation.getItems().add(documentation);
	}
	if ((description != null) && (description.length() > 0)) {
		XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo();
		appInfo.setMarkup(XMLUtils.asNodeList(new String[]{description}));
		annotation.getItems().add(appInfo);
		
	}
	annoted.setAnnotation(annotation);
	return annotation;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:17,代码来源:Transaction.java

示例2: addXmlSchemaAnnotation

import org.apache.ws.commons.schema.XmlSchemaAnnotated; //导入依赖的package包/类
protected void addXmlSchemaAnnotation(XmlSchemaAnnotated annoted) {
	String comment = getComment();
	if (comment != null && comment.length() > 0) {
		XmlSchemaAnnotation annotation = XmlSchemaUtils.makeDynamic(this, new XmlSchemaAnnotation());
		annoted.setAnnotation(annotation);
		XmlSchemaDocumentation documentation = XmlSchemaUtils.makeDynamic(this, new XmlSchemaDocumentation());
		annotation.getItems().add(documentation);
		
		documentation.setMarkup(XMLUtils.asNodeList(comment));
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:12,代码来源:Step.java

示例3: annotations

import org.apache.ws.commons.schema.XmlSchemaAnnotated; //导入依赖的package包/类
/**
 * The xs:annotation is parsed into {@link TaggedValue} with one entry per
 * xs:documentation or xs:appinfo.
 */
private static final List<TaggedValue> annotations(final XmlSchemaAnnotated schemaType, final Xsd2UmlConfig config) {
    if (schemaType == null) {
        return EMPTY_TAGGED_VALUES;
    }
    final XmlSchemaAnnotation annotation = schemaType.getAnnotation();
    if (annotation == null) {
        return EMPTY_TAGGED_VALUES;
    } else {
        final List<TaggedValue> taggedValues = new LinkedList<TaggedValue>();
        final XmlSchemaObjectCollection children = annotation.getItems();
        
        for (int childIdx = 0; childIdx < children.getCount(); ++childIdx) {
            
            final XmlSchemaObject child = children.getItem(childIdx);
            if (child instanceof XmlSchemaDocumentation) {
                final XmlSchemaDocumentation documentation = (XmlSchemaDocumentation) child;
                taggedValues.add(documentation(documentation, config));
            } else if (child instanceof XmlSchemaAppInfo) {
                final XmlSchemaAppInfo appInfo = (XmlSchemaAppInfo) child;
                taggedValues.addAll(config.getPlugin().tagsFromAppInfo(appInfo, config));
            } else {
                throw new AssertionError(child);
            }
        }
        
        return taggedValues;
    }
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:33,代码来源:Xsd2UmlConvert.java

示例4: walkAnnotated

import org.apache.ws.commons.schema.XmlSchemaAnnotated; //导入依赖的package包/类
protected void walkAnnotated(XmlSchema xmlSchema, XmlSchemaAnnotated obj) {
	XmlSchemaAnnotation annotation = obj.getAnnotation();
	if (annotation != null) {
		walkAnnotation(xmlSchema, annotation);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:7,代码来源:XmlSchemaWalker.java


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