|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openxri.xml.XRD
public class XRD
This class describes the XRD XML element used for XRI Authority resolution.
Field Summary | |
---|---|
static java.lang.String |
CURRENT_VERSION
|
Constructor Summary | |
---|---|
XRD()
Constructs an empty XRD |
|
XRD(org.w3c.dom.Element oElem,
boolean bKeepDOM)
This method creates the XRD from DOM. |
Method Summary | |
---|---|
void |
addCanonicalID(CanonicalID canonicalId)
Deprecated. |
void |
addEquivID(EquivID equivID)
|
void |
addLocalID(LocalID localId)
|
void |
addRedirect(Redirect redirect)
|
void |
addRef(Ref ref)
|
void |
addService(Service service)
Adds a service element |
void |
clearDOM()
This method resets any DOM state in the XRI Descriptor. |
java.lang.Object |
clone()
Clone this object |
void |
fromDOM(org.w3c.dom.Element oElem)
This method populates the object from DOM. |
void |
genXmlID()
Generates a new id attribute and sets it |
CanonicalEquivID |
getCanonicalEquivID()
Gets the CanonicalEquivID |
CanonicalID |
getCanonicalID()
Gets the CanonicalID |
CanonicalID |
getCanonicalidAt(int n)
Deprecated. |
org.w3c.dom.Element |
getDOM()
This method returns DOM stored with this object. |
EquivID |
getEquivIDAt(int n)
|
java.util.Date |
getExpires()
Returns the expires element value |
java.lang.String |
getExtension()
|
LocalID |
getLocalIDAt(int n)
|
int |
getNumCanonicalids()
Deprecated. |
int |
getNumEquivIDs()
|
int |
getNumLocalIDs()
|
int |
getNumRedirects()
|
int |
getNumRefs()
|
int |
getNumServices()
Returns the number of services elements |
int |
getNumTypes()
Returns the number of services elements |
java.util.Vector |
getOtherTagValues(java.lang.String sTag)
Returns unspecified simple elements in the Service by Tag |
java.util.ArrayList |
getPrioritizedRedirects()
|
java.util.ArrayList |
getPrioritizedRefs()
|
java.util.ArrayList |
getPrioritizedServices()
Returns a vector of all the service elements |
java.lang.String |
getProviderID()
Returns the provider id element value |
java.lang.String |
getQuery()
Returns the query element value |
Redirect |
getRedirectAt(int n)
|
java.util.Vector |
getRedirects()
|
Ref |
getRefAt(int n)
|
java.util.Vector |
getRefs()
|
Assertion |
getSAMLAssertion()
Returns the SAML assertion |
PrioritizedList |
getSelectedServices()
|
ServerStatus |
getServerStatus()
|
java.lang.String |
getServerStatusCode()
|
Service |
getServiceAt(int n)
Returns the service element at the specified index |
java.util.Vector |
getServices()
|
Status |
getStatus()
|
java.lang.String |
getStatusCode()
|
XRDType |
getTypeAt(int n)
Returns the Type element at the specified index |
java.lang.String |
getXmlID()
Returns the id attribute |
boolean |
isValid()
Checks if this XRD is valid based on the optional Expires element |
static XRD |
parseXRD(java.lang.String xmlStr,
boolean bKeepDOM)
Constructs XRD from a String |
void |
reset()
This method resets the state of the XRD. |
java.lang.String |
serializeDOM(boolean bIndent,
boolean bOmitXMLDeclaration)
Serializes the DOM associated with this XRD. |
void |
setCanonicalEquivID(CanonicalEquivID ceid)
Sets the CanonicalEquivID |
void |
setCanonicalID(CanonicalID cid)
Sets the CanonicalID |
void |
setDOM(org.w3c.dom.Element oElem)
This method will import an XRD from DOM, and hold on to it, as retrievable by getDOM. |
void |
setEquivIDs(java.util.Collection col)
|
void |
setExpires(java.util.Date d)
Sets the expires element value |
void |
setExtension(java.lang.String extension)
|
boolean |
setOtherTagValues(java.lang.String sTag,
java.lang.String sTagValue)
Stores simple elements in the Service by Tag Here we are converting the String object that is being passed into XML Element before storing it into moOtherChildrenVectorsMap Vector. |
void |
setProviderID(java.lang.String sVal)
Sets the provider id element value |
void |
setQuery(java.lang.String sVal)
Sets the query element value |
void |
setRedirects(java.util.Collection col)
|
void |
setRefs(java.util.Collection col)
|
void |
setSAMLAssertion(Assertion oSAMLAssertion)
Sets the SAML assertion |
void |
setSelectedServices(java.util.Collection svcs)
|
void |
setServerStatus(ServerStatus serverStatus)
Sets the ServerStatus |
void |
setServices(java.util.Collection col)
|
void |
setStatus(Status status)
|
void |
setXmlID(java.lang.String sVal)
Sets the id attribute |
void |
sign(java.security.PrivateKey oKey)
This will sign the XRD using the provided Private Key. |
org.w3c.dom.Element |
toDOM(org.w3c.dom.Document doc)
This method will make DOM using the specified document. |
org.w3c.dom.Element |
toDOM(org.w3c.dom.Document doc,
boolean wantFiltered)
This method create a DOM using the specified document. |
java.lang.String |
toResultString()
Returns this XRD with only the selected services (filtered and sorted) as XML. |
java.lang.String |
toString()
Returns object as a formatted XML string. |
void |
verifySignature(java.security.PublicKey oPubKey)
This will verify the XRD against the given public key. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CURRENT_VERSION
Constructor Detail |
---|
public XRD()
public XRD(org.w3c.dom.Element oElem, boolean bKeepDOM) throws java.net.URISyntaxException, java.text.ParseException
oElem
- - The DOM to create the object frombKeepDOM
- - If true, will keep a copy of the DOM with the object
java.net.URISyntaxException
java.text.ParseException
Method Detail |
---|
public void reset()
public java.lang.Object clone()
clone
in class java.lang.Object
public static XRD parseXRD(java.lang.String xmlStr, boolean bKeepDOM) throws java.net.URISyntaxException, java.text.ParseException
java.net.URISyntaxException
java.text.ParseException
public void fromDOM(org.w3c.dom.Element oElem) throws java.net.URISyntaxException, java.text.ParseException
java.net.URISyntaxException
java.text.ParseException
public java.lang.String serializeDOM(boolean bIndent, boolean bOmitXMLDeclaration)
bIndent
- - whether or not to indent the XML. If true will break
signature.bOmitXMLDeclaration
- - whether or not to omit the XML preamblepublic java.lang.String toString()
toString
in class java.lang.Object
sTab
- - The characters to prepend before each new linepublic java.lang.String toResultString()
public org.w3c.dom.Element getDOM()
public void setDOM(org.w3c.dom.Element oElem) throws java.net.URISyntaxException, java.text.ParseException
java.net.URISyntaxException
java.text.ParseException
public void clearDOM()
public org.w3c.dom.Element toDOM(org.w3c.dom.Document doc, boolean wantFiltered)
wantFiltered
argument is true, the returned
document will have all prioritized elements sorted and
only selected services are returned.
doc
- - The document to use for generating DOMwantFiltered
- - Get sorted+filtered Refs and Servicespublic org.w3c.dom.Element toDOM(org.w3c.dom.Document doc)
doc
- - The document to use for generating DOMpublic boolean setOtherTagValues(java.lang.String sTag, java.lang.String sTagValue)
sTag
- - The tag name. Needs to be the Fully Qualified Name of the XML Element.
For Example "usrns1:info1" or "info1" (If not using NameSpaces)sTagValue
- - The tag values. Needs to be valid XML String like --
"public java.util.Vector getOtherTagValues(java.lang.String sTag)
sTag
- - The tag name to get values for
public void setExtension(java.lang.String extension) throws java.net.URISyntaxException, java.text.ParseException
java.net.URISyntaxException
java.text.ParseException
public java.lang.String getExtension()
public java.lang.String getXmlID()
public void setXmlID(java.lang.String sVal)
public void genXmlID()
public java.lang.String getProviderID()
public void setProviderID(java.lang.String sVal)
public java.lang.String getQuery()
public void setQuery(java.lang.String sVal)
public java.util.Date getExpires()
public void setExpires(java.util.Date d)
public int getNumLocalIDs()
public LocalID getLocalIDAt(int n)
public void addLocalID(LocalID localId)
public int getNumEquivIDs()
public EquivID getEquivIDAt(int n)
public void addEquivID(EquivID equivID)
public int getNumCanonicalids()
public CanonicalID getCanonicalidAt(int n)
public void addCanonicalID(CanonicalID canonicalId)
public void setCanonicalID(CanonicalID cid)
public CanonicalID getCanonicalID()
public void setCanonicalEquivID(CanonicalEquivID ceid)
public CanonicalEquivID getCanonicalEquivID()
public java.util.Vector getRefs()
public Ref getRefAt(int n)
public int getNumRefs()
public void addRef(Ref ref)
public java.util.ArrayList getPrioritizedRefs()
public java.util.Vector getRedirects()
public Redirect getRedirectAt(int n)
public int getNumRedirects()
public void addRedirect(Redirect redirect)
public java.util.ArrayList getPrioritizedRedirects()
public int getNumServices()
public Service getServiceAt(int n)
public java.util.ArrayList getPrioritizedServices()
public void addService(Service service)
public int getNumTypes()
public XRDType getTypeAt(int n)
public Assertion getSAMLAssertion()
public void setSAMLAssertion(Assertion oSAMLAssertion)
public void sign(java.security.PrivateKey oKey) throws org.apache.xml.security.exceptions.XMLSecurityException
oKey
- - The private key to sign the descriptor with.
org.apache.xml.security.exceptions.XMLSecurityException
public void verifySignature(java.security.PublicKey oPubKey) throws org.apache.xml.security.exceptions.XMLSecurityException
oPubKey
-
org.apache.xml.security.exceptions.XMLSecurityException
public boolean isValid()
public void setStatus(Status status)
public Status getStatus()
public java.lang.String getServerStatusCode()
public void setServerStatus(ServerStatus serverStatus)
serverStatus
- public ServerStatus getServerStatus()
public java.lang.String getStatusCode()
public java.util.Vector getServices()
public void setServices(java.util.Collection col)
public void setSelectedServices(java.util.Collection svcs)
public void setEquivIDs(java.util.Collection col)
public void setRefs(java.util.Collection col)
public void setRedirects(java.util.Collection col)
public PrioritizedList getSelectedServices()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |