本文整理汇总了Java中org.apache.ws.commons.schema.XmlSchemaComplexType.setName方法的典型用法代码示例。如果您正苦于以下问题:Java XmlSchemaComplexType.setName方法的具体用法?Java XmlSchemaComplexType.setName怎么用?Java XmlSchemaComplexType.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ws.commons.schema.XmlSchemaComplexType
的用法示例。
在下文中一共展示了XmlSchemaComplexType.setName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addXmlSchemaStatItem
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的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;
}
示例2: addSchemaResponseType
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
protected XmlSchemaComplexType addSchemaResponseType(XmlSchema xmlSchema) {
String nsURI = xmlSchema.getTargetNamespace();
String prefix = xmlSchema.getNamespaceContext().getPrefix(nsURI);
String localName = getXsdResponseElementName()+ "Type";
XmlSchemaComplexType xmlSchemaComplexType = new XmlSchemaComplexType(xmlSchema);
xmlSchemaComplexType.setName(localName);
XmlSchemaSequence xmlSchemaSequence = new XmlSchemaSequence();
XmlSchemaElement documentElement = new XmlSchemaElement();
documentElement.setName("document");
documentElement.setSchemaTypeName(new QName(nsURI, getXsdResponseTypeName(), prefix));
xmlSchemaSequence.getItems().add(documentElement);
xmlSchemaComplexType.setParticle(xmlSchemaSequence);
XmlSchemaUtils.add(xmlSchema, xmlSchemaComplexType);
return xmlSchemaComplexType;
}
示例3: finalizeSchemaCompilation
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
/**
* Completes the schema compilation process by writing the
* mappers and the classes in a batch if needed
*
* @throws SchemaCompilationException
*/
private void finalizeSchemaCompilation() throws SchemaCompilationException {
//write the extension mapping class
writer.writeExtensionMapper(
processedTypeMetaInfoMap.values().toArray(
new BeanWriterMetaInfoHolder[processedTypeMetaInfoMap.size()]));
if (options.isWrapClasses()) {
writer.writeBatch();
}
// resets the changed types
for (XmlSchemaComplexType xmlSchemaComplexType : changedComplexTypeSet) {
xmlSchemaComplexType.setName(null);
}
for (XmlSchemaSimpleType xmlSchemaSimpleType : changedSimpleTypeSet) {
xmlSchemaSimpleType.setName(null);
}
for (XmlSchemaElement xmlSchemaElement : changedElementSet) {
xmlSchemaElement.setSchemaTypeName(null);
}
}
示例4: writeSchema
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
@Override
public void writeSchema(XmlSchema root) {
XmlSchemaComplexType complex = new XmlSchemaComplexType(root, true);
complex.setName(getSchemaType().getLocalPart());
XmlSchemaSequence sequence = new XmlSchemaSequence();
complex.setParticle(sequence);
AegisType kType = getKeyType();
AegisType vType = getValueType();
XmlSchemaElement element = new XmlSchemaElement(root, false);
sequence.getItems().add(element);
element.setName(getEntryName().getLocalPart());
element.setMinOccurs(0);
element.setMaxOccurs(Long.MAX_VALUE);
XmlSchemaComplexType evType = new XmlSchemaComplexType(root, false);
element.setType(evType);
XmlSchemaSequence evSequence = new XmlSchemaSequence();
evType.setParticle(evSequence);
createElement(root, evSequence, getKeyName(), kType, false);
createElement(root, evSequence, getValueName(), vType, true);
}
示例5: getXmlSchemaObject
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的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;
}
示例6: getXmlSchemaObject
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的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(), "SessionRemoveObjectType");
if (schema.getTypeByName(qname) == null) {
XmlSchemaComplexType eType = new XmlSchemaComplexType(schema);
eType.setName("SessionRemoveObjectType");
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;
}
示例7: addSchemaResponseDataType
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
protected XmlSchemaComplexType addSchemaResponseDataType(XmlSchema xmlSchema) {
String localName = getXsdResponseTypeName();
XmlSchemaComplexType xmlSchemaComplexType = new XmlSchemaComplexType(xmlSchema);
xmlSchemaComplexType.setName(localName);
addSchemaResponseObjects(xmlSchema, xmlSchemaComplexType);
XmlSchemaUtils.add(xmlSchema, xmlSchemaComplexType);
return xmlSchemaComplexType;
}
示例8: writeSchema
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
@Override
public void writeSchema(XmlSchema root) {
if (isFlat()) {
return; // there is no extra level of type.
}
if (hasDefinedArray(root)) {
return;
}
XmlSchemaComplexType complex = new XmlSchemaComplexType(root, true);
complex.setName(getSchemaType().getLocalPart());
XmlSchemaSequence seq = new XmlSchemaSequence();
complex.setParticle(seq);
AegisType componentType = getComponentType();
XmlSchemaElement element = new XmlSchemaElement(root, false);
element.setName(componentType.getSchemaType().getLocalPart());
element.setSchemaTypeName(componentType.getSchemaType());
seq.getItems().add(element);
if (componentType.isNillable()) {
element.setNillable(true);
}
element.setMinOccurs(getMinOccurs());
element.setMaxOccurs(getMaxOccurs());
}
示例9: addXmlSchemaObjects
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
public static void addXmlSchemaObjects(XmlSchema schema) {
XmlSchemaSequence taskSequence = new XmlSchemaSequence();
taskSequence.getItems().add(addXmlSchemaStatItem(schema, WORKER_THREAD_START.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, HTTP_CONNECT.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, GET_XUL_DOCUMENT.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, WAIT_HTML_TRIGGER.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, GET_JAVELIN_OBJECT.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, GET_CURRENT_SCREEN_CLASS.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, APPLY_USER_REQUEST.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, APPLY_BLOCK_FACTORY.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, APPLY_EXTRACTION_RULES.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, APPLY_SCREENCLASS_HANDLERS.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, EXECUTE_SEQUENCE_STEPS.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, EXECUTE_SEQUENCE_CALLS.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, GENERATE_DOM.toLowerCase(), 0));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, "others", 1));
taskSequence.getItems().add(addXmlSchemaStatItem(schema, GET_DOCUMENT.toLowerCase(), 1));
XmlSchemaComplexType taskType = new XmlSchemaComplexType(schema);
taskType.setName("ConvertigoStatsTaskType");
taskType.setParticle(taskSequence);
XmlSchemaUtils.add(schema, taskType);
XmlSchemaSequence requestSequence = new XmlSchemaSequence();
requestSequence.getItems().add(addXmlSchemaStatItem(schema, "host", 1));
requestSequence.getItems().add(addXmlSchemaStatItem(schema, "convertigo", 1));
requestSequence.getItems().add(addXmlSchemaStatItem(schema, "xsltstats", 0));
requestSequence.getItems().add(addXmlSchemaStatItem(schema, "totalstat", 1));
XmlSchemaComplexType requestType = new XmlSchemaComplexType(schema);
requestType.setName("ConvertigoStatsRequestType");
requestType.setParticle(requestSequence);
XmlSchemaUtils.add(schema, requestType);
XmlSchemaElement taskElement = new XmlSchemaElement();
taskElement.setName("task");
taskElement.setSchemaTypeName(taskType.getQName());
XmlSchemaElement requestElement = new XmlSchemaElement();
requestElement.setName("request");
requestElement.setSchemaTypeName(requestType.getQName());
XmlSchemaSequence statisticsSequence = new XmlSchemaSequence();
statisticsSequence.getItems().add(taskElement);
statisticsSequence.getItems().add(requestElement);
XmlSchemaComplexType statisticsType = new XmlSchemaComplexType(schema);
statisticsType.setName("ConvertigoStatsType");
statisticsType.setParticle(statisticsSequence);
XmlSchemaUtils.add(schema, statisticsType);
// XmlSchemaElement statisticsElement = new XmlSchemaElement();
// statisticsElement.setName("statistics");
// statisticsElement.setSchemaTypeName(statisticsType.getQName());
// XmlSchemaUtils.add(schema, statisticsElement);
}
示例10: processAnonymousComplexSchemaType
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
/**
* @param complexType
* @throws SchemaCompilationException
*/
private void processAnonymousComplexSchemaType(XmlSchemaElement elt,
XmlSchemaComplexType complexType,
XmlSchema parentSchema,
boolean isWriteAnonComplexType)
throws SchemaCompilationException {
//here we have a problem when processing the circulare element
// references if we differ this processing
// generate a name to the complex type and register it here
QName generatedTypeName = null;
String javaClassName = null;
if (isWriteAnonComplexType) {
generatedTypeName = generateTypeQName(elt.getQName(), parentSchema);
if (elt.getSchemaTypeName() == null) {
elt.setSchemaTypeName(generatedTypeName);
this.changedElementSet.add(elt);
}
//set a name
complexType.setName(generatedTypeName.getLocalPart());
this.changedComplexTypeSet.add(complexType);
javaClassName = writer.makeFullyQualifiedClassName(generatedTypeName);
processedTypemap.put(generatedTypeName, javaClassName);
this.processedElementRefMap.put(elt.getQName(), javaClassName);
complexType.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY, javaClassName);
}
BeanWriterMetaInfoHolder metaInfHolder = processComplexType(elt.getQName(),complexType, parentSchema);
// here the only difference is that we generate the class
// irrespective of where we need it or not
if (isWriteAnonComplexType) {
metaInfHolder.setOwnClassName(javaClassName);
metaInfHolder.setOwnQname(generatedTypeName);
writeComplexType(complexType, metaInfHolder);
}
//since this is a special case (an unnamed complex type) we'll put the already processed
//metainf holder in a special map to be used later
this.processedAnonymousComplexTypesMap.put(elt, metaInfHolder);
}
示例11: addSchemaRequestDataType
import org.apache.ws.commons.schema.XmlSchemaComplexType; //导入方法依赖的package包/类
protected XmlSchemaComplexType addSchemaRequestDataType(XmlSchema xmlSchema) {
String localName = getXsdRequestTypeName();
XmlSchemaComplexType xmlSchemaComplexType = new XmlSchemaComplexType(xmlSchema);
xmlSchemaComplexType.setName(localName);
XmlSchemaUtils.add(xmlSchema, xmlSchemaComplexType);
return xmlSchemaComplexType;
}