net.geant.edugain.meta.query
Class MetaDataUnmarshaller

java.lang.Object
  extended by net.geant.edugain.meta.query.MetaDataUnmarshaller

public class MetaDataUnmarshaller
extends java.lang.Object

This class performs the unmarshalling of metadata xml documents retrieved from the MDS into openSAML2 objects and maps these to eduGAIN metadata objects.

Author:
Manuela Stanica

Field Summary
private static org.slf4j.Logger log
          Class logger.
protected static org.opensaml.xml.parse.BasicParserPool parser
          Parser manager used to parse XML.
protected static org.opensaml.xml.io.UnmarshallerFactory unmarshallerFactory
          XMLObject unmarshaller factory.
 
Constructor Summary
MetaDataUnmarshaller()
          Constructor
 
Method Summary
private  AAInterface mapToAAInterface(org.opensaml.saml2.metadata.AttributeAuthorityDescriptor aaDescr)
          Maps a SAML2 AttributeAuthorityDescriptor to an eduGAIN AAInterface object
 BEMetaData mapToBEMetaData(org.opensaml.saml2.metadata.EntityDescriptor entityDescr)
          Maps a SAML2 EntitiyDescriptor to an eduGAIN BEMetaData object.
 CAInterface mapToCAInterface(OnlineCADescriptorType caDescr)
          Maps an extended SAML2 RoleDescriptor object to an eduGAIN CAInterface object
 Contact mapToContact(org.opensaml.saml2.metadata.ContactPerson contactPers)
          Maps a SAML2 ContactPerson object to an eduGAIN Contact object
 FederationMetaData mapToFedMetaData(org.opensaml.saml2.metadata.EntitiesDescriptor entitiesDescr)
          Maps a SAML2 EntitiesDescriptor to an eduGAIN FederationMetaData object.
private  HLPattern mapToHLPattern(org.opensaml.xml.XMLObject xmlobj)
          Maps a SAML2 XMLObject to an eduGAIN HLPattern object.
 IDPInterface mapToIDPInterface(org.opensaml.saml2.metadata.IDPSSODescriptor idpDescr)
          Maps a SAML2 IDPSSODescriptor to an eduGAIN IDPInterface object
 Organisation mapToOrganisation(org.opensaml.saml2.metadata.Organization org)
          Maps a SAML2 Organization object to an eduGAIN Organisation object
 SPInterface mapToSPInterface(org.opensaml.saml2.metadata.SPSSODescriptor spDescr)
          Maps a SAML2 SPSSODescriptor to an eduGAIN SPInterface object
 org.opensaml.xml.XMLObject unmarshallMetaData(java.lang.StringBuffer xmlsb)
          Unmarhshalls the string representation of an OpenSAML2 metadata document to the DOM representaion of the document root
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

protected static org.opensaml.xml.parse.BasicParserPool parser
Parser manager used to parse XML.


unmarshallerFactory

protected static org.opensaml.xml.io.UnmarshallerFactory unmarshallerFactory
XMLObject unmarshaller factory.


log

private static org.slf4j.Logger log
Class logger.

Constructor Detail

MetaDataUnmarshaller

public MetaDataUnmarshaller()
Constructor

Method Detail

unmarshallMetaData

public org.opensaml.xml.XMLObject unmarshallMetaData(java.lang.StringBuffer xmlsb)
                                              throws MetaQueryException
Unmarhshalls the string representation of an OpenSAML2 metadata document to the DOM representaion of the document root

Parameters:
xmlsb - the string containing the metadata document
Returns:
the root DOM
Throws:
MetaQueryException

mapToFedMetaData

public FederationMetaData mapToFedMetaData(org.opensaml.saml2.metadata.EntitiesDescriptor entitiesDescr)
                                    throws MetaQueryException
Maps a SAML2 EntitiesDescriptor to an eduGAIN FederationMetaData object.

Parameters:
entitiesDescr - the SAML2 root element
Returns:
the associated FederationMetaData object
Throws:
eduGAINMetaQueryException
MetaQueryException

mapToBEMetaData

public BEMetaData mapToBEMetaData(org.opensaml.saml2.metadata.EntityDescriptor entityDescr)
                           throws MetaQueryException
Maps a SAML2 EntitiyDescriptor to an eduGAIN BEMetaData object.

Parameters:
entityDescr - the SAML2 root element
Returns:
the associated BeMetaData object
Throws:
eduGAINMetaQueryException
MetaQueryException

mapToIDPInterface

public IDPInterface mapToIDPInterface(org.opensaml.saml2.metadata.IDPSSODescriptor idpDescr)
Maps a SAML2 IDPSSODescriptor to an eduGAIN IDPInterface object

Parameters:
idpDescr - the SAML2 IDPSSODescriptor element
Returns:
the associated eduGAIN IDPInterface object

mapToAAInterface

private AAInterface mapToAAInterface(org.opensaml.saml2.metadata.AttributeAuthorityDescriptor aaDescr)
Maps a SAML2 AttributeAuthorityDescriptor to an eduGAIN AAInterface object

Parameters:
aaDescr - the SAML2 AttributeAuthorityDescriptor element
Returns:
the associated eduGAIN AAInterface object

mapToSPInterface

public SPInterface mapToSPInterface(org.opensaml.saml2.metadata.SPSSODescriptor spDescr)
Maps a SAML2 SPSSODescriptor to an eduGAIN SPInterface object

Parameters:
spDescr - the SAML2 SPSSODescriptor element
Returns:
the associated eduGAIN SPInterface object

mapToCAInterface

public CAInterface mapToCAInterface(OnlineCADescriptorType caDescr)
Maps an extended SAML2 RoleDescriptor object to an eduGAIN CAInterface object

Parameters:
caDescr - the OnlineCADescriptorType element (SAML2 extension)
Returns:
the associated eduGAIN CAInterface object

mapToOrganisation

public Organisation mapToOrganisation(org.opensaml.saml2.metadata.Organization org)
Maps a SAML2 Organization object to an eduGAIN Organisation object

Parameters:
org - the SAML2 Organization element
Returns:
the associated eduGAIN Organisation object

mapToHLPattern

private HLPattern mapToHLPattern(org.opensaml.xml.XMLObject xmlobj)
                          throws MetaQueryException
Maps a SAML2 XMLObject to an eduGAIN HLPattern object.

Parameters:
xmlobj - the unrecognized object that holds data for HLPattern
Returns:
the mapped HLPattern object
Throws:
MetaQueryException - when a needed attribute is missing in the XMLObject

mapToContact

public Contact mapToContact(org.opensaml.saml2.metadata.ContactPerson contactPers)
Maps a SAML2 ContactPerson object to an eduGAIN Contact object

Parameters:
contactPers - the SAML2 ContactPerson element
Returns:
the associated eduGAIN Contact object