test_class.file: saml-core/src/test/java/org/keycloak/saml/processing/core/util/IDFedLSInputResolverTest.java
test_class.identifier: IDFedLSInputResolverTest
test_case.body: @Test
      public void testSchemaConstruction() throws Exception {
           
          // make sure there is no outgoing call to get schema online; 
          // all resources must have a result for our resolver
          SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  
          final IDFedLSInputResolver idFedLSInputResolver = new IDFedLSInputResolver();
          
          schemaFactory.setResourceResolver(new LSResourceResolver() {
              
              @Override
              public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
                  LSInput input = idFedLSInputResolver.resolveResource(type, namespaceURI, publicId, systemId, baseURI);
                  
                  if(input == null) {
                      throw new IllegalArgumentException("Unable to resolve " + systemId);
                  }
                  
                  InputStream is = input.getByteStream();
                  if(is == null) {
                      throw new IllegalArgumentException("Unable to resolve stream for " + systemId);
                  }
                  try {
                      is.close();
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
                  
                  return input;
              }
          });
  
          // check that all schema can be resolved
          for(String schema : SchemaManagerUtil.getSchemas()) {
              if(schema.contains("saml")) {
                  URL schemaFile = SecurityActions.loadResource(getClass(), schema);
                  schemaFactory.newSchema(schemaFile);
              }
          }
          
          JAXPValidationUtil.validator();
          
      }
test_case.class_method_signature: IDFedLSInputResolverTest.testSchemaConstruction()
test_case.full_signature: @Test public void testSchemaConstruction()
test_case.identifier: testSchemaConstruction
test_case.invocations: newInstance setResourceResolver resolveResource getByteStream close getSchemas contains loadResource getClass newSchema validator
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSchemaConstruction()
focal_class.declarator: logger = Logger.getLogger(IDFedLSInputResolver.class)
focal_class.modifier: protected static final
focal_class.original_string: protected static final Logger logger = Logger.getLogger(IDFedLSInputResolver.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: schemaLocationMap
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, String> schemaLocationMap;
focal_class.type: Map<String, String>
focal_class.var_name: schemaLocationMap
focal_class.file: saml-core/src/main/java/org/keycloak/saml/processing/core/util/IDFedLSInputResolver.java
focal_class.identifier: IDFedLSInputResolver
focal_class.interfaces: implements LSResourceResolver
focal_class.class_method_signature: IDFedLSInputResolver.schemas()
focal_class.full_signature: public static Collection<String> schemas()
focal_class.identifier: schemas
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> schemas()
focal_class.class_method_signature: IDFedLSInputResolver.resolveResource(String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)
focal_class.full_signature: public IDFedLSInput resolveResource(String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)
focal_class.identifier: resolveResource
focal_class.modifiers: public
focal_class.parameters: (String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)
focal_class.return: IDFedLSInput
focal_class.signature: IDFedLSInput resolveResource(String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)
focal_method.body: public IDFedLSInput resolveResource(String type, String namespaceURI, final String publicId, final String systemId, final String baseURI) {
          if (systemId == null) {
              throw new IllegalArgumentException("Expected systemId");
          }
  
          final String loc = schemaLocationMap.get(systemId);
          if (loc == null) {
              return null;
          }
  
          return new IDFedLSInput(baseURI, loc, publicId, systemId);
      }
focal_method.class_method_signature: IDFedLSInputResolver.resolveResource(String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)
focal_method.full_signature: public IDFedLSInput resolveResource(String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)
focal_method.identifier: resolveResource
focal_method.invocations: get
focal_method.modifiers: public
focal_method.parameters: (String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)
focal_method.return: IDFedLSInput
focal_method.signature: IDFedLSInput resolveResource(String type, String namespaceURI, final String publicId, final String systemId, final String baseURI)