private XSDElementDeclaration getElementDeclaration(final Name descriptorName) { QName qname = Types.toQName(descriptorName); XSDElementDeclaration elemDecl = null; for (SchemaIndex schemaIndex : schemas) { elemDecl = schemaIndex.getElementDeclaration(qname); if (elemDecl != null) { break; } } if (elemDecl == null) { String msg = "No top level element found in schemas: " + qname; LOGGER.log(Level.WARNING, msg); throw new NoSuchElementException(msg); } return elemDecl; }
private XSDElementDeclaration getElementDeclaration(final Name descriptorName) { QName qname = Types.toQName(descriptorName); XSDElementDeclaration elemDecl = null; for (SchemaIndex schemaIndex : schemas) { elemDecl = schemaIndex.getElementDeclaration(qname); if (elemDecl != null) { break; } } if (elemDecl == null) { String msg = "No top level element found in schemas: " + qname; LOGGER.log(Level.WARNING, msg); throw new NoSuchElementException(msg); } return elemDecl; }
public ElementHandler createElementHandler(QName qName, Handler parent, ParserHandler parser) { SchemaIndex index = parser.getSchemaIndex(); //look up the element in the schema XSDElementDeclaration element = index.getElementDeclaration(qName); if (element != null) { return createElementHandler(element, parent, parser); } return null; }
public ElementHandler createElementHandler(QName qName, Handler parent, ParserHandler parser) { SchemaIndex index = parser.getSchemaIndex(); //look up the element in the schema XSDElementDeclaration element = index.getElementDeclaration(qName); if (element != null) { return createElementHandler(element, parent, parser); } return null; }
public ElementHandler createElementHandler(QName qName, Handler parent, ParserHandler parser ) { SchemaIndex index = parser.getSchemaIndex(); //look up the element in the schema XSDElementDeclaration element = index.getElementDeclaration(qName); if (element != null) { return createElementHandler(element, parent, parser); } return null; }
@Override public ElementHandler createElementHandler(QName qName, Handler parent, ParserHandler parser) { String name = qName.getLocalPart(); if (schemaRegistry.get(name) != null) { // we found a custom schema element // let's treat it as if we've found a placemark SchemaIndex schemaIndex = parser.getSchemaIndex(); XSDElementDeclaration element = schemaIndex.getElementDeclaration(KML.Placemark); if (element != null) { return createElementHandler(element, parent, parser); } } return super.createElementHandler(qName, parent, parser); } }
elementDeclaration = schemaIndex.getElementDeclaration(featureTypeName); schemaIndex.destroy(); if (elementDeclaration == null) {
/** * TODO: add connectionfactory parameter to handle authentication, gzip, etc * * @param featureTypeName * @param schemaLocation * @return */ private static XSDElementDeclaration parseFeatureType( final QName featureTypeName, final URL schemaLocation) throws DataSourceException { ApplicationSchemaConfiguration configuration; { String namespaceURI = featureTypeName.getNamespaceURI(); String uri = schemaLocation.toExternalForm(); configuration = new ApplicationSchemaConfiguration(namespaceURI, uri); } SchemaIndex schemaIndex; try { schemaIndex = Schemas.findSchemas(configuration); } catch (RuntimeException e) { throw new DataSourceException("Error parsing feature type for " + featureTypeName, e); } XSDElementDeclaration elementDeclaration; elementDeclaration = schemaIndex.getElementDeclaration(featureTypeName); schemaIndex.destroy(); if (elementDeclaration == null) { throw new DataSourceException("No XSDElementDeclaration found for " + featureTypeName); } return elementDeclaration; }
encoder.getSchemaIndex().getElementDeclaration( name ); if ( elementDecl == null ) {
XSDElementDeclaration e = schemaIndex.getElementDeclaration(new QName(namespace, typeName));
XSDElementDeclaration root = index.getElementDeclaration(name); encoded.add(new EncodingEntry(object, root));
element = index.getElementDeclaration(qName);
XSDElementDeclaration element = index.getElementDeclaration(qualifiedName);
XSDElementDeclaration element = index.getElementDeclaration(qualifiedName);
element = index.getElementDeclaration(qName); if (element != null) { XSDElementDeclaration sub = element.getSubstitutionGroupAffiliation();
element = index.getElementDeclaration(qName);
elemDecl.getName())); for (SchemaIndex schemaIndex : schemas) { elemDecl = schemaIndex.getElementDeclaration(qname); if (elemDecl != null) { break;
Types.typeName(elemDecl.getTargetNamespace(), elemDecl.getName())); for (SchemaIndex schemaIndex : schemas) { elemDecl = schemaIndex.getElementDeclaration(qname); if (elemDecl != null) { break;