1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.opensaml.xacml.ctx.impl;
20
21 import org.opensaml.xacml.ctx.SubjectType;
22 import org.opensaml.xml.XMLObject;
23 import org.opensaml.xml.io.AbstractXMLObjectMarshaller;
24 import org.opensaml.xml.io.MarshallingException;
25 import org.w3c.dom.Element;
26
27
28 public class SubjectTypeMarshaller extends AbstractXMLObjectMarshaller {
29
30
31 public SubjectTypeMarshaller() {
32 super();
33 }
34
35
36
37
38
39
40
41
42
43 protected SubjectTypeMarshaller(String targetNamespaceURI, String targetLocalName) {
44 super(targetNamespaceURI, targetLocalName);
45 }
46
47
48 protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException {
49 SubjectType attribute = (SubjectType) samlElement;
50 if (attribute.getSubjectCategory() != null) {
51 domElement.setAttributeNS(null, SubjectType.SUBJECT_CATEGORY_ATTTRIB_NAME, attribute.getSubjectCategory());
52 }
53 }
54
55
56 protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException {
57 }
58 }