当前位置: 首页>>代码示例>>Java>>正文


Java Name.getLocalPart方法代码示例

本文整理汇总了Java中org.opengis.feature.type.Name.getLocalPart方法的典型用法代码示例。如果您正苦于以下问题:Java Name.getLocalPart方法的具体用法?Java Name.getLocalPart怎么用?Java Name.getLocalPart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opengis.feature.type.Name的用法示例。


在下文中一共展示了Name.getLocalPart方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: rawSchemaExample

import org.opengis.feature.type.Name; //导入方法依赖的package包/类
private void rawSchemaExample() throws Exception {
    Name typeName = null;
    URL schemaLocation = null;
    CoordinateReferenceSystem crs = null;
    // rawSchemaExample start
    
    // assume we are working from WFS 1.1 / GML3 / etc...    
    final QName featureName = new QName(typeName.getNamespaceURI(), typeName.getLocalPart());

    String namespaceURI = featureName.getNamespaceURI();
    String uri = schemaLocation.toExternalForm();
    
    Configuration wfsConfiguration = new org.geotools.gml3.ApplicationSchemaConfiguration(
            namespaceURI, uri);

    FeatureType parsed = GTXML.parseFeatureType(wfsConfiguration, featureName, crs);
    // safely cast down to SimpleFeatureType
    SimpleFeatureType schema = DataUtilities.simple(parsed);
    // rawSchemaExample end
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:21,代码来源:GMLExamples.java

示例2: retypeAttributeValue

import org.opengis.feature.type.Name; //导入方法依赖的package包/类
@Override
public Object retypeAttributeValue(
		Object value,
		Name attributeName ) {
	Object outValue = value;
	final String localName = attributeName.getLocalPart();
	final SimpleDateFormat formatForName = fieldToFormatObjMap.get().get(
			localName);
	if (value != null && formatForName != null) {
		try {
			outValue = formatForName.parse(value.toString());
		}
		catch (ParseException e) {
			LOGGER.error("Failed to parse: " + localName + ": " + value.toString());
		}
	}
	return outValue;
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:19,代码来源:DateFieldRetypingSource.java

示例3: getDocType

import org.opengis.feature.type.Name; //导入方法依赖的package包/类
public String getDocType(Name typeName) {
    final String docType;
    if (docTypes.containsKey(typeName)) {
        docType = docTypes.get(typeName);
    } else {
        docType = typeName.getLocalPart();
    }
    return docType;
}
 
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:10,代码来源:ElasticDataStore.java

示例4: rawSchemaExample2

import org.opengis.feature.type.Name; //导入方法依赖的package包/类
private void rawSchemaExample2() throws Exception {
    Name typeName = null;
    URL schemaLocation = null;
    CoordinateReferenceSystem crs = null;
    // rawSchemaExample2 start
    
    // more involved example showing a custom Configuration
    final QName featureName = new QName(typeName.getNamespaceURI(), typeName.getLocalPart());

    String namespaceURI = featureName.getNamespaceURI();
    String uri = schemaLocation.toExternalForm();
    
    // Step 1: Parse schema using XSD 
    XSD xsd = new org.geotools.gml2.ApplicationSchemaXSD(namespaceURI, uri);
    
    // Step 2: custom configuration
    Configuration configuration = new Configuration(xsd) {
        {
            addDependency(new XSConfiguration());
            addDependency(new org.geotools.gml2.GMLConfiguration());
        }
        protected void registerBindings(java.util.Map bindings) {
            // we have no special bindings
        }
    };
    FeatureType parsed = GTXML.parseFeatureType(configuration, featureName, crs);
    // safely cast down to SimpleFeatureType
    SimpleFeatureType schema = DataUtilities.simple(parsed);
    // rawSchemaExample2 end
}
 
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:31,代码来源:GMLExamples.java

示例5: AttributeTypeImpl

import org.opengis.feature.type.Name; //导入方法依赖的package包/类
/** Construct a new AttributeType.
 * Description is taken from the display name.
 * 
 * @param name The name of the type
 * @param binding The class binding
 */
public AttributeTypeImpl(Name name, Class<?> binding) {
	super(name, binding, false, null, null, new InternationalStringImpl(name.getLocalPart() ) );

	identified = false;
	//this.type = type;
	//userdata = new HashMap<Object, Object>();
	userData.put(USER_DISPLAY_ATTRIBUTE, true);
}
 
开发者ID:opengeospatial,项目名称:Java-OpenMobility,代码行数:15,代码来源:AttributeTypeImpl.java

示例6: GeometryTypeImpl

import org.opengis.feature.type.Name; //导入方法依赖的package包/类
/** Simple constructor for default values.<p>
 * This constructor creates a default CoordinateReferenceSystemImpl of 'EPSG:4326'
 * 
 * @param name The type of Geometry, such as MultiLineString, Point etc as a {@link Name}
 * @param binding The class that will be used to hold the geometry, for example {@link Geometry}.class
 */
public GeometryTypeImpl(Name name, Class<?> binding) {
	this(name, binding, new CoordinateReferenceSystemImpl("EPSG:4326"), false, null, null, new InternationalStringImpl(name.getLocalPart()));
}
 
开发者ID:opengeospatial,项目名称:Java-OpenMobility,代码行数:10,代码来源:GeometryTypeImpl.java


注:本文中的org.opengis.feature.type.Name.getLocalPart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。