You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ch...@apache.org on 2006/03/22 04:55:22 UTC

svn commit: r387702 - in /webservices/commons/modules/policy/xdocs: index.xml userguide.xml

Author: chatra
Date: Tue Mar 21 19:55:20 2006
New Revision: 387702

URL: http://svn.apache.org/viewcvs?rev=387702&view=rev
Log:
made some usability enhancements/upgrades

Modified:
    webservices/commons/modules/policy/xdocs/index.xml
    webservices/commons/modules/policy/xdocs/userguide.xml

Modified: webservices/commons/modules/policy/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/policy/xdocs/index.xml?rev=387702&r1=387701&r2=387702&view=diff
==============================================================================
--- webservices/commons/modules/policy/xdocs/index.xml (original)
+++ webservices/commons/modules/policy/xdocs/index.xml Tue Mar 21 19:55:20 2006
@@ -1,121 +1,115 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<document>
-	<properties>
-		<title>Welcome to WS Policy</title>
-	</properties>
-	
-	<head>
-		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
-		<meta content="text/html; charset=iso-8859-1" />
-		<meta name="generator" content="amaya 9.2.1, see http://www.w3.org/Amaya/" />
-	</head>
-	
-	<body>
-	
-	<section>
-
-	<h1>Welcome to Apache Web Services (WS) Policy</h1>
-
-<h2>Introduction</h2>
-
-<p>WS-Commons/Policy provides an implementation of WS-Policy specification.
-It provides a convenient model to process any policy information at runtime.
-In other words, it allows you to convert any policy to an object (which is
-its runtime representation) and play with it as you like. You could normalize
-it and then print it if you want to convert your original policy into a
-standard format. Else you could merge or intersect that policy object with
-another policy object and print it to see how the merge / or intersect looks
-like.</p>
-
-<p><strong>WS-Policy specification</strong> define <a
-href="#operations">policy operations</a> to manipulate policies.
-WS-Commons/Policy framework support all these operations which are extremely
-useful when trying to do complex policy manipulations</p>
-
-<h3>What is WS-Policy?</h3>
-
-<p>A <strong>WS-policy</strong> is a set of requirements that have to be met
-in order to consume a web service.</p>
-
-<p>A requirement can be domain specific. For instance, if your policy demands
-that you need security token type, then its a primitive requirement.
-<strong>PrimtiveAssertion</strong> class represents such requirements in
-<strong>Commons/Policy framework</strong>.</p>
-
-<p>Another requirement would be to meet several assertions in a certain way.
-For instance, an assertion would require all its child assertions be met
-while another assertion may require exactly one of its child assertions be
-met. Such assertions are known as <strong>CompositeAssertions</strong>. If
-assertion implements CompositeAssertion marker-interface, it's an indication
-that this assertion is of CompositeAssertion type. For instance
-AndCompositeAssertion, XorCompositeAssertion and Policy are of
-CompositeAssertion type.</p>
-
-<p>If you consider the <strong>AndCompositeAssertion</strong> it requires all
-its child terms be met. If its <strong>XorCompositeAssertion</strong> type,
-it requires that exactly one of its child terms be met. Both Policy and
-AndCompositeAssertion requires same behavior except that in
-<strong>Policy</strong>, policy object is the outer most element.</p>
-<a name="operations"></a>
-<h3>Policy Operations</h3>
-
-<p>The object model in WS-Commons/Policy becomes very handy when it comes to
-<strong>policy operation</strong>s. For instance you could invoke normalize()
-method on a policy object which will return a new policy object which has the
-same implication, but in a standard format.</p>
-
-<p>If you merge a policy object with another policy object it will return a
-new policy object which represents the merged policies of those two objects.
-If you could satisfy any policy alternative available in the resultant
-object, it is guaranteed that at least one policy alternative of both policy
-objects could be met.</p>
-
-<p>One interesting application of policies would be to identify which policy
-alternatives that both parties can agree upon. The simple solution is to
-intersect the two policy objects and get the resultant policy object. It
-would contain all possible policy alternatives that both parties agree
-upon.</p>
-
-<p>Commons/Policy framework is now reaching its maturity. It is used in other
-web services projects like Axis2, Sandehsa2 and WSS4J to process any policy
-information they require. Recently it passed all the WS Policy Interop Round1
-which is aimed to test the correctness of object model. And it seems safe to
-say that bright future is ahead.</p>
-
-<p>You can learn how to use Apache WS-Policy by checking out our <a href="userguide.html" target="_blank">User's Guide</a>
-</p>
-
-<h2>Key Features</h2>
-<ol>
-  <li>Fully compliant with latest WS-Policy Specification</li>
-  <li>Passes WS-Policy Interop ROUND1 Test Suite</li>
-</ol>
-
-<h2>Resources</h2>
-<ul>
-  <li><a
-    href="https://svn.apache.org/repos/asf/webservices/commons/modules/policy/" target="_blank">ws-commons/policy</a></li>
-  <li><a href="http://specs.xmlsoap.org/ws/2004/09/policy/ws-policy.pdf" target="_blank">Web
-    Services Policy Framework (WS-Policy)</a></li>
-  <li>Samaranayake, Sanka. January 2006. <a
-    href="http://www.wso2.net/2006/01/web_services_policy_why_what_how" target="_blank">Web
-    services Policy - Why, What &amp; How.</a></li>
-</ul>
-<!--Remove when docs are published on site-->
-<a name="mailing"></a>
-<h2>Mailing List</h2>
-
-<p>Developer List- <a
-href="mailto:commons-dev-subscribe@ws.apache.org?subject=subscribe">Subscribe</a>
-| <a
-href="mailto:commons-dev-unsubscribe@ws.apache.org?subject=unsubscribe">Unsubscribe</a></p>
-
-<p>Once subscribed to the developer mailing list you can send your feedback
-to : <a href="mailto:commons-dev@ws.apache.org?subject=[WS-Policy]">commons-dev@ws.apache.org</a>
-(Prefix the subject with [Policy])</p>
-	
-	</section>
-	
-	</body>
-</document>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<document>
+	<properties>
+		<title>Welcome to WS Policy</title>
+	</properties>
+	
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+		<meta content="text/html; charset=iso-8859-1" />
+		<meta name="generator" content="amaya 9.2.1, see http://www.w3.org/Amaya/" />
+	</head>
+	
+	<body>
+	
+	<section>
+
+	<h1>Welcome to Apache WS-Commons Policy</h1>
+
+<h2>Introduction</h2>
+
+<p>Web Services (WS)-Commons/Policy provides an implementation of WS-Policy specification.
+It provides a convenient model to process any policy information at runtime.
+In other words, it allows you to convert any policy to an object (which is
+its runtime representation) and play with it as you like. You could normalize
+it and then print it if you want to convert your original policy into a
+standard format. Else you could merge or intersect that policy object with
+another policy object and print it to see how the merge / or intersect looks
+like.</p>
+
+<p><strong>WS-Policy specification</strong> define <a
+href="#operations">policy operations</a> to manipulate policies.
+WS-Commons/Policy framework support all these operations which are extremely
+useful when trying to do complex policy manipulations</p>
+
+<h3>What is WS-Policy?</h3>
+
+<p>A <strong>WS-policy</strong> is a set of requirements that have to be met
+in order to consume a web service.</p>
+
+<p>A requirement can be domain specific. For instance, if your policy demands
+that you need security token type, then its a primitive requirement.
+<strong>PrimtiveAssertion</strong> class represents such requirements in
+<strong>Commons/Policy framework</strong>.</p>
+
+<p>Another requirement would be to meet several assertions in a certain way.
+For instance, an assertion would require all its child assertions be met
+while another assertion may require exactly one of its child assertions be
+met. Such assertions are known as <strong>CompositeAssertions</strong>. If
+assertion implements CompositeAssertion marker-interface, it's an indication
+that this assertion is of CompositeAssertion type. For instance
+AndCompositeAssertion, XorCompositeAssertion and Policy are of
+CompositeAssertion type.</p>
+
+<p>If you consider the <strong>AndCompositeAssertion</strong> it requires all
+its child terms be met. If its <strong>XorCompositeAssertion</strong> type,
+it requires that exactly one of its child terms be met. Both Policy and
+AndCompositeAssertion requires same behavior except that in
+<strong>Policy</strong>, policy object is the outer most element.</p>
+<a name="operations"></a>
+<h3>Policy Operations</h3>
+
+<p>The object model in WS-Commons/Policy becomes very handy when it comes to
+<strong>policy operation</strong>s. For instance you could invoke normalize()
+method on a policy object which will return a new policy object which has the
+same implication, but in a standard format.</p>
+
+<p>If you merge a policy object with another policy object it will return a
+new policy object which represents the merged policies of those two objects.
+If you could satisfy any policy alternative available in the resultant
+object, it is guaranteed that at least one policy alternative of both policy
+objects could be met.</p>
+
+<p>One interesting application of policies would be to identify which policy
+alternatives that both parties can agree upon. The simple solution is to
+intersect the two policy objects and get the resultant policy object. It
+would contain all possible policy alternatives that both parties agree
+upon.</p>
+
+<p>Commons/Policy framework is now reaching its maturity. It is used in other
+web services projects like Axis2, Sandehsa2 and WSS4J to process any policy
+information they require. Recently it passed all the WS Policy Interop Round1
+which is aimed to test the correctness of object model. And it seems safe to
+say that bright future is ahead.</p>
+
+<p>You can learn how to use Apache WS-Policy by checking out our <a href="userguide.html" target="_blank">User's Guide</a>
+</p>
+
+<h2>Background and Motivation</h2>
+<p>Web services is an emerging technology with enormous promise. The biggest advantage of web services is its cross platform capability. In other words, Web services allow applications to communicate in a platform independent manner. However, communication between non trivial Web services is not that straight forward. For instance, if WS-Security is enabled, the client must determine if WS-Security is optional or madatory for this service. If it is mandatory then client must determine the security token type the server understands or it prefers. After which client must determine whether to sign the messages and which parts to sign. Finally client must determine whether to encrypt the message and if so what algorithm to use. Without such information, integrating two Web services would be a next to impractical.</p> 
+
+<p>So far there was no standard way to convey this information except documentation or emails from developer to developer. WS-Policy addresses this issue and provides a standard framework to express these additional details. However, it is left to the authors of other specifications to extend this framework to convey any specific details that fall within the scope of those specifications.</p>
+
+<h2>Latest Release</h2>
+<h3>5th March 2006 -Apache WS-Commons Policy version 0.90 Released!</h3>
+<h4>Key Features in this Release</h4>
+<ol>
+  <li>Fully compliant with latest WS-Policy Specification</li>
+  <li>Passes WS-Policy Interop ROUND1 Test Suite</li>
+</ol>
+
+<h2>Resources</h2>
+<ul>
+  <li><a
+    href="https://svn.apache.org/repos/asf/webservices/commons/modules/policy/" target="_blank">ws-commons/policy</a></li>
+  <li><a href="http://specs.xmlsoap.org/ws/2004/09/policy/ws-policy.pdf" target="_blank">Web
+    Services Policy Framework (WS-Policy)</a></li>
+  <li>Samaranayake, Sanka. January 2006. <a
+    href="http://www.wso2.net/2006/01/web_services_policy_why_what_how" target="_blank">Web
+    services Policy - Why, What &amp; How.</a></li>
+</ul>
+	</section>
+	
+	</body>
+</document>

