env.staticSlot(EnvFactory.SCHEMA_DIR),\r
EnvFactory.DEFAULT_SCHEMA_DIR);\r
File dir = new File(schemaDir);\r
- if(!dir.exists())throw new APIException("Schema Directory " + schemaDir + " does not exist. You can set this with " + EnvFactory.SCHEMA_DIR + " property");\r
+ if (!dir.exists())throw new APIException("Schema Directory " + schemaDir + " does not exist. You can set this with " + EnvFactory.SCHEMA_DIR + " property");\r
FileInputStream[] fis = new FileInputStream[filenames.length];\r
Source[] sources = new Source[filenames.length];\r
File f; \r
- for(int i=0; i<filenames.length; ++i) {\r
- if(!(f=new File(schemaDir + File.separatorChar + filenames[i])).exists()) {\r
- if(!f.exists()) throw new APIException("Cannot find " + f.getName() + " for schema validation");\r
+ for (int i=0; i<filenames.length; ++i) {\r
+ if (!(f=new File(schemaDir + File.separatorChar + filenames[i])).exists()) {\r
+ if (!f.exists()) throw new APIException("Cannot find " + f.getName() + " for schema validation");\r
}\r
try {\r
fis[i]=new FileInputStream(f);\r
} catch (SAXException e) {\r
throw new APIException(e);\r
} finally {\r
- for(FileInputStream d : fis) {\r
+ for (FileInputStream d : fis) {\r
try {\r
d.close();\r
} catch (IOException e) {\r
public static QName getQName(Class<?> clss) throws APIException {\r
// Obtain the Necessary info for QName from Requirement\r
XmlRootElement xre = clss.getAnnotation(XmlRootElement.class);\r
- if(xre==null)throw new APIException(clss.getName() + " does not have an XmlRootElement annotation");\r
+ if (xre==null)throw new APIException(clss.getName() + " does not have an XmlRootElement annotation");\r
Package pkg = clss.getPackage();\r
XmlSchema xs = pkg.getAnnotation(XmlSchema.class);\r
- if(xs==null) throw new APIException(clss.getName() + " package-info does not have an XmlSchema annotation");\r
+ if (xs==null) throw new APIException(clss.getName() + " package-info does not have an XmlSchema annotation");\r
return new QName(xs.namespace(),xre.name());\r
}\r
\r
// */\r
// public Character objectify(Env env, String input) throws APIException {\r
// int length = input.length();\r
-// if(length<1 || length>1) {\r
+// if (length<1 || length>1) {\r
// throw new APIException("String [" + input + "] does not represent a single Character");\r
// }\r
// return input.charAt(0);\r