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


Java XSSchema类代码示例

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


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

示例1: getSchemaSet

import com.sun.xml.xsom.XSSchema; //导入依赖的package包/类
private XSSchemaSet getSchemaSet()
	throws IOException, SAXException
{
	if ( schemaSet == null ) {
		XSOMParser schemaParser = new XSOMParser();
		ValueVector vec = getParameterVector( "schema" );
		if ( vec.size() > 0 ) {
			for( Value v : vec ) {
				schemaParser.parse( new File( v.strValue() ) );
			}
		}
		parseWSDLTypes( schemaParser );
		schemaSet = schemaParser.getResult();
		String nsPrefix = "jolie";
		int i = 1;
		for( XSSchema schema : schemaSet.getSchemas() ) {
			if ( !schema.getTargetNamespace().equals( XMLConstants.W3C_XML_SCHEMA_NS_URI ) ) {
				namespacePrefixMap.put( schema.getTargetNamespace(), nsPrefix + i++ );
			}
		}
	}

	return schemaSet;
}
 
开发者ID:jolie,项目名称:jolie,代码行数:25,代码来源:SoapProtocol.java

示例2: getComplexTypeToElementName

import com.sun.xml.xsom.XSSchema; //导入依赖的package包/类
private Map<QName, List<QName>> getComplexTypeToElementName(ClassOutline classOutline) {
    Map<QName, List<QName>> complexTypeToElementName = new HashMap<QName, List<QName>>();

    XSSchemaSet schemaSet = classOutline.target.getSchemaComponent().getRoot();
    for (XSSchema schema : schemaSet.getSchemas()) {
        Map<String, XSElementDecl> elemDecls = schema.getElementDecls();
        for (Entry<String, XSElementDecl> entry : elemDecls.entrySet()) {
            XSElementDecl decl = entry.getValue();
            XSType xsType = decl.getType();

            if (xsType.getName() == null) {
                continue;
            }
            QName type = new QName(xsType.getTargetNamespace(), xsType.getName());
            List<QName> qnames = complexTypeToElementName.get(type);

            if (qnames == null) {
                qnames = new ArrayList<QName>();
                complexTypeToElementName.put(type, qnames);
            }
            qnames.add(new QName(decl.getTargetNamespace(), decl.getName()));
        }
    }

    return complexTypeToElementName;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:27,代码来源:SchemaProcessor.java

示例3: isDerivedFromComplexType

import com.sun.xml.xsom.XSSchema; //导入依赖的package包/类
private boolean isDerivedFromComplexType(XSSchema schema, String localPart) {
	XSType base = schema.getType(localPart);
	if (base != null) {
		if (base.isSimpleType()) {
			typeFlag.add(TypeFlag.NO_ABSTRACT_GML);
			typeFlag.add(TypeFlag.NO_FEATURE);
			typeFlag.add(TypeFlag.NO_FEATURE_COLLECTION);
			typeFlag.add(TypeFlag.NO_CITY_OBJECT);
			typeFlag.add(TypeFlag.NO_GEOMETRY);
			typeFlag.add(TypeFlag.NO_FEATURE_PROPERTY);
			typeFlag.add(TypeFlag.NO_GEOMETRY_PROPERTY);

			return false;
		} else
			return element.getType().isDerivedFrom(base);
	} 

	return false;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:20,代码来源:ElementDecl.java

示例4: iterateElementDecls

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

示例5: iterateTypes

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

示例6: iterateAttributeDecls

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

示例7: iterateAttGroupDecls

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

示例8: iterateModelGroupDecls

import com.sun.xml.xsom.XSSchema; //导入依赖的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

示例9: iterateSimpleTypes

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

示例10: iterateComplexTypes

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

示例11: iterateNotations

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

示例12: iterateIdentityConstraints

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

示例13: schema

import com.sun.xml.xsom.XSSchema; //导入依赖的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

示例14: visit

import com.sun.xml.xsom.XSSchema; //导入依赖的package包/类
public void visit( XSSchemaSet s ) {
    Iterator itr =  s.iterateSchema();
    while(itr.hasNext()) {
        schema((XSSchema)itr.next());
        println();
    }
}
 
开发者ID:jolie,项目名称:jolie,代码行数:8,代码来源:SchemaWriter.java

示例15: iterator

import com.sun.xml.xsom.XSSchema; //导入依赖的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:jolie,项目名称:jolie,代码行数:8,代码来源:Axis.java


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