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

Java XmlSchemaAttribute类代码示例

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

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



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

示例1: addXmlSchemaStatItem

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
private static XmlSchemaElement addXmlSchemaStatItem(XmlSchema schema, String name, int minOccurs) {
	XmlSchemaComplexType itemType = new XmlSchemaComplexType(schema);
	itemType.setName("ConvertigoStatsItemType");
	XmlSchemaAttribute averageAttribute = new XmlSchemaAttribute();
	averageAttribute.setName("average");
	averageAttribute.setSchemaTypeName(Constants.XSD_STRING);
	itemType.getAttributes().add(averageAttribute);
	XmlSchemaAttribute currentAttribute = new XmlSchemaAttribute();
	currentAttribute.setName("current");
	currentAttribute.setSchemaTypeName(Constants.XSD_STRING);
	itemType.getAttributes().add(currentAttribute);
	XmlSchemaUtils.add(schema, itemType);

	XmlSchemaElement hostElement = new XmlSchemaElement();
	hostElement.setName(name);
	hostElement.setMinOccurs(minOccurs);
	hostElement.setMaxOccurs(1);
	hostElement.setSchemaTypeName(itemType.getQName());
	return hostElement;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:21,代码来源:EngineStatistics.java


示例2: getKey

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
public static String getKey(Object element) {
	String key = element.getClass().getSimpleName();
	if (element instanceof NamedList) {
		key = ((NamedList) element).getName().toLowerCase() + "_folder";
	} else if (element instanceof XmlSchema) {
		key = "schema";
	} else if (element instanceof XmlSchemaDocumentation || element instanceof XmlSchemaAppInfo) {
		key = "notation";
	}  else if (element instanceof XmlSchemaObject) {
		key = key.contains("Extension") ?
			"extension" :
			key.substring(9).replaceAll("(\\p{Upper})", "_$1").toLowerCase().substring(1);
		
		if (element instanceof XmlSchemaElement) {
			key += ((XmlSchemaElement)element).getRefName() != null ? "_ref":"";
		}
		else if (element instanceof XmlSchemaAttribute) {
			key += ((XmlSchemaAttribute)element).getRefName() != null ? "_ref":"";
		}
	} else {
		key = "unresolved";
	}
	return key;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:25,代码来源:SchemaViewLabelProvider.java


示例3: add

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
public static void add(XmlSchema schema, XmlSchemaObject object) {
	if (object instanceof XmlSchemaImport) {
		add(schema, (XmlSchemaImport) object);
	} else if (object instanceof XmlSchemaInclude) {
		add(schema, (XmlSchemaInclude) object);
	} else if (object instanceof XmlSchemaElement) {
		add(schema, (XmlSchemaElement) object);
	} else if (object instanceof XmlSchemaType) {
		add(schema, (XmlSchemaType) object);
	} else if (object instanceof XmlSchemaGroup) {
		add(schema, (XmlSchemaGroup) object);
	} else if (object instanceof XmlSchemaAttributeGroup) {
		add(schema, (XmlSchemaAttributeGroup) object);
	} else if (object instanceof XmlSchemaAttribute) {
		add(schema, (XmlSchemaAttribute) object);
	} else {
		schema.getItems().add(object);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:20,代码来源:XmlSchemaUtils.java


示例4: remove

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
public static void remove(XmlSchema schema, XmlSchemaObject object) {
	if (object instanceof XmlSchemaImport) {
		remove(schema, (XmlSchemaImport) object);
	} else if (object instanceof XmlSchemaInclude) {
		remove(schema, (XmlSchemaInclude) object);
	} else if (object instanceof XmlSchemaElement) {
		remove(schema, (XmlSchemaElement) object);
	} else if (object instanceof XmlSchemaType) {
		remove(schema, (XmlSchemaType) object);
	} else if (object instanceof XmlSchemaGroup) {
		remove(schema, (XmlSchemaGroup) object);
	} else if (object instanceof XmlSchemaAttributeGroup) {
		remove(schema, (XmlSchemaAttributeGroup) object);
	} else if (object instanceof XmlSchemaAttribute) {
		remove(schema, (XmlSchemaAttribute) object);
	} else {
		schema.getItems().remove(object);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:20,代码来源:XmlSchemaUtils.java


示例5: walkSimpleContentExtension

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
protected void walkSimpleContentExtension(XmlSchema xmlSchema, XmlSchemaSimpleContentExtension obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:22,代码来源:XmlSchemaWalker.java


示例6: walkAttributeGroup

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
protected void walkAttributeGroup(XmlSchema xmlSchema, XmlSchemaAttributeGroup obj) {
	walkAnnotated(xmlSchema, obj);
	XmlSchemaObjectCollection  attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
       XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
       if (xmlSchemaAnyAttribute != null) {
       	walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:17,代码来源:XmlSchemaWalker.java


示例7: getXmlSchemaObject

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
@Override
public XmlSchemaAttribute getXmlSchemaObject(XmlSchemaCollection collection, XmlSchema schema) {
	String namespace = getNodeNameSpace();
	String namespaceURI = getNodeNameSpaceURI();
	boolean hasQName = !namespace.equals("") && !namespaceURI.equals("");
	
	XmlSchemaAttribute attribute = XmlSchemaUtils.makeDynamic(this, new XmlSchemaAttribute());
	attribute.setName(getStepNodeName());
	attribute.setSchemaTypeName(getSimpleTypeAffectation());
	if (hasQName) {
		attribute.setQName(new QName(namespaceURI,getStepNodeName(),namespace));
	}
	else {
		attribute.setUse(XmlSchemaUtils.attributeUseRequired);
	}
	addXmlSchemaAnnotation(attribute);
	return attribute;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:19,代码来源:AttributeStep.java


示例8: parseAttribute

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
private static final Attribute parseAttribute(final XmlSchemaAttribute attribute, final XmlSchema schema,
        final Xsd2UmlConfig config) {
    
    final String name = config.getPlugin().nameFromSchemaAttributeName(attribute.getQName());
    final List<TaggedValue> taggedValues = new LinkedList<TaggedValue>();
    taggedValues.addAll(annotations(attribute, config));
    
    final XmlSchemaSimpleType simpleType = attribute.getSchemaType();
    final Identifier type;
    if (simpleType != null) {
        type = config.ensureId(getSimpleTypeName(simpleType));
    } else {
        type = config.ensureId(attribute.getSchemaTypeName());
    }
    final Multiplicity multiplicity = multiplicity(range(Occurs.ONE, Occurs.ONE));
    return new Attribute(Identifier.random(), name, type, multiplicity, taggedValues);
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:18,代码来源:Xsd2UmlConvert.java


示例9: parseFields

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
private static final List<Attribute> parseFields(final XmlSchemaComplexType schemaComplexType,
        final XmlSchema schema, final Xsd2UmlConfig context) {
    final List<Attribute> attributes = new LinkedList<Attribute>();
    
    final XmlSchemaObjectCollection schemaItems = schemaComplexType.getAttributes();
    for (int i = 0, count = schemaItems.getCount(); i < count; i++) {
        final XmlSchemaObject schemaObject = schemaItems.getItem(i);
        if (schemaObject instanceof XmlSchemaAttribute) {
            final XmlSchemaAttribute schemaAttribute = (XmlSchemaAttribute) schemaObject;
            attributes.add(parseAttribute(schemaAttribute, schema, context));
            
        } else {
            throw new AssertionError(schemaObject);
        }
    }
    // parseAttributes(schemaComplexType.getAttributes(), schema);
    attributes.addAll(parseParticle(schemaComplexType.getParticle(), schema, context));
    
    return Collections.unmodifiableList(attributes);
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:21,代码来源:Xsd2UmlConvert.java


示例10: decorateImage

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
public Image decorateImage(Image image, Object element) {
	Image decoratedImage = image;
	
	if (element == null) {
		decoratedImage = null;
	} else if (element instanceof XmlSchemaParticle) {
		XmlSchemaParticle particle = (XmlSchemaParticle) element;
		
		long min = particle.getMinOccurs();
		long max = particle.getMaxOccurs();
		
		String occur = null;
		if (min == 0) {
			occur = "zero";
			if (max > 0) {
				occur += "_" + (max == 1 ? "one" : max == Long.MAX_VALUE ? "unbounded" : "n");
			}
		} else if (min == 1) {
			if (max > 1) {
				occur = "one_" + (max == Long.MAX_VALUE ? "unbounded" : "n");
			}
		} else {
			occur = "n";
			if (max > min) {
				occur += "_" + (max == Long.MAX_VALUE ? "unbounded" : "m");
			}
		}
		if (occur != null) {
			decoratedImage = getOverlayImageOccur(decoratedImage, element, occur);
		}			
	} else if (element instanceof XmlSchemaAttribute) {
		XmlSchemaAttribute attribute = (XmlSchemaAttribute) element;
		XmlSchemaUse use = attribute.getUse();
		if (use.equals(XmlSchemaUtils.attributeUseOptional)) {
			decoratedImage = getOverlayImageOccur(decoratedImage, element, "zero_one");
		}
	}
	
	return decoratedImage;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:41,代码来源:SchemaViewLabelDecorator.java


示例11: getXmlSchemaAttributeByName

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
private static XmlSchemaAttribute getXmlSchemaAttributeByName(String projectName, String name) {
	XmlSchemaAttribute xmlSchemaAttribute = null;
	XmlSchemaCollection xmlSchemaCollection;
	try {
		xmlSchemaCollection = Engine.theApp.schemaManager.getSchemasForProject(projectName);
		for (XmlSchema xmlSchema : xmlSchemaCollection.getXmlSchemas()) {
			xmlSchemaAttribute = xmlSchema.getAttributeByName(new QName(xmlSchema.getTargetNamespace(), name));
			if (xmlSchemaAttribute != null)
				return xmlSchemaAttribute;
		}
	} catch (Exception e) {}
	return null;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:14,代码来源:WebServiceTranslator.java


示例12: compare

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
public int compare(XmlSchemaAttribute o1, XmlSchemaAttribute o2) {
	try {
		return o1.getName().compareTo(o2.getName());
	}
	catch (Exception e) {
		return 0;
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:9,代码来源:XmlSchemaUtils.java


示例13: attributesToSortedSet

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
public static SortedSet<XmlSchemaAttribute> attributesToSortedSet(XmlSchemaObjectCollection attrs) {
	SortedSet<XmlSchemaAttribute> result = new TreeSet<XmlSchemaAttribute>(XmlSchemaUtils.attributeNameComparator);
	for (Iterator<XmlSchemaAttribute> i = GenericUtils.cast(attrs.getIterator()); i.hasNext();) {
		result.add(i.next());
	}
	return result;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:8,代码来源:XmlSchemaUtils.java


示例14: walkComplexType

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
protected void walkComplexType(XmlSchema xmlSchema, XmlSchemaComplexType obj) {
	walkAnnotated(xmlSchema, obj);
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute) attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef) attribute);
           }
       }
	XmlSchemaContentModel xmlSchemaContentModel  = obj.getContentModel();
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	if (xmlSchemaContentModel != null) {
        if (xmlSchemaContentModel instanceof XmlSchemaSimpleContent) {
        	walkSimpleContent(xmlSchema, (XmlSchemaSimpleContent)xmlSchemaContentModel);
        } else if (xmlSchemaContentModel instanceof XmlSchemaComplexContent) {
        	walkComplexContent(xmlSchema, (XmlSchemaComplexContent)xmlSchemaContentModel);
        }
	} else if (xmlSchemaParticle != null) {
        if (xmlSchemaParticle instanceof XmlSchemaSequence) {
        	walkSequence(xmlSchema, (XmlSchemaSequence)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaChoice) {
        	walkChoice(xmlSchema, (XmlSchemaChoice)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaAll) {
        	walkAll(xmlSchema, (XmlSchemaAll)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaGroupRef) {
        	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)xmlSchemaParticle);
        }
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:32,代码来源:XmlSchemaWalker.java


示例15: walkSimpleContentRestriction

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
protected void walkSimpleContentRestriction(XmlSchema xmlSchema, XmlSchemaSimpleContentRestriction obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaSimpleType xmlSchemaSimpleType = obj.getBaseType();
	if (xmlSchemaSimpleType != null) {
		walkSimpleType(xmlSchema, xmlSchemaSimpleType);
	}
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
       XmlSchemaObjectCollection facets = obj.getFacets();
       for (int i = 0; i < facets.getCount(); i++) {
       	XmlSchemaObject facet = facets.getItem(i);
       	walkFacet(xmlSchema, (XmlSchemaFacet)facet);
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:31,代码来源:XmlSchemaWalker.java


示例16: walkComplexContentExtension

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
protected void walkComplexContentExtension(XmlSchema xmlSchema, XmlSchemaComplexContentExtension obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	if (xmlSchemaParticle != null) {
        if (xmlSchemaParticle instanceof XmlSchemaSequence) {
        	walkSequence(xmlSchema, (XmlSchemaSequence)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaChoice) {
        	walkChoice(xmlSchema, (XmlSchemaChoice)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaAll) {
        	walkAll(xmlSchema, (XmlSchemaAll)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaGroupRef) {
        	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)xmlSchemaParticle);
        }
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:35,代码来源:XmlSchemaWalker.java


示例17: walkComplexContentRestriction

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
protected void walkComplexContentRestriction(XmlSchema xmlSchema, XmlSchemaComplexContentRestriction obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	if (xmlSchemaParticle != null) {
        if (xmlSchemaParticle instanceof XmlSchemaSequence) {
        	walkSequence(xmlSchema, (XmlSchemaSequence)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaChoice) {
        	walkChoice(xmlSchema, (XmlSchemaChoice)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaAll) {
        	walkAll(xmlSchema, (XmlSchemaAll)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaGroupRef) {
        	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)xmlSchemaParticle);
        }
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:35,代码来源:XmlSchemaWalker.java


示例18: walkAttribute

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
protected void walkAttribute(XmlSchema xmlSchema, XmlSchemaAttribute obj) {
	walkAnnotated(xmlSchema, obj);
	QName refName = obj.getRefName();
	QName typeName = obj.getSchemaTypeName();
	XmlSchemaSimpleType xmlSchemaSimpleType = obj.getSchemaType();
	
	if ((refName != null) && deep) {
		walkByAttributeRef(xmlSchema, refName);
	} else if (typeName != null) {
		walkByTypeName(xmlSchema, typeName);
	} else if (xmlSchemaSimpleType != null) {
		walkSimpleType(xmlSchema, xmlSchemaSimpleType);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:15,代码来源:XmlSchemaWalker.java


示例19: getXmlSchemaObject

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
@Override
public XmlSchemaElement getXmlSchemaObject(XmlSchemaCollection collection, XmlSchema schema) {
	XmlSchemaElement element = (XmlSchemaElement) super.getXmlSchemaObject(collection, schema);
	
	XmlSchemaComplexType cType = XmlSchemaUtils.makeDynamic(this, new XmlSchemaComplexType(schema));
	element.setType(cType);

	XmlSchemaSequence sequence = XmlSchemaUtils.makeDynamic(this, new XmlSchemaSequence());
	cType.setParticle(sequence);
	SchemaMeta.setContainerXmlSchemaGroupBase(element, sequence);		
	
	XmlSchemaAttribute attr = XmlSchemaUtils.makeDynamic(this, new XmlSchemaAttribute());
	attr.setName("file-url");
	attr.setSchemaTypeName(Constants.XSD_STRING);
	cType.getAttributes().add(attr);
	
	attr = XmlSchemaUtils.makeDynamic(this, new XmlSchemaAttribute());
	attr.setName("absolute-path");
	attr.setSchemaTypeName(Constants.XSD_STRING);
	cType.getAttributes().add(attr);
	
	attr = XmlSchemaUtils.makeDynamic(this, new XmlSchemaAttribute());
	attr.setName("relative-path");
	attr.setSchemaTypeName(Constants.XSD_STRING);
	cType.getAttributes().add(attr);
	
	return element;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:29,代码来源:WriteFileStep.java


示例20: getXmlSchemaObject

import org.apache.ws.commons.schema.XmlSchemaAttribute; //导入依赖的package包/类
@Override
public XmlSchemaElement getXmlSchemaObject(XmlSchemaCollection collection, XmlSchema schema) {
	XmlSchemaElement element = XmlSchemaUtils.makeDynamic(this, new XmlSchemaElement());
	element.setName(getStepNodeName());
	
	QName qname = new QName(schema.getTargetNamespace(), "SessionSetObjectType");
	if (schema.getTypeByName(qname) == null) {
		XmlSchemaComplexType eType = new XmlSchemaComplexType(schema);
		eType.setName("SessionSetObjectType");
		
		XmlSchemaSimpleContent sContent = new XmlSchemaSimpleContent();
		eType.setContentModel(sContent);

		XmlSchemaSimpleContentExtension sContentExt = new XmlSchemaSimpleContentExtension();
		sContentExt.setBaseTypeName(Constants.XSD_STRING);
		sContent.setContent(sContentExt);
		
		XmlSchemaAttribute attribute = new XmlSchemaAttribute();
		attribute.setName("key");
		attribute.setSchemaTypeName(Constants.XSD_STRING);
		sContentExt.getAttributes().add(attribute);
		
		schema.addType(eType);
		schema.getItems().add(eType);
	}
	
	element.setSchemaTypeName(qname);
	
	return element;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:31,代码来源:SessionSetObjectStep.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java SocketListener类代码示例发布时间:2022-05-22
下一篇:
Java Factory类代码示例发布时间: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