本文整理了Java中org.eclipse.xsd.XSDComplexTypeDefinition.getSchema()
方法的一些代码示例,展示了XSDComplexTypeDefinition.getSchema()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDComplexTypeDefinition.getSchema()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDComplexTypeDefinition
类名称:XSDComplexTypeDefinition
方法名:getSchema
暂无
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
static public List getImmediateDerivedTypes(XSDComplexTypeDefinition complexType)
{
ArrayList typesDerivedFrom = new ArrayList();
// A handy convenience method quickly gets all
// typeDefinitions within our schema; note that
// whether or not this returns types in included,
// imported, or redefined schemas is subject to change
List typedefs = complexType.getSchema().getTypeDefinitions();
for (Iterator iter = typedefs.iterator(); iter.hasNext(); )
{
XSDTypeDefinition typedef = (XSDTypeDefinition)iter.next();
// Walk the baseTypes from this typedef seeing if any
// of them match the requested one
if (complexType.equals(typedef.getBaseType()))
{
// We found it, return the original one and continue
typesDerivedFrom.add(typedef);
}
}
return typesDerivedFrom;
}
// TODO... use the XSDVisitor defined in xsdeditor.util instead
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
list.add(DeleteAction.ID);
list.add(BaseSelectionAction.SEPARATOR_ID);
if (getXSDComplexTypeDefinition().getSchema() == schema)
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public IModel getModel()
{
Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDComplexTypeDefinition().getSchema());
return (IModel)adapter;
}
代码示例来源:origin: org.geotools/gt-app-schema
public AttributeDescriptor getDescriptor(final Name descriptorName,
XSDComplexTypeDefinition typeDef, XSDElementDeclaration elemDecl,
CoordinateReferenceSystem crs) {
AttributeDescriptor descriptor = descriptorRegistry.get(descriptorName);
if (descriptor == null) {
try {
if (elemDecl == null) {
elemDecl = getElementDeclaration(descriptorName);
}
} catch (NoSuchElementException e) {
String msg = "Type not found for "
+ descriptorName
+ " at type container "
+ (typeDef == null ? null : typeDef.getTargetNamespace() + "#"
+ typeDef.getName() + " at "
+ typeDef.getSchema().getSchemaLocation());
NoSuchElementException nse = new NoSuchElementException(msg);
nse.initCause(e);
throw nse;
}
descriptor = createAttributeDescriptor(typeDef, elemDecl, crs);
LOGGER.finest("Registering attribute descriptor " + descriptor.getName());
register(descriptor);
}
return descriptor;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
attributeGroup.setName(getNewName("AttributeGroup")); //$NON-NLS-1$
List list = xsdComplexTypeDefinition.getSchema().getAttributeGroupDefinitions();
if (list.size() > 0)
attributeGroup2.setName(XSDCommonUIUtils.createUniqueElementName("NewAttributeGroup", xsdComplexTypeDefinition.getSchema().getAttributeGroupDefinitions())); //$NON-NLS-1$
xsdComplexTypeDefinition.getSchema().getContents().add(attributeGroup2);
attributeGroup.setResolvedAttributeGroupDefinition(attributeGroup2);
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
XSDComplexTypeDefinition anyTypeDefinition = ctd.getSchema().getSchemaForSchema().resolveComplexTypeDefinition("anyType");
XSDContentTypeCategory contentType = ctd.getContentTypeCategory();
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
attribute.setTypeDefinition(xsdComplexTypeDefinition.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition("string")); //$NON-NLS-1$
attribute.setResolvedAttributeDeclaration(setGlobalAttributeReference(xsdComplexTypeDefinition.getSchema()));
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
xsdSchema = xsdComplexTypeDefinition.getSchema();
beginRecording(xsdSchema.getElement());
if (xsdModelGroup == null)
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
handleImport(xsdComplexTypeDefinition.getSchema(), xsdTypeDefinition);
String prefix =
handlePrefix
(xsdComplexTypeDefinition.getSchema().getQNamePrefixToNamespaceMap(),
referenceType.getEPackage().getNsPrefix(),
xsdTypeDefinition.getTargetNamespace());
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
(eClass,
"rawValue",
getEClassifier(xsdComplexTypeDefinition.getSchema().resolveTypeDefinition("string")),
null,
0,
(eClass,
"value",
getEClassifier(isSimpleAnyType ? xsdComplexTypeDefinition.getSchema().resolveTypeDefinition("anySimpleType") : baseSimpleContentType),
null,
0,
代码示例来源:origin: org.eclipse/org.eclipse.xsd
handleImport(xsdComplexTypeDefinition.getSchema(), referencedXSDElementDeclaration);
xsdElementDeclaration.setResolvedElementDeclaration(referencedXSDElementDeclaration);
xsdComplexTypeDefinition.getSchema().getSchemaForSchema().resolveTypeDefinition
(eReference.isResolveProxies() ? "anyURI" : "IDREF");
handleImport(xsdComplexTypeDefinition.getSchema(), xsdTypeDefinition);
xsdElementDeclaration.setTypeDefinition(xsdTypeDefinition);
createEcoreAnnotation(xsdParticle, referenceType == null ? "type" : "reference", getGenericType(xsdComplexTypeDefinition.getSchema(), eStructuralFeature.getEGenericType()));
handleImport(xsdComplexTypeDefinition.getSchema(), xsdTypeDefinition);
String prefix =
handlePrefix
(xsdComplexTypeDefinition.getSchema().getQNamePrefixToNamespaceMap(),
referenceType.getEPackage().getNsPrefix(),
xsdTypeDefinition.getTargetNamespace());
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
handleImport(xsdComplexTypeDefinition.getSchema(), referencedXSDElementDeclaration);
xsdElementDeclaration.setResolvedElementDeclaration(referencedXSDElementDeclaration);
xsdComplexTypeDefinition.getSchema().getSchemaForSchema().resolveTypeDefinition
(eReference.isResolveProxies() ? "anyURI" : "IDREF");
handleImport(xsdComplexTypeDefinition.getSchema(), xsdTypeDefinition);
xsdElementDeclaration.setTypeDefinition(xsdTypeDefinition);
createEcoreAnnotation(xsdParticle, referenceType == null ? "type" : "reference", getGenericType(xsdComplexTypeDefinition.getSchema(), eStructuralFeature.getEGenericType()));
handleImport(xsdComplexTypeDefinition.getSchema(), xsdTypeDefinition);
String prefix =
handlePrefix
(xsdComplexTypeDefinition.getSchema().getQNamePrefixToNamespaceMap(),
referenceType.getEPackage().getNsPrefix(),
xsdTypeDefinition.getTargetNamespace());
代码示例来源:origin: org.eclipse/org.eclipse.xsd
(eClass,
"rawValue",
getBuiltInEClassifier(xsdComplexTypeDefinition.getSchema().getSchemaForSchemaNamespace(), "string"),
null,
0,
(eClass,
"value",
getBuiltInEClassifier(xsdComplexTypeDefinition.getSchema().getSchemaForSchemaNamespace(), "anySimpleType"),
null,
0,
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
protected XSDSimpleTypeDefinition buildSimpleContent(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
XSDSchema xsdSchema = xsdComplexTypeDefinition.getSchema();
XSDSimpleTypeDefinition xsdSimpleTypeDefinition = XSDFactory.eINSTANCE.createXSDSimpleTypeDefinition();
EClassifier eType = eStructuralFeature.getEType();
代码示例来源:origin: org.eclipse/org.eclipse.xsd
protected XSDSimpleTypeDefinition buildSimpleContent(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
XSDSchema xsdSchema = xsdComplexTypeDefinition.getSchema();
XSDSimpleTypeDefinition xsdSimpleTypeDefinition = XSDFactory.eINSTANCE.createXSDSimpleTypeDefinition();
EClassifier eType = eStructuralFeature.getEType();
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
protected XSDAttributeUse buildAttributeUse(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
XSDSchema xsdSchema = xsdComplexTypeDefinition.getSchema();
String namespace = extendedMetaData.getNamespace(eStructuralFeature);
String name = extendedMetaData.getName(eStructuralFeature);
代码示例来源:origin: org.eclipse/org.eclipse.xsd
protected XSDAttributeUse buildAttributeUse(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
XSDSchema xsdSchema = xsdComplexTypeDefinition.getSchema();
String namespace = extendedMetaData.getNamespace(eStructuralFeature);
String name = extendedMetaData.getName(eStructuralFeature);
代码示例来源:origin: org.eclipse/org.eclipse.xsd
handleImport(xsdComplexTypeDefinition.getSchema(), xsdTypeDefinition);
String prefix =
handlePrefix
(xsdComplexTypeDefinition.getSchema().getQNamePrefixToNamespaceMap(),
referenceType.getEPackage().getNsPrefix(),
xsdTypeDefinition.getTargetNamespace());
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
if (registry != null)
if (schema == ct.getSchema())
内容来源于网络,如有侵权,请联系作者删除!