public QName getPropertyName() { return XmlUtils.getElementQName(_properties[0]); }
public QName getPropertyName(int index) { return XmlUtils.getElementQName(getProperty(index)); }
public void addMessageContent(Element content) { if (content == null) throw new NullPointerException(_MESSAGES.get("NullMessageContent")); QName name = XmlUtils.getElementQName(content); _messageContent.put(name, content); }
public final Collection getExtendedElements(QName elementName) { Collection results = new ArrayList(); Iterator i = getExtendedElements().iterator(); while (i.hasNext()) { Element next = (Element)i.next(); QName nextName = XmlUtils.getElementQName(next); if (nextName.equals(elementName)) results.add(next); } return results; } }
public SimpleComponent(Element xml, WefFactory factory) { _name = XmlUtils.getElementQName(xml); Element addressXML = XmlUtils.getElement(xml, WefConstants.COMP_ADDRESS_QNAME); _address = factory.createComponentAddress(addressXML); }
private Map parseExtendedMetadata(Element property) { Map extended = new HashMap(); Element[] children = XmlUtils.getAllElements(property); for (int n = 0; n < children.length; ++n) { QName qname = XmlUtils.getElementQName(children[n]); // // 'extended metadata' is any element that isn't the // RMD *Values elements // if (!qname.equals(WsrmdConstants.VALID_VALUES_QNAME) && !qname.equals(WsrmdConstants.VALID_RANGE_QNAME) && !qname.equals(WsrmdConstants.STATIC_VALUES_QNAME)&& !qname.equals(WsrmdConstants.INITIAL_VALUES_QNAME)) { String value = XmlUtils.extractText(children[n]); extended.put(qname, value); } } return extended; }
public UpdateRequest(Element request) throws BaseFault { if (request == null) throw new NullPointerException(_MESSAGES.get("NullRequestElement")); Element[] properties = XmlUtils.getAllElements(request); if (properties.length == 0) throw new InvalidMessageFormatFault(_MESSAGES.get("NoPropertiesFoundUpdate")); setPropertyName(XmlUtils.getElementQName(properties[0])); setValues(properties); }
throw new NullPointerException(_MESSAGES.get("NullPropertiesElement")); QName qname = XmlUtils.getElementQName(wsrpElement);
QName rootName = XmlUtils.getElementQName(root);
QName actualName = XmlUtils.getElementQName(xml);
QName categoryName = XmlUtils.getElementQName(categoryTypeXML); hierarchy.add(categoryName); categoryTypeXML = XmlUtils.getElement(categoryTypeXML, WefConstants.SITUATION_CATEGORY_QNAME);
QName name = XmlUtils.getElementQName(children[n]); String dialect = children[n].getAttribute(WsnConstants.DIALECT); Filter filter = null;
public InsertRequest(Element request) throws BaseFault { if (request == null) throw new NullPointerException(_MESSAGES.get("NullRequestElement")); Element[] children = XmlUtils.getAllElements(request); if (children.length == 0) throw new InvalidMessageFormatFault(_MESSAGES.get("NoPropertiesFoundInsert")); // // the WS-RP spec says that in an Insert request with multiple // elements, all elements MUST have the same qualified name // QName firstQName = XmlUtils.getElementQName(children[0]); Element[] matches = XmlUtils.getElements(request, firstQName); if (matches.length != children.length) throw new InvalidMessageFormatFault(_MESSAGES.get("NamesNotEqualInsert")); setPropertyName(firstQName); setValues(children); }
protected SetRequest createInsertRequests(Element newDoc) throws UnableToPutResourcePropertyDocumentFault, BaseFault { // // Process each top level property from root of doc // Element[] properties = XmlUtils.getAllElements(newDoc); SetRequest set = new SimpleSetRequest(); for (int i = 0; i < properties.length; i++) { QName propQName = XmlUtils.getElementQName(properties[i]); if (getMetadata().isReadOnlyExternal(propQName)) { Object[] filler = { propQName }; throw new UnableToPutResourcePropertyDocumentFault(_MESSAGES.get("PutRPDocReadOnlyError", filler)); } SetRequestComponent insertComp = new InsertRequest(propQName, properties[i]); set.addRequestComponent(insertComp); } return set; }
_name = XmlUtils.getElementQName(detail);