private XSDTypeDefinition getTypeDefinition(Name typeName) { QName qName = Types.toQName(typeName); XSDTypeDefinition typeDefinition = null; for (SchemaIndex schemaIndex : schemas) { typeDefinition = schemaIndex.getTypeDefinition(qName); if (typeDefinition != null) { break; } } if (typeDefinition == null) { throw new IllegalArgumentException("XSD type definition not found in schemas: " + qName); } return typeDefinition; }
private XSDTypeDefinition getTypeDefinition(Name typeName) { QName qName = Types.toQName(typeName); XSDTypeDefinition typeDefinition = null; for (SchemaIndex schemaIndex : schemas) { typeDefinition = schemaIndex.getTypeDefinition(qName); if (typeDefinition != null) { break; } } if (typeDefinition == null) { throw new IllegalArgumentException( "XSD type definition not found in schemas: " + qName); } return typeDefinition; }
public static Configuration findGmlConfiguration(AppSchemaConfiguration configuration) { SchemaIndex index = null; try { index = Schemas.findSchemas(configuration); for (QName name : SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.keySet()) { XSDTypeDefinition type = index.getTypeDefinition(name); if (type != null) { try { return SUPPORTED_GML_KNOWN_TYPE_TO_CONFIGURATION_MAP.get(name) .newInstance(); } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("Unsupported GML version for schema at " + configuration.getSchemaLocation()); } finally { if (index != null) { index.destroy(); } } }
XSDTypeDefinition type = index.getTypeDefinition(typeDefintion);
XSDTypeDefinition type = schemaIndex.getTypeDefinition(new QName(namespace, typeName));
(newTypeName != null) ? index.getTypeDefinition(newTypeName) : null;
XSDTypeDefinition type = index.getTypeDefinition(XS.ANYTYPE); decl.setTypeDefinition(type); handler = new ElementHandlerImpl(decl, parent, this);
context.unregisterComponent("http://geotools.org/typeDefinition"); XSDTypeDefinition type = index.getTypeDefinition(typeDefinition); } else { XSDTypeDefinition type = index.getTypeDefinition(XS.ANYTYPE); decl.setTypeDefinition(type);
XSDTypeDefinition type = index.getTypeDefinition( XS.ANYTYPE ); decl.setTypeDefinition( type ); handler = new ElementHandlerImpl( decl, parent, this );
XSDParticle particle(Attribute att) { XSDFactory factory = XSDFactory.eINSTANCE; AttributeType attType = att.getType(); XSDTypeDefinition xsdType = schemaIndex.getTypeDefinition( new QName(attType.getName().getNamespaceURI(), attType.getName().getLocalPart())); XSDElementDeclaration element = factory.createXSDElementDeclaration(); element.setName(att.getName().getLocalPart()); element.setTargetNamespace(att.getName().getNamespaceURI()); element.setTypeDefinition(xsdType); XSDParticle particle = factory.createXSDParticle(); particle.setContent(element); return particle; }
index.getTypeDefinition( new QName(typeName.getNamespaceURI(), typeName.getLocalPart())); if (type == null) {