1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xml.schema.impl;
18
19 import org.opensaml.xml.XMLObject;
20 import org.opensaml.xml.io.AbstractXMLObjectUnmarshaller;
21 import org.opensaml.xml.io.UnmarshallingException;
22 import org.opensaml.xml.schema.XSQName;
23 import org.opensaml.xml.util.DatatypeHelper;
24 import org.opensaml.xml.util.XMLHelper;
25 import org.w3c.dom.Attr;
26 import org.w3c.dom.Text;
27
28
29
30
31 public class XSQNameUnmarshaller extends AbstractXMLObjectUnmarshaller {
32
33
34 protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
35 throws UnmarshallingException {
36
37 }
38
39
40 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
41
42 }
43
44
45 protected void processElementContent(XMLObject xmlObject, String elementContent) {
46
47 }
48
49
50 protected void unmarshallTextContent(XMLObject xmlObject, Text content) throws UnmarshallingException {
51 String textContent = DatatypeHelper.safeTrimOrNullString(content.getWholeText());
52 if (textContent != null) {
53 XSQName qname = (XSQName) xmlObject;
54 qname.setValue(XMLHelper.constructQName(textContent, XMLHelper.getElementAncestor(content)));
55 }
56 }
57 }