Seems a bit odd to have the method decide if the parameter is a schema or a URI. I would rather have an explicit method - schemaFromURI can take a String or a URI, or schemaFromURIString if you want to be explicit.