Modified: webservices/commons/modules/policy/xdocs/userguide.xml
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/policy/xdocs/userguide.xml?rev=387702&r1=387701&r2=387702&view=diff
==============================================================================
--- webservices/commons/modules/policy/xdocs/userguide.xml (original)
+++ webservices/commons/modules/policy/xdocs/userguide.xml Tue Mar 21 19:55:20 2006
@@ -1,201 +1,201 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-
-<document>
-	<properties>
-		<title>WS Policy User's Guide</title>
-	</properties>
-	
-	<head>
-		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
-		<meta name="generator" content="amaya 9.2.1, see http://www.w3.org/Amaya/"/>
-	</head>
-	
-	<body>
-		<section>
-			
-			<h1>Apache Web Services Policy User's Guide:</h1>
-			
-			<p>This document will instruct you how to use WS-Policy model, taking you
-step by step through the process using a simple sample.</p>
-			
-			<p>Send your feedback to: <a
-						href="mailto:commons-dev@ws.apache.org">commons-dev@ws.apache.org</a> (Prefix
-the subject with [Policy])</p>
-			<p>To subscribe to developer mailing list see <a href="index.html#mailing">here</a>
-			</p>
-			
-			<h2>Content</h2>
-			<ol>
-				<li>
-					<a href="#create">Create a policy object</a>
-					<ul>
-						<li>
-							<a href="#policydoc">Create a policy object by reading a policy document</a>
-							<ul>
-								<li>
-									<a href="#policyreader">How to create a PolicyReader</a>
-								</li>
-								<li>
-									<a href="#feedpolicydoc">Feed the policy document to PolicyReader as an
-            inputStream</a>
-								</li>
-							</ul>
-						</li>
-						<li>
-							<a href="#program">Create a policy object programmatically.</a>
-						</li>
-					</ul>
-				</li>
-				<li>
-					<a href="#write">Write a policy object</a>
-				</li>
-				<li>
-					<a href="#normalize">Normalization</a>
-				</li>
-				<li>
-					<a href="#merge">Merge policy objects</a>
-				</li>
-				<li>
-					<a href="#intersect">Intersect policy objects</a>
-				</li>
-			</ol>
-			<a name="create"></a>
-			<h2>Create a policy object</h2>
-			
-			<p>You can create a policy obejct using one of the following two methods</p>
-			<ol>
-				<li>
-					<a href="#policydoc">Create a policy object by redaing a policy document</a>
-				</li>
-				<li>
-					<a href="#program">Create a policy object programmatically</a>
-				</li>
-			</ol>
-			<a name="policydoc"></a>
-			<h3>Create a policy object by reading a policy document</h3>
-			
-			<p>The following steps need to be taken to create a policy object from a
-policy document</p>
-			<ol>
-				<li>
-					<a href="#policyreader">Create a PolicyReader</a> - This is the class that creates a policy object
-    using an InputStream.</li>
-				<li>
-					<a href="#feedpolicydoc">Feed the policy document to PolicyReader as an InputStream</a>-This will
-    return a policy object</li>
-			</ol>
-			<a name="policyreader"></a>
-			<h4>1. How to create a PolicyReader</h4>
-			
-			<p>PolicyReader is the class that creates a policy object using an
-InputStream.</p>
-			<source>
-				<pre>PolicyReader reader =
-PolicyFactory.getPolicyReader(PolicyFactory.OM_POLICY_READER);
-
-// or
-
-PolicyReader reader =
-PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);</pre>
-			</source>
-			<a name="feedpolicydoc"></a>
-			<h4>2. Feed the policy document to PolicyReader as an InputStream.</h4>
-			
-			<p>This step will return a policy object.</p>
-			<source>
-				<pre>String pathToPolicyFile = " /home/ ../Policy1.xml";
-
-FileInputStream fis = new FileInputStream(pathToPolicyFile);
-
-Policy policy = reader.readPolicy(fis);</pre>
-			</source>
-			<a name="program"></a>
-			<h3>Create a policy object programmatically.</h3>
-			<a name="policy"></a>
-			<p>Lets consider the sample policy below.</p>
-			<source>
-				<pre>&lt;wsp:Policy&gt;
-   &lt;wsp:ExactlyOne&gt; // Corresponds to XorCompositeAssertion
-   &lt;wsp:All&gt; // Corresponds to AndCompositeAssertion
-     &lt;ns1:TestAssertion&gt;
-     TestAssertion1
-     &lt;/ns:TestAssertion&gt;
-   &lt;/wsp:All&gt;
-   &lt;/wsp:ExactlyOne&gt;
-&lt;/wsp:Policy&gt;</pre>
-			</source>
-			<p>Now lets create programmatically the policy object which represents the
-above policy</p>
-			<source>
-				<pre>Policy p = new Policy(); // will give you the following element
-
-&lt;wsp:Policy&gt; &lt;/wsp:Policy&gt;
-
-XorCompositeAssertion x1 = new XorCompositeAssertion();
-p.addTerm(x1); //will give you XorCompositeAssertion as seen below
-
-&lt;wsp:Policy&gt;
-&lt;wsp:ExactlyOne&gt;....&lt;/wsp:ExactlyOne&gt;
-&lt;/wsp:Policy&gt;
-
-AndCompositeAssertion a1 = new AndCompositeAssertion();
-x1.addTerm(a1);// will give you AndCompositeAssertion as seen below
-
-&lt;wsp:Policy&gt;
-&lt;wsp:ExactlyOne&gt;
-&lt;wsp:All&gt;...&lt;/wsp:All&gt;
-&lt;/wsp:ExactlyOne&gt;
-&lt;/wsp:Policy&gt;
-
-QName name = new QName("Test", "http://tests.org/tests", "ns1");
-PrimitiveAssertion prim1 = new PrimitiveAssertion(name);
-prim1.setStrValue("MyTestAssertion");
-a1.addTerm(prim1); //will give you the <a href="#policy">complete policy</a>
-				</pre>
-			</source>
-			<a name="write"></a>
-			<h2>Write a policy object</h2>
-			<p>The following code will achieve this task</p>
-			<source>
-				<pre>String pathToOutFile = "/home/... /Policy2.xml";
-
-FileOutputStream fos = new FileOutputStream(pathToOutFile);
-
-PolicyWriter writer =
-PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
-
-writer.writePolicy(policy, fos );</pre>
-			</source>
-			<a name="normalize"></a>
-			<h2>Normalization</h2>
-			<p>The following code will achieve policy normalization</p>
-			<source>
-				<pre>Policy policy1 = reader.readPolicy(...);
-
-Policy normalized = (Policy) policy1.normalize();</pre>
-			</source>
-			<a name="merge"></a>
-			<h2>Merge policy objects</h2>
-			<p>The following code will merge two policy objects</p>
-			<source>
-				<pre>Policy policy1 = reader.readPolicy(...);
-
-Policy policy2 = reader.readPolicy(...);
-
-Policy merged = (Policy) policy1.merge(policy2);</pre>
-			</source>
-			<a name="intersect"></a>
-			<h2>Intersect policy objects</h2>
-			<p>The following code will intersect two policy objects</p>
-			<source>
-				<pre>Policy policy1 = reader.readPolicy(..)
-
-Policy policy2 = reader.readPolicy(..)
-
-Policy intersected = (Policy) policy1.intersect(policy2);</pre>
-			</source>
-		</section>
-	
-	</body>
-
-</document>
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<document>
+	<properties>
+		<title>WS Policy User's Guide</title>
+	</properties>
+	
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+		<meta name="generator" content="amaya 9.2.1, see http://www.w3.org/Amaya/"/>
+	</head>
+	
+	<body>
+		<section>
+			
+			<h1>Apache Web Services Policy User's Guide:</h1>
+			
+			<p>This document will instruct you how to use WS-Policy model, taking you
+step by step through the process using a simple sample.</p>
+			
+			<p>Send your feedback to: <a
+						href="mailto:commons-dev@ws.apache.org">commons-dev@ws.apache.org</a> (Prefix
+the subject with [Policy])</p>
+			<p>To subscribe to developer mailing list see <a href="http://ws.apache.org/commons/policy/mail-lists.html" target="_blank">here</a>
+			</p>
+			
+			<h2>Content</h2>
+			<ol>
+				<li>
+					<a href="#create">Create a policy object</a>
+					<ul>
+						<li>
+							<a href="#policydoc">Create a policy object by reading a policy document</a>
+							<ul>
+								<li>
+									<a href="#policyreader">How to create a PolicyReader</a>
+								</li>
+								<li>
+									<a href="#feedpolicydoc">Feed the policy document to PolicyReader as an
+            inputStream</a>
+								</li>
+							</ul>
+						</li>
+						<li>
+							<a href="#program">Create a policy object programmatically.</a>
+						</li>
+					</ul>
+				</li>
+				<li>
+					<a href="#write">Write a policy object</a>
+				</li>
+				<li>
+					<a href="#normalize">Normalization</a>
+				</li>
+				<li>
+					<a href="#merge">Merge policy objects</a>
+				</li>
+				<li>
+					<a href="#intersect">Intersect policy objects</a>
+				</li>
+			</ol>
+			<a name="create"></a>
+			<h2>Create a policy object</h2>
+			
+			<p>You can create a policy obejct using one of the following two methods</p>
+			<ol>
+				<li>
+					<a href="#policydoc">Create a policy object by redaing a policy document</a>
+				</li>
+				<li>
+					<a href="#program">Create a policy object programmatically</a>
+				</li>
+			</ol>
+			<a name="policydoc"></a>
+			<h3>Create a policy object by reading a policy document</h3>
+			
+			<p>The following steps need to be taken to create a policy object from a
+policy document</p>
+			<ol>
+				<li>
+					<a href="#policyreader">Create a PolicyReader</a> - This is the class that creates a policy object
+    using an InputStream.</li>
+				<li>
+					<a href="#feedpolicydoc">Feed the policy document to PolicyReader as an InputStream</a>-This will
+    return a policy object</li>
+			</ol>
+			<a name="policyreader"></a>
+			<h4>1. How to create a PolicyReader</h4>
+			
+			<p>PolicyReader is the class that creates a policy object using an
+InputStream.</p>
+			<source>
+				<pre>PolicyReader reader =
+PolicyFactory.getPolicyReader(PolicyFactory.OM_POLICY_READER);
+
+// or
+
+PolicyReader reader =
+PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);</pre>
+			</source>
+			<a name="feedpolicydoc"></a>
+			<h4>2. Feed the policy document to PolicyReader as an InputStream.</h4>
+			
+			<p>This step will return a policy object.</p>
+			<source>
+				<pre>String pathToPolicyFile = " /home/ ../Policy1.xml";
+
+FileInputStream fis = new FileInputStream(pathToPolicyFile);
+
+Policy policy = reader.readPolicy(fis);</pre>
+			</source>
+			<a name="program"></a>
+			<h3>Create a policy object programmatically.</h3>
+			<a name="policy"></a>
+			<p>Lets consider the sample policy below.</p>
+			<source>
+				<pre>&lt;wsp:Policy&gt;
+   &lt;wsp:ExactlyOne&gt; // Corresponds to XorCompositeAssertion
+   &lt;wsp:All&gt; // Corresponds to AndCompositeAssertion
+     &lt;ns1:TestAssertion&gt;
+     TestAssertion1
+     &lt;/ns:TestAssertion&gt;
+   &lt;/wsp:All&gt;
+   &lt;/wsp:ExactlyOne&gt;
+&lt;/wsp:Policy&gt;</pre>
+			</source>
+			<p>Now lets create programmatically the policy object which represents the
+above policy</p>
+			<source>
+				<pre>Policy p = new Policy(); // will give you the following element
+
+&lt;wsp:Policy&gt; &lt;/wsp:Policy&gt;
+
+XorCompositeAssertion x1 = new XorCompositeAssertion();
+p.addTerm(x1); //will give you XorCompositeAssertion as seen below
+
+&lt;wsp:Policy&gt;
+&lt;wsp:ExactlyOne&gt;....&lt;/wsp:ExactlyOne&gt;
+&lt;/wsp:Policy&gt;
+
+AndCompositeAssertion a1 = new AndCompositeAssertion();
+x1.addTerm(a1);// will give you AndCompositeAssertion as seen below
+
+&lt;wsp:Policy&gt;
+&lt;wsp:ExactlyOne&gt;
+&lt;wsp:All&gt;...&lt;/wsp:All&gt;
+&lt;/wsp:ExactlyOne&gt;
+&lt;/wsp:Policy&gt;
+
+QName name = new QName("Test", "http://tests.org/tests", "ns1");
+PrimitiveAssertion prim1 = new PrimitiveAssertion(name);
+prim1.setStrValue("MyTestAssertion");
+a1.addTerm(prim1); //will give you the <a href="#policy">complete policy</a>
+				</pre>
+			</source>
+			<a name="write"></a>
+			<h2>Write a policy object</h2>
+			<p>The following code will achieve this task</p>
+			<source>
+				<pre>String pathToOutFile = "/home/... /Policy2.xml";
+
+FileOutputStream fos = new FileOutputStream(pathToOutFile);
+
+PolicyWriter writer =
+PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
+
+writer.writePolicy(policy, fos );</pre>
+			</source>
+			<a name="normalize"></a>
+			<h2>Normalization</h2>
+			<p>The following code will achieve policy normalization</p>
+			<source>
+				<pre>Policy policy1 = reader.readPolicy(...);
+
+Policy normalized = (Policy) policy1.normalize();</pre>
+			</source>
+			<a name="merge"></a>
+			<h2>Merge policy objects</h2>
+			<p>The following code will merge two policy objects</p>
+			<source>
+				<pre>Policy policy1 = reader.readPolicy(...);
+
+Policy policy2 = reader.readPolicy(...);
+
+Policy merged = (Policy) policy1.merge(policy2);</pre>
+			</source>
+			<a name="intersect"></a>
+			<h2>Intersect policy objects</h2>
+			<p>The following code will intersect two policy objects</p>
+			<source>
+				<pre>Policy policy1 = reader.readPolicy(..)
+
+Policy policy2 = reader.readPolicy(..)
+
+Policy intersected = (Policy) policy1.intersect(policy2);</pre>
+			</source>
+		</section>
+	
+	</body>
+
+</document>