本文整理汇总了Java中gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata类的典型用法代码示例。如果您正苦于以下问题:Java UMLAttributeMetadata类的具体用法?Java UMLAttributeMetadata怎么用?Java UMLAttributeMetadata使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UMLAttributeMetadata类属于gov.nih.nci.cadsr.umlproject.domain包,在下文中一共展示了UMLAttributeMetadata类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: xmlDownload
import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
public ActionForward xmlDownload(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
try {
Collection<UMLAttributeMetadata> attributes = (Collection<UMLAttributeMetadata>)getSessionObject(request,UMLBrowserFormConstants.CLASS_ATTRIBUTES);
CaDSRQueryService caDSRQueryService = getAppServiceLocator().findCaDSRQueryService();
String xmlString = caDSRQueryService.getXMLForAttributes(attributes);
response.setContentType("application/octet-stream");
String fileName="DataElementDownload_"+sdf.format(new Date())+".xml";
response.setHeader("Content-disposition", "attachment;filename="+fileName);
response.getWriter().write(xmlString);
return null;
}
catch(Exception e) {
log.error("Error getting data element xml for attributes.",e);
throw new ServletException("Error getting data element xml for attributes.",e);
}
}
示例2: attributeSearch
import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
public ActionForward attributeSearch(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
// removeSessionObject(request, UMLBrowserFormConstants.CLASS_SEARCH_RESULTS);
DynaActionForm dynaForm = (DynaActionForm) form;
Collection<UMLAttributeMetadata> umlAttributes= new ArrayList();
UMLBrowserQueryService queryService = getAppServiceLocator().findQuerySerivce();
UMLAttributeMetadata umlAtt = new UMLAttributeMetadata();
String attName = ((String) dynaForm.get("attributeName")).trim();
if (attName !=null && attName.length()>0)
umlAtt.setName(attName.replace('*','%') );
UMLClassMetadata umlClass = this.populateClassFromForm(request,dynaForm);
if (umlClass != null)
umlAtt.setUMLClassMetadata(umlClass);
SearchPreferences searchPreferences = (SearchPreferences)getSessionObject(request, UMLBrowserFormConstants.SEARCH_PREFERENCES);
umlAttributes = queryService.findUmlAttributes(umlAtt, searchPreferences);
setupSessionForAttributeResults(umlAttributes, request);
return mapping.findForward("showAttributes");
}
示例3: xmlDownloadPopup
import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
public ActionForward xmlDownloadPopup(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
Collection<UMLAttributeMetadata> attributes = (Collection<UMLAttributeMetadata>)getSessionObject(request,UMLBrowserFormConstants.CLASS_ATTRIBUTES);
if (attributes.size()>0){
return mapping.findForward("success");
}
else {
return mapping.findForward("nodata");
}
}
示例4: findUmlAttributes
import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
public List findUmlAttributes(UMLAttributeMetadata umlAttribute){
List resultList =null;
try {
resultList = getCaCoreAPIService().search(UMLAttributeMetadata.class, umlAttribute);
} catch (Exception e) {
e.printStackTrace();
}
return resultList;
}
示例5: getXMLForAttributes
import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
/**
* Queries the XML for the DataElements associated with the attributes.
* @param attributes
* @return CDE XML for data elements associated with the attributes
*/
public String getXMLForAttributes(Collection<UMLAttributeMetadata> attributes) throws Exception {
XMLGeneratorBean cdeXmlGenerator = new XMLGeneratorBean();
Connection conn = null;
Connection oracleConn = null;
try {
conn = dataSource.getConnection();
//Get the OracleConnection
oracleConn = conn.getMetaData().getConnection();
if (!(oracleConn instanceof oracle.jdbc.driver.OracleConnection)){
log.error("DataElement XML download can work with OracleConnection only.");
throw new Exception("DataElement XML download can work with OracleConnection only.");
}
StringBuffer where = new StringBuffer(attributes.size()*33);
where.append("DE_IDSEQ IN ('-1'");
for(UMLAttributeMetadata attribute:attributes){
DataElement de = attribute.getDataElement();
where.append(",'"+de.getId()+"'");
}
where.append(")");
cdeXmlGenerator.setConnection(oracleConn);
cdeXmlGenerator.setQuery(cdeXMLQuery);
cdeXmlGenerator.setWhereClause(where.toString());
cdeXmlGenerator.setRowsetTag(rowSetTag);
cdeXmlGenerator.setRowTag(rowTag);
cdeXmlGenerator.displayNulls(true);
String xmlString = cdeXmlGenerator.getXMLString();
return xmlString;
}
catch (Exception e) {
log.error("Error getting CDE Xml.",e);
throw e;
}finally{
cdeXmlGenerator.closeResources();
if(conn != null){
conn.close();
}
if(oracleConn != null){
oracleConn.close();
}
}
}
示例6: getXMLForAttributes
import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
/**
* Queries XML for the DataElements associated with the attributes given
* @param attributes
* @return XML for DataElements associated with the attributes.
* @throws Exception
*/
public String getXMLForAttributes(Collection<UMLAttributeMetadata> attributes) throws Exception;
示例7: findUmlAttributes
import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
public List findUmlAttributes(UMLAttributeMetadata umlAttribute);