📄 utils.java
字号:
/*
* Created on 12-Apr-2005
*
* TODO All
*/
package ke.defaultimpl.utils;
import java.io.IOException;
import org.xml.sax.SAXException;
import ke.defaultimpl.utils.xml.parsing.IncorrectSchemaException;
import ke.defaultimpl.utils.xml.parsing.SchemaBean;
import ke.defaultimpl.utils.xml.parsing.SchemaParserUtils;
/**
* @author James Cunningham
*
* @version
*
* TODO All
*/
public class Utils
{
/**
* @return
*/
public static String generateUniqueId() {
return new RandomGUID().toString();
}
/**
* @param schemaFile
* @return
* @throws UtilsException
*/
public static SchemaBean getAttributesFromSchema(String schemaFile) throws UtilsException{
try {
return SchemaParserUtils.getAttributesFromSchema(schemaFile);
} catch (SAXException se) {
throw new UtilsException("Error parsing schema file: " + se);
} catch (IncorrectSchemaException ise) {
throw new UtilsException("Error: Incorrect schema: " + ise);
} catch (IOException ioe) {
throw new UtilsException("Error reading file: " + ioe);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -