// Path: src/main/java/net/nordu/mdx/MetadataIOException.java
// public class MetadataIOException extends MetadataException {
// 
// 	private static final long serialVersionUID = -4323006006007227142L;
// 	
// 	public MetadataIOException() { super(); }
// 	public MetadataIOException(String msg) { super(msg); }
// 	public MetadataIOException(Exception inner) { super(inner); }
// 	
// }


import java.io.ByteArrayInputStream;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import net.nordu.mdx.MetadataIOException;
import org.apache.xml.security.exceptions.Base64DecodingException;
import org.apache.xml.security.utils.Base64;
import org.apache.xmlbeans.GDuration;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
import org.oasis.saml.assertion.AssertionType;
import org.oasis.saml.assertion.AttributeStatementType;
import org.oasis.saml.assertion.AttributeType;
import org.oasis.saml.metadata.AdditionalMetadataLocationType;
import org.oasis.saml.metadata.EntitiesDescriptorDocument;
import org.oasis.saml.metadata.EntitiesDescriptorType;
import org.oasis.saml.metadata.EntityDescriptorType;
import org.oasis.saml.metadata.RoleDescriptorType;
import org.oasis.saml.metadata.attribute.EntityAttributesDocument;
import org.oasis.saml.metadata.attribute.EntityAttributesType;
import org.w3c.dom.NodeList;
package net.nordu.mdx.utils;




public class MetadataUtils {

	private static final String NSDECL = "declare namespace ds='http://www.w3.org/2000/09/xmldsig#';"+
		"declare namespace md='urn:oasis:names:tc:SAML:2.0:metadata';"+
		"declare namespace shibmd='urn:mace:shibboleth:metadata:1.0';";
	
// Path: src/main/java/net/nordu/mdx/MetadataIOException.java
// public class MetadataIOException extends MetadataException {
// 
// 	private static final long serialVersionUID = -4323006006007227142L;
// 	
// 	public MetadataIOException() { super(); }
// 	public MetadataIOException(String msg) { super(msg); }
// 	public MetadataIOException(Exception inner) { super(inner); }
// 	
// }


// Path: src/main/java/net/nordu/mdx/utils/MetadataUtils.java
import java.io.ByteArrayInputStream;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import net.nordu.mdx.MetadataIOException;
import org.apache.xml.security.exceptions.Base64DecodingException;
import org.apache.xml.security.utils.Base64;
import org.apache.xmlbeans.GDuration;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
import org.oasis.saml.assertion.AssertionType;
import org.oasis.saml.assertion.AttributeStatementType;
import org.oasis.saml.assertion.AttributeType;
import org.oasis.saml.metadata.AdditionalMetadataLocationType;
import org.oasis.saml.metadata.EntitiesDescriptorDocument;
import org.oasis.saml.metadata.EntitiesDescriptorType;
import org.oasis.saml.metadata.EntityDescriptorType;
import org.oasis.saml.metadata.RoleDescriptorType;
import org.oasis.saml.metadata.attribute.EntityAttributesDocument;
import org.oasis.saml.metadata.attribute.EntityAttributesType;
import org.w3c.dom.NodeList;

package net.nordu.mdx.utils;




public class MetadataUtils {

	private static final String NSDECL = "declare namespace ds='http://www.w3.org/2000/09/xmldsig#';"+
		"declare namespace md='urn:oasis:names:tc:SAML:2.0:metadata';"+
		"declare namespace shibmd='urn:mace:shibboleth:metadata:1.0';";
	
	public static EntityAttributesType findAttributes(EntityDescriptorType entity) throws MetadataIOException {