org.eclipse.xsd.XSDTypeDefinition.getSimpleType()方法的使用及代码示例

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

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

XSDTypeDefinition.getSimpleType介绍

[英]Returns the value of the 'Simple Type' reference.

This represents either the ' org.eclipse.xsd.XSDSimpleTypeDefinition' itself or the complex ' org.eclipse.xsd.XSDComplexTypeDefinition#getBaseTypeDefinition()' reference, if it is org.eclipse.xsd.XSDComplexTypeDefinition#getContentTypeCategory().
[中]返回“Simple Type”引用的值。
这代表“组织”。日食xsd。XSDSimpleTypeDefinition本身或complex组织。日食xsd。XSDComplexTypeDefinition#getBaseTypeDefinition()'引用,如果是org。日食xsd。XSDComplexTypeDefinition#getContentTypeCategory()。

代码示例

代码示例来源:origin: geotools/geotools

public int length(XSDTypeDefinition definition) {
  try {
    XSDSimpleTypeDefinition simple = definition.getSimpleType();
    XSDLengthFacet facet = simple.getLengthFacet();
    if (facet == null) {
      return Integer.MAX_VALUE;
    }
    return Integer.parseInt(facet.getLexicalValue());
  } catch (NumberFormatException ignore) {
    return Integer.MIN_VALUE;
  }
}

代码示例来源:origin: geotools/geotools

private AttributeType createProxiedType(
    final Name assignedName, final XSDTypeDefinition typeDefinition, Map typeRegistry) {
  AttributeType type;
  if (null == typeDefinition.getSimpleType()
      && typeDefinition instanceof XSDComplexTypeDefinition) {
    if (helper.isFeatureType(typeDefinition)) {
      type = new FeatureTypeProxy(assignedName, typeRegistry);
    } else {
      type = new ComplexTypeProxy(assignedName, typeRegistry);
    }
  } else {
    if (helper.isGeometryType(typeDefinition)) {
      type = new GeometryTypeProxy(assignedName, typeRegistry);
    } else {
      type = new AttributeTypeProxy(assignedName, typeRegistry);
    }
  }
  return type;
}

代码示例来源:origin: org.geotools/gt2-xml-xsd

public int length(XSDTypeDefinition definition) {
  try {
    XSDSimpleTypeDefinition simple = definition
      .getSimpleType();
    XSDLengthFacet facet = simple.getLengthFacet();
    if (facet == null) {
      return Integer.MAX_VALUE;
    }
    return Integer.parseInt(facet.getLexicalValue());
  } catch (NumberFormatException ignore) {
    return Integer.MIN_VALUE;
  }
}

代码示例来源:origin: org.geotools/gt2-xml-core

public int length(XSDTypeDefinition definition) {
  try {
    XSDSimpleTypeDefinition simple = definition
      .getSimpleType();
    XSDLengthFacet facet = simple.getLengthFacet();
    if (facet == null) {
      return Integer.MAX_VALUE;
    }
    return Integer.parseInt(facet.getLexicalValue());
  } catch (NumberFormatException ignore) {
    return Integer.MIN_VALUE;
  }
}

代码示例来源:origin: org.geotools.xsd/gt-core

public int length(XSDTypeDefinition definition) {
  try {
    XSDSimpleTypeDefinition simple = definition
      .getSimpleType();
    XSDLengthFacet facet = simple.getLengthFacet();
    if (facet == null) {
      return Integer.MAX_VALUE;
    }
    return Integer.parseInt(facet.getLexicalValue());
  } catch (NumberFormatException ignore) {
    return Integer.MIN_VALUE;
  }
}

代码示例来源:origin: org.geotools/gt-complex

private AttributeType createProxiedType(
    final Name assignedName, final XSDTypeDefinition typeDefinition, Map typeRegistry) {
  AttributeType type;
  if (null == typeDefinition.getSimpleType()
      && typeDefinition instanceof XSDComplexTypeDefinition) {
    if (helper.isFeatureType(typeDefinition)) {
      type = new FeatureTypeProxy(assignedName, typeRegistry);
    } else {
      type = new ComplexTypeProxy(assignedName, typeRegistry);
    }
  } else {
    if (helper.isGeometryType(typeDefinition)) {
      type = new GeometryTypeProxy(assignedName, typeRegistry);
    } else {
      type = new AttributeTypeProxy(assignedName, typeRegistry);
    }
  }
  return type;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

if (!isFeatureReference())
 XSDSimpleTypeDefinition xsdSimpleTypeDefinition = getType().getSimpleType();
 if (xsdSimpleTypeDefinition != null)

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

if (!isFeatureReference())
 XSDSimpleTypeDefinition xsdSimpleTypeDefinition = getType().getSimpleType();
 if (xsdSimpleTypeDefinition != null)

代码示例来源:origin: org.geotools/gt-app-schema

private AttributeType createProxiedType(final Name assignedName,
    final XSDTypeDefinition typeDefinition, Map typeRegistry) {
  AttributeType type;
  if (null == typeDefinition.getSimpleType()
      && typeDefinition instanceof XSDComplexTypeDefinition) {
    boolean isFeatureType = isDerivedFrom(typeDefinition, GML.getAbstractFeatureType());
    if (isFeatureType) {
      type = new FeatureTypeProxy(assignedName, typeRegistry);
    } else {
      type = new ComplexTypeProxy(assignedName, typeRegistry);
    }
  } else {
    boolean isGeometryType = isDerivedFrom(typeDefinition, GML.getAbstractGeometryType());
    if (isGeometryType) {
      type = new GeometryTypeProxy(assignedName, typeRegistry);
    } else {
      type = new AttributeTypeProxy(assignedName, typeRegistry);
    }
  }
  return type;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

theBaseTypeDefinition = handleNewBaseTypeDefinition(complexBaseTypeDefinition.getSimpleType());

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

theBaseTypeDefinition = handleNewBaseTypeDefinition(complexBaseTypeDefinition.getSimpleType());

相关文章