public static XmlSchemaElement getReferredElement(XmlSchemaElement element, SchemaCollection xmlSchemaCollection) { if (element.isRef()) { /* * Calling getTarget works if everything is in the collection already. */ XmlSchemaElement refElement = element.getRef().getTarget(); if (refElement == null) { throw new RuntimeException("Dangling reference"); } return refElement; } return null; }
public static XmlSchemaElement getReferredElement(XmlSchemaElement element, SchemaCollection xmlSchemaCollection) { if (element.isRef()) { /* * Calling getTarget works if everything is in the collection already. */ XmlSchemaElement refElement = element.getRef().getTarget(); if (refElement == null) { throw new RuntimeException("Dangling reference"); } return refElement; } return null; }
public static XmlSchemaElement getReferredElement(XmlSchemaElement element, SchemaCollection xmlSchemaCollection) { if (element.isRef()) { /* * Calling getTarget works if everything is in the collection already. */ XmlSchemaElement refElement = element.getRef().getTarget(); if (refElement == null) { throw new RuntimeException("Dangling reference"); } return refElement; } return null; }
private boolean getElementQualification(XmlSchemaElement element, String uri) { QName schemaName = element.getQName(); if (element.isRef()) { schemaName = element.getRef().getTargetQName(); } if (schemaName.getNamespaceURI().isEmpty()) { schemaName = new QName(uri, schemaName.getLocalPart()); } boolean qualified = false; if (element.getForm() == XmlSchemaForm.QUALIFIED) { qualified = true; } else { qualified = WSDLUtils.isElementFormQualified(xmlSchemaList, schemaName); } return qualified; }
/** * Wrapper around XmlSchemaElement.setName that checks for inconsistency with * refName. * @param element * @param name */ public static void setElementName(XmlSchemaElement element, String name) { if (name != null && element.isRef() && !element.getRef().getTargetQName().getLocalPart().equals(name) && (element.getQName() == null || element.getQName().getLocalPart().equals(name))) { LOG.severe("Attempt to set the name of an element with a reference name."); throw new XmlSchemaInvalidOperation("Attempt to set the name of an element " + "with a reference name."); } element.setName(name); }
/** * Wrapper around XmlSchemaElement.setName that checks for inconsistency with * refName. * @param element * @param name */ public static void setElementName(XmlSchemaElement element, String name) { if (name != null && element.isRef() && !element.getRef().getTargetQName().getLocalPart().equals(name) && (element.getQName() == null || element.getQName().getLocalPart().equals(name))) { LOG.severe("Attempt to set the name of an element with a reference name."); throw new XmlSchemaInvalidOperation("Attempt to set the name of an element " + "with a reference name."); } element.setName(name); }
/** * Wrapper around XmlSchemaElement.setName that checks for inconsistency with * refName. * @param element * @param name */ public static void setElementName(XmlSchemaElement element, String name) { if (name != null && element.isRef() && !element.getRef().getTargetQName().getLocalPart().equals(name) && (element.getQName() == null || element.getQName().getLocalPart().equals(name))) { LOG.severe("Attempt to set the name of an element with a reference name."); throw new XmlSchemaInvalidOperation("Attempt to set the name of an element " + "with a reference name."); } element.setName(name); }
throw new RuntimeException("isElementQualified on anonymous element."); if (element.isRef()) { throw new RuntimeException("isElementQualified on the 'from' side of ref=.");
throw new RuntimeException("isElementQualified on anonymous element."); if (element.isRef()) { throw new RuntimeException("isElementQualified on the 'from' side of ref=.");
throw new RuntimeException("isElementQualified on anonymous element."); if (element.isRef()) { throw new RuntimeException("isElementQualified on the 'from' side of ref=.");
throw new RuntimeException("isElementQualified on anonymous element."); if (element.isRef()) { throw new RuntimeException("isElementQualified on the 'from' side of ref=.");
throw new RuntimeException("isElementQualified on anonymous element."); if (element.isRef()) { throw new RuntimeException("isElementQualified on the 'from' side of ref=.");
public static boolean isElementNameQualified(XmlSchemaElement element, XmlSchema schema) { if (element.isRef()) { throw new RuntimeException("isElementNameQualified on element with ref="); } if (element.getForm().equals(XmlSchemaForm.QUALIFIED)) { return true; } if (element.getForm().equals(XmlSchemaForm.UNQUALIFIED)) { return false; } return schema.getElementFormDefault().equals(XmlSchemaForm.QUALIFIED); }
public static boolean isElementNameQualified(XmlSchemaElement element, XmlSchema schema) { if (element.isRef()) { throw new RuntimeException("isElementNameQualified on element with ref="); } if (element.getForm().equals(XmlSchemaForm.QUALIFIED)) { return true; } if (element.getForm().equals(XmlSchemaForm.UNQUALIFIED)) { return false; } return schema.getElementFormDefault().equals(XmlSchemaForm.QUALIFIED); }
public static boolean isElementNameQualified(XmlSchemaElement element, XmlSchema schema) { if (element.isRef()) { throw new RuntimeException("isElementNameQualified on element with ref="); } if (element.getForm().equals(XmlSchemaForm.QUALIFIED)) { return true; } if (element.getForm().equals(XmlSchemaForm.UNQUALIFIED)) { return false; } return schema.getElementFormDefault().equals(XmlSchemaForm.QUALIFIED); }
public static boolean isElementNameQualified(XmlSchemaElement element, XmlSchema schema) { if (element.isRef()) { throw new RuntimeException("isElementNameQualified on element with ref="); } if (element.getForm().equals(XmlSchemaForm.QUALIFIED)) { return true; } if (element.getForm().equals(XmlSchemaForm.UNQUALIFIED)) { return false; } return schema.getElementFormDefault().equals(XmlSchemaForm.QUALIFIED); }
public static boolean isElementNameQualified(XmlSchemaElement element, XmlSchema schema) { if (element.isRef()) { throw new RuntimeException("isElementNameQualified on element with ref="); } if (element.getForm().equals(XmlSchemaForm.QUALIFIED)) { return true; } if (element.getForm().equals(XmlSchemaForm.UNQUALIFIED)) { return false; } return schema.getElementFormDefault().equals(XmlSchemaForm.QUALIFIED); }
while (element.getSchemaType() == null && element.isRef()) {
while (element.getSchemaType() == null && element.isRef()) {
while (element.getSchemaType() == null && element.isRef()) {