本文整理了Java中org.eclipse.xsd.XSDFeature
类的一些代码示例,展示了XSDFeature
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDFeature
类的具体详情如下:
包路径:org.eclipse.xsd.XSDFeature
类名称:XSDFeature
[英]A representation of the model object 'Feature'. It is used to represent aspects common to ' org.eclipse.xsd.XSDElementDeclaration' and ' org.eclipse.xsd.XSDAttributeDeclaration'.
The following features are supported:
代码示例来源:origin: geotools/geotools
typeWalker.walk(component.getType(), this);
if (component.getName() != null) {
QName qName = new QName(component.getTargetNamespace(), component.getName());
Binding binding = loader.loadBinding(qName, context);
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public static String getDisplayName(XSDNamedComponent component)
{
if (component instanceof XSDTypeDefinition)
return getDisplayNameFromXSDType((XSDTypeDefinition) component);
if (component instanceof XSDFeature)
{
XSDFeature feature = (XSDFeature) component;
if (feature.getName() != null)
return feature.getName();
else if (feature.getResolvedFeature() != null && feature.getResolvedFeature().getName() != null)
return feature.getResolvedFeature().getName();
}
return component.getName();
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
typeDefinition = xsdFeature.getResolvedFeature().getType();
XSDTypeDefinition anonymousTypeDefinition = null;
if (xsdFeature instanceof XSDElementDeclaration)
String basePrimitiveTypeString = basePrimitiveType != null ? basePrimitiveType.getName() : "";
currentPrimitiveType = basePrimitiveType;
titleString = Messages._UI_LABEL_TYPE + (anonymousTypeDefinition != null ? "(" + xsdFeature.getResolvedFeature().getName() + "Type)" : xsdSimpleTypeDefinition.getName()) + " , " + Messages._UI_LABEL_BASE + ": " + basePrimitiveTypeString; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
titleString = Messages._UI_LABEL_TYPE + (anonymousTypeDefinition != null ? "(" + xsdFeature.getResolvedFeature().getName() + "Type)" : xsdSimpleTypeDefinition.getName());
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
if (reuseRegisteredPackages && eStructuralFeature == null)
String namespace = xsdFeature.getTargetNamespace();
String name = xsdFeature.getName();
eStructuralFeature =
xsdFeature instanceof XSDElementDeclaration ?
String name = getEcoreAttribute(xsdFeature.getSchema(), "documentRoot");
if (name == null)
if (name == null)
name= validName(xsdFeature.getName(), true);
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
protected XSDTypeDefinition getEffectiveTypeDefinition(XSDComponent xsdComponent, XSDFeature xsdFeature)
{
return xsdFeature == null ? ((XSDComplexTypeDefinition)xsdComponent.eContainer()).getSimpleType() : xsdFeature.getType();
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public boolean select(Object toTest)
{
if (toTest instanceof XSDFeature)
{
XSDTypeDefinition type = ((XSDFeature)toTest).getResolvedFeature().getType();
if (type instanceof XSDSimpleTypeDefinition)
{
return true;
}
}
else if (toTest instanceof XSDSimpleTypeDefinition)
{
XSDSimpleTypeDefinition st = (XSDSimpleTypeDefinition)toTest;
if (st.eContainer() instanceof XSDSchema ||
st.eContainer() instanceof XSDFeature)
{
return true;
}
}
return false;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.xsd
String name = getEcoreAttribute(xsdFeature.getSchema(), "documentRoot");
if (name == null)
if (name == null)
name= validName(xsdFeature.getName(), true);
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public void execute()
{
// anonymousSimpleType = XSDFactory.eINSTANCE.createXSDSimpleTypeDefinition();
// anonymousSimpleType.setBaseTypeDefinition(currentType);
try
{
beginRecording(parent.getElement());
if (parent instanceof XSDElementDeclaration)
{
((XSDElementDeclaration) parent).setAnonymousTypeDefinition(anonymousSimpleType);
}
else if (parent instanceof XSDAttributeDeclaration)
{
((XSDAttributeDeclaration) parent).setAnonymousTypeDefinition(anonymousSimpleType);
}
formatChild(parent.getElement());
}
finally
{
endRecording();
}
}
代码示例来源:origin: org.eclipse/org.eclipse.xsd
protected XSDTypeDefinition getEffectiveTypeDefinition(XSDComponent xsdComponent, XSDFeature xsdFeature)
{
return xsdFeature == null ? ((XSDComplexTypeDefinition)xsdComponent.eContainer()).getSimpleType() : xsdFeature.getType();
}
代码示例来源:origin: org.eclipse/org.eclipse.xsd
if (eGenericType == null && xsdFeature != null)
eGenericType = getGenericType(xsdFeature, xsdFeature.getElement(), eStructuralFeature, getEcoreAttribute(xsdFeature, "type"));
代码示例来源:origin: org.geotools.xsd/gt-core
typeWalker.walk(component.getType(), this);
if (component.getName() != null) {
QName qName = new QName(component.getTargetNamespace(), component.getName());
Binding binding = loader.loadBinding(qName, context);
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
if (eGenericType == null && xsdFeature != null)
eGenericType = getGenericType(xsdFeature, xsdFeature.getElement(), eStructuralFeature, getEcoreAttribute(xsdFeature, "type"));
代码示例来源:origin: org.geotools/gt2-xml-core
typeWalker.walk(component.getType(), this);
if (component.getName() != null) {
QName qName = new QName(component.getTargetNamespace(), component.getName());
Binding binding = loader.loadBinding(qName, context);
代码示例来源:origin: org.geotools/gt2-xml-xsd
typeWalker.walk(component.getType(),this);
if (component.getName() != null) {
QName qName = new QName(component.getTargetNamespace(),
component.getName());
Binding binding = loader.loadBinding(qName, context);
内容来源于网络,如有侵权,请联系作者删除!