org.eclipse.xsd.XSDFeature类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.eclipse.xsd.XSDFeature类的一些代码示例,展示了XSDFeature类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDFeature类的具体详情如下:
包路径:org.eclipse.xsd.XSDFeature
类名称: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:

  • org.eclipse.xsd.XSDFeature#getValue
  • org.eclipse.xsd.XSDFeature#getConstraint
  • org.eclipse.xsd.XSDFeature#getForm
  • org.eclipse.xsd.XSDFeature#getLexicalValue
  • org.eclipse.xsd.XSDFeature#isGlobal
  • org.eclipse.xsd.XSDFeature#isFeatureReference
  • org.eclipse.xsd.XSDFeature#getScope
  • org.eclipse.xsd.XSDFeature#getResolvedFeature
  • org.eclipse.xsd.XSDFeature#getType
    [中]模型对象“特征”的表示形式。它用于表示“组织”的共同方面。日食xsd。XSDElementDeclaration'和'org。日食xsd。XSDAttributeDeclaration'。
    支持以下功能:
    *组织。日食xsd。XSDFeature#getValue
    *组织。日食xsd。XSDFeature#getConstraint
    *组织。日食xsd。XSDFeature#getForm
    *组织。日食xsd。XSDFeature#getLexicalValue
    *组织。日食xsd。XSDFeature#isGlobal
    *组织。日食xsd。XSDFeature#isFeatureReference
    *组织。日食xsd。XSDFeature#getScope
    *组织。日食xsd。XSDFeature#getResolvedFeature
    *组织。日食xsd。XSDFeature#getType

代码示例

代码示例来源: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);

相关文章