1 26 27 package com.bull.eclipse.jonas.utils.xml.desc; 28 29 30 import java.net.URL ; 31 import java.util.ArrayList ; 32 import java.util.List ; 33 34 35 36 40 public abstract class CommonsSchemas implements Schemas { 41 42 43 46 private static final String [] DEFAULT_SCHEMAS = new String [] { 47 "schema/j2ee_1_4.xsd", 48 "schema/j2ee_web_services_client_1_1.xsd", 49 "schema/xml.xsd", 50 "schema/jonas_j2ee_4_0.xsd" 51 }; 52 53 54 57 private static ArrayList localSchemas = null; 58 59 60 63 public CommonsSchemas() { 64 localSchemas = new ArrayList (); 65 addSchemas(DEFAULT_SCHEMAS); 66 } 67 68 72 public List getlocalSchemas() { 73 return localSchemas; 74 } 75 76 77 82 protected static void addSchemas(String [] schemas) throws IllegalStateException { 83 URL url = null; 84 for (int i = 0; i < schemas.length; i++) { 85 url = CommonsSchemas.class.getResource("/" + schemas[i]); 86 if (!(url == null)) { 87 localSchemas.add(url.toString()); } 90 } 92 } 93 94 95 96 } 97 | Popular Tags |