本文整理汇总了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
}
示例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;
}
示例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;
}
示例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
}
示例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);
}
示例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()));
}