org.geotools.xsd.XSD.getTypeMappingProfile()方法的使用及代码示例

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

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

XSD.getTypeMappingProfile介绍

[英]Returns the sbuset of #getTypeSchema() which maintains a unique java class to xml type mapping.
[中]返回#getTypeSchema()的sbuset,它维护一个唯一的java类到xml类型的映射。

代码示例

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

/**
 * Transitively returns the type mapping profile for this schema and all schemas that this
 * schema depends on.
 */
public final List<Schema> getAllTypeMappingProfiles() {
  LinkedList profiles = new LinkedList();
  for (XSD xsd : getAllDependencies()) {
    Schema profile = xsd.getTypeMappingProfile();
    if (!profile.isEmpty()) {
      profiles.add(profile);
    }
  }
  return profiles;
}

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

public PropertyValueCollection(
    FeatureCollection delegate, AttributeDescriptor descriptor, PropertyName propName) {
  this.delegate = delegate;
  this.descriptor = descriptor;
  this.typeMappingProfiles.add(XS.getInstance().getTypeMappingProfile());
  this.typeMappingProfiles.add(GML.getInstance().getTypeMappingProfile());
  this.propertyName = propName;
  // fallback for gml:id "property"
  if (descriptor == null) {
    this.descriptor = ID_DESCRIPTOR;
  }
}

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

private Class mapTypeName(String typeName) {
    // try xs simple type
    Schema xsTypeMappingProfile = XS.getInstance().getTypeMappingProfile();
    NameImpl name = new NameImpl(XS.NAMESPACE, typeName);
    if (xsTypeMappingProfile.containsKey(name)) {
      AttributeType type = xsTypeMappingProfile.get(name);
      if (type.getBinding() != null) {
        return type.getBinding();
      }
    }

    // try gml geometry types
    Geometries g = Geometries.getForName(typeName);
    if (g != null) {
      return g.getBinding();
    }

    // default
    return String.class;
  }
}

相关文章