org.systinet.wasp.policy.assertion
Class SpecVersionAssertion

java.lang.Object
  extended byorg.systinet.wasp.policy.PolicyElement
      extended byorg.systinet.wasp.policy.PolicyAssertion
          extended byorg.systinet.wasp.policy.assertion.SpecVersionAssertion

public class SpecVersionAssertion
extends PolicyAssertion

This assertion specifies a version of a particular specification. XML fragment may look like: <wsp:SpecVersion wsp:Usage="..." URI="..." wsp:Preference="..."? > </wsp:SpecVersion> where the URI attribute represents the URI of specification.

Since:
5.5
Component:
Core

Constructor Summary
SpecVersionAssertion(javax.xml.transform.Source content)
          Loads this assertion from given XML source.
SpecVersionAssertion(java.lang.String uri, PolicyUsage usage)
          Creates this assertion with given URI.
 
Method Summary
 boolean equals(java.lang.Object o)
          Assertions are equal when URI is equal
 javax.xml.transform.Source getContent()
          Gets XML content of this assertion.
 java.lang.String getURI()
          Get URI of this assertion
 int hashCode()
          Hashcode of URI
 
Methods inherited from class org.systinet.wasp.policy.PolicyElement
getParentElement, getPreference, getUsage, readStandardAttributes, setParentElement, setPreference, setUsage, writeStandardAttributes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecVersionAssertion

public SpecVersionAssertion(javax.xml.transform.Source content)
                     throws PolicyException
Loads this assertion from given XML source.

Parameters:
content - XML source
Throws:
PolicyException - when an error occurs during the assertion loading

SpecVersionAssertion

public SpecVersionAssertion(java.lang.String uri,
                            PolicyUsage usage)
Creates this assertion with given URI.

Parameters:
uri - URI of the version
usage - PolicyUsage
Method Detail

getURI

public java.lang.String getURI()
Get URI of this assertion

Returns:

getContent

public javax.xml.transform.Source getContent()
                                      throws PolicyException
Gets XML content of this assertion.

Specified by:
getContent in class PolicyAssertion
Returns:
the XML content source
Throws:
PolicyException - when an error occurs

equals

public boolean equals(java.lang.Object o)
Assertions are equal when URI is equal

Parameters:
o -
Returns:

hashCode

public int hashCode()
Hashcode of URI

Returns: