当前位置: 首页>>代码示例>>Java>>正文


Java UMLAttributeMetadata类代码示例

本文整理汇总了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);
   }
}
 
开发者ID:NCIP,项目名称:cadsr-uml-model-browser,代码行数:21,代码来源:XmlDownloadAction.java

示例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");
    }
 
开发者ID:NCIP,项目名称:cadsr-uml-model-browser,代码行数:26,代码来源:UMLSearchAction.java

示例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");
    }
}
 
开发者ID:NCIP,项目名称:cadsr-uml-model-browser,代码行数:14,代码来源:XmlDownloadAction.java

示例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;
}
 
开发者ID:NCIP,项目名称:cadsr-uml-model-browser,代码行数:11,代码来源:UMLBrowserQueryServiceImpl.java

示例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();
    	}
    }
}
 
开发者ID:NCIP,项目名称:cadsr-uml-model-browser,代码行数:48,代码来源:CaDSRQueryServiceImpl.java

示例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;
 
开发者ID:NCIP,项目名称:cadsr-uml-model-browser,代码行数:8,代码来源:CaDSRQueryService.java

示例7: findUmlAttributes

import gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata; //导入依赖的package包/类
public List findUmlAttributes(UMLAttributeMetadata umlAttribute); 
开发者ID:NCIP,项目名称:cadsr-uml-model-browser,代码行数:2,代码来源:UMLBrowserQueryService.java


注:本文中的gov.nih.nci.cadsr.umlproject.domain.UMLAttributeMetadata类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。