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