public static QName toQName(Name featurePath) { return toQName(featurePath, null); }
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 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; }
/** * Returns the list of steps in an x-path expression that represents the root element. * * @param root non null descriptor of the root attribute, generally the Feature descriptor. * @param namespaces namespace support for generating qnames from namespaces. * @return A list of unique of steps in an xpath expression. * @throws IllegalArgumentException if <code>root</code> is undefined. */ public static StepList rootElementSteps( final AttributeDescriptor rootElement, final NamespaceSupport namespaces) throws IllegalArgumentException { if (rootElement == null) { throw new NullPointerException("root"); } StepList steps = new StepList(); QName qName = Types.toQName(rootElement.getName(), namespaces); steps.add(new Step(qName, 1, false, false)); return steps; }
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; }
Types.toQName( Types.typeName(elemDecl.getTargetNamespace(), elemDecl.getName())); for (SchemaIndex schemaIndex : schemas) {
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; }
/** * Returns the list of steps in an x-path expression that represents the root element. * * @param root non null descriptor of the root attribute, generally the Feature descriptor. * @param namespaces namespace support for generating qnames from namespaces. * @return A list of unique of steps in an xpath expression. * @throws IllegalArgumentException if <code>root</code> is undefined. */ public static StepList rootElementSteps( final AttributeDescriptor rootElement, final NamespaceSupport namespaces) throws IllegalArgumentException { if (rootElement == null) { throw new NullPointerException("root"); } StepList steps = new StepList(); QName qName = Types.toQName(rootElement.getName(), namespaces); steps.add(new Step(qName, 1, false, false)); return steps; }
Types.toQName( Types.typeName(elemDecl.getTargetNamespace(), elemDecl.getName())); for (SchemaIndex schemaIndex : schemas) {