utils.java
来自「一个完整的XACML工程,学习XACML技术的好例子!」· Java 代码 · 共 50 行
JAVA
50 行
/*
* 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 + =
减小字号Ctrl + -
显示快捷键?