1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.opensaml.xacml.policy.impl;
19
20 import org.opensaml.xacml.policy.PolicySetType;
21 import org.opensaml.xml.XMLObject;
22 import org.opensaml.xml.io.AbstractXMLObjectMarshaller;
23 import org.opensaml.xml.io.MarshallingException;
24 import org.opensaml.xml.util.DatatypeHelper;
25 import org.w3c.dom.Element;
26
27
28 public class PolicySetTypeMarshaller extends AbstractXMLObjectMarshaller {
29
30
31 public PolicySetTypeMarshaller() {
32 super();
33 }
34
35
36 protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
37 PolicySetType policySet = (PolicySetType) xmlObject;
38
39 if (!DatatypeHelper.isEmpty(policySet.getPolicySetId())) {
40 domElement.setAttribute(PolicySetType.POLICY_SET_ID_ATTRIB_NAME, policySet.getPolicySetId());
41 }
42 if (!DatatypeHelper.isEmpty(policySet.getVersion())) {
43 domElement.setAttribute(PolicySetType.VERSION_ATTRIB_NAME, policySet.getVersion());
44 }
45 if (!DatatypeHelper.isEmpty(policySet.getPolicyCombiningAlgoId())) {
46 domElement.setAttribute(PolicySetType.POLICY_COMBINING_ALG_ID_ATTRIB_NAME, policySet
47 .getPolicyCombiningAlgoId());
48 }
49 }
50
51
52 protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException {
53
54 }
55 }