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


Java Project.getID方法代码示例

本文整理汇总了Java中net.sf.memoranda.Project.getID方法的典型用法代码示例。如果您正苦于以下问题:Java Project.getID方法的具体用法?Java Project.getID怎么用?Java Project.getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.memoranda.Project的用法示例。


在下文中一共展示了Project.getID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fillPSPFields

import net.sf.memoranda.Project; //导入方法依赖的package包/类
private void fillPSPFields(Project prj, ProjectDialog dlg) {
	String getPrjLOCcount = "";
	ProjectLOCHandler projectLOCHandler = new ProjectLOCHandler(prj.getID());
	dlg.showPSPAttrs();
	getPrjLOCcount = new ProjectLOCHandler(prj.getID()).getProjectLOC();
	
	dlg.estimatedTime.setText(((PSPProject)prj).getPSPAttr("estimatedTime"));
	dlg.estimatedSize.setText(Local.getString(((PSPProject)prj).getPSPAttr("estimatedSize")));
	dlg.totalTime.setText(Local.getString(((PSPProject) prj).getPSPAttr("totalTime")));
	dlg.totalDefectsInjected.setText(Integer.toString(CurrentProject.getTaskList().calculateTotalInjectedDefects()));
	dlg.totalDefectsRemoved.setText(Local.getString(((PSPProject) prj).getPSPAttr("totalDefectsRemoved")));	        
	dlg.totalLocCountField.setText(projectLOCHandler.getProjectLOC());
	dlg.defectLocRatioField.setText(Double.toString(CurrentProject.getTaskList().calculateInjecteDefectsToLocRatio()));
	
	// dlg.programSize.setText(Local.getString(((PSPProject) prj).getPSPAttr("programSize")));
	
	Util.debug("LOC set up to UI : "+ getPrjLOCcount);
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:19,代码来源:ProjectsPanel.java

示例2: openNoteList

import net.sf.memoranda.Project; //导入方法依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#openNoteList(net.sf.memoranda.Project)
 */
public NoteList openNoteList(Project prj) {
    String fn = JN_DOCPATH + prj.getID() + File.separator + ".notes";
    if (documentExists(fn)) {
        /*DEBUG*/
        System.out.println(
            "[DEBUG] Open note list: "
                + JN_DOCPATH
                + prj.getID()
                + File.separator
                + ".notes");
        return new NoteListImpl(openDocument(fn), prj);
    }
    else {
        /*DEBUG*/
        System.out.println("[DEBUG] New note list created");
        return new NoteListImpl(prj);
    }
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:22,代码来源:FileStorage.java

示例3: createProjectStorage

import net.sf.memoranda.Project; //导入方法依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#createProjectStorage(net.sf.memoranda.Project)
 */
public void createProjectStorage(Project prj) {
    /*DEBUG*/
    System.out.println(
        "[DEBUG] Create project dir: " + JN_DOCPATH + prj.getID());
    File dir = new File(JN_DOCPATH + prj.getID());
    dir.mkdirs();
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:11,代码来源:FileStorage.java

示例4: openTaskList

import net.sf.memoranda.Project; //导入方法依赖的package包/类
public TaskList openTaskList(Project prj) {
    String fn = JN_DOCPATH + prj.getID() + File.separator + ".tasklist";

    if (documentExists(fn)) {
        /*DEBUG*/
        System.out.println(
            "[DEBUG] Open task list: "
                + JN_DOCPATH
                + prj.getID()
                + File.separator
                + ".tasklist");
        
        Document tasklistDoc = openDocument(fn);
        /*DocType tasklistDoctype = tasklistDoc.getDocType();
        String publicId = null;
        if (tasklistDoctype != null) {
            publicId = tasklistDoctype.getPublicID();
        }
        boolean upgradeOccurred = TaskListVersioning.upgradeTaskList(publicId);
        if (upgradeOccurred) {
            // reload from new file
            tasklistDoc = openDocument(fn);
        }*/
        return new TaskListImpl(tasklistDoc, prj);   
    }
    else {
        /*DEBUG*/
        System.out.println("[DEBUG] New task list created");
        return new TaskListImpl(prj);
    }
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:32,代码来源:FileStorage.java

示例5: openResourcesList

import net.sf.memoranda.Project; //导入方法依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#openResourcesList(net.sf.memoranda.Project)
 */
public ResourcesList openResourcesList(Project prj) {
    String fn = JN_DOCPATH + prj.getID() + File.separator + ".resources";
    if (documentExists(fn)) {
        /*DEBUG*/
        System.out.println("[DEBUG] Open resources list: " + fn);
        return new ResourcesListImpl(openDocument(fn), prj);
    }
    else {
        /*DEBUG*/
        System.out.println("[DEBUG] New note list created");
        return new ResourcesListImpl(prj);
    }
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:17,代码来源:FileStorage.java

示例6: upgradeTaskList

import net.sf.memoranda.Project; //导入方法依赖的package包/类
public static boolean upgradeTaskList(String publicId) {
    int vid = getIndexOfVersion(publicId);
    
    if (vid == (VERSIONS.length - 1)) {
        Util.debug("Version " + publicId + " is the latest version, skipping upgrade");
        return false;
    }
    else {
        // get all projects
        Vector projects = ProjectManager.getAllProjects();
        String[] projectIds = new String[projects.size()];
        int c = 0;
        for (Iterator iter = projects.iterator(); iter.hasNext();) {
            Project prj = (Project) iter.next();
            projectIds[c++] = prj.getID();
        }
        
        // keep upgrading until it's the current version
        while (vid < (VERSIONS.length - 1)) {
            if(vid == 0) {
                upgrade1_1d1(projectIds);
            }            
            vid++;
        }
        return true;
    }
}
 
开发者ID:ser316asu,项目名称:Wilmersdorf_SER316,代码行数:28,代码来源:TaskListVersioning.java

示例7: removeProjectStorage

import net.sf.memoranda.Project; //导入方法依赖的package包/类
/**
 * @see net.sf.memoranda.util.Storage#removeProject(net.sf.memoranda.Project)
 */
public void removeProjectStorage(Project prj) {
    String id = prj.getID();
    File f = new File(JN_DOCPATH + id);
    File[] files = f.listFiles();
    for (int i = 0; i < files.length; i++)
        files[i].delete();
    f.delete();
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:12,代码来源:FileStorage.java

示例8: generateProjectInfo

import net.sf.memoranda.Project; //导入方法依赖的package包/类
static String generateProjectInfo(Project p, CalendarDate date, Collection expandedTasks) {
	String s = "<h2><a href=\"memoranda:project#"
			+ p.getID()
			+ "\">"
			+ p.getTitle()
			+ "</a></h2>\n"
			+ "<table border=\"0\" width=\"100%\" cellpadding=\"2\" bgcolor=\"#EFEFEF\"><tr><td>" 
			+ Local.getString("Start date")+": <i>"+p.getStartDate().getMediumDateString()+"</i>\n";
	if (p.getEndDate() != null)
		s += "<br>" + Local.getString("End date")+": <i>"+p.getEndDate().getMediumDateString()
		+"</i>\n";        
	return s + generateTasksInfo(p, date,expandedTasks);        
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:14,代码来源:AgendaGenerator.java

示例9: unpack

import net.sf.memoranda.Project; //导入方法依赖的package包/类
public static void unpack(File zipfile) {
    try {
        ZipFile zip = new ZipFile(zipfile);
        ZipEntry info = zip.getEntry("__PROJECT_INFO__");
        BufferedReader in = new BufferedReader(new InputStreamReader(zip.getInputStream(info), "UTF-8"));
        String pId = in.readLine();
        String pTitle = in.readLine();
        String pStartD = in.readLine();
        String pEndD = in.readLine();
        in.close();
        if (ProjectManager.getProject(pId) != null) {
            int n =
                JOptionPane.showConfirmDialog(
                    App.getFrame(),
                    Local.getString("This project is already exists and will be replaced.\nContinue?"),
                    Local.getString("Project is already exists"),
                    JOptionPane.YES_NO_OPTION);
            if (n != JOptionPane.YES_OPTION) {
                zip.close();
                return;
            }	
            ProjectManager.removeProject(pId);
        }
        Project prj = ProjectManager.createProject(pId, pTitle, new CalendarDate(pStartD), null);
        if (pEndD != null)
            prj.setEndDate(new CalendarDate(pEndD));
        //File prDir = new File(JN_DOCPATH + prj.getID());
        Enumeration files;           
        for (files = zip.entries(); files.hasMoreElements();){
            ZipEntry ze = (ZipEntry)files.nextElement();
            if ( ze.isDirectory() )
            {
               File theDirectory = new File (JN_DOCPATH + prj.getID()+ "/" + ze.getName() );
               // create this directory (including any necessary parent directories)
               theDirectory.mkdirs();
               theDirectory = null;
            }
            if ((!ze.getName().equals("__PROJECT_INFO__")) && (!ze.isDirectory())) {
                FileOutputStream out = new FileOutputStream(JN_DOCPATH + prj.getID() +"/"+ ze.getName());
                InputStream inp = zip.getInputStream(ze);
                
                byte[] buffer = new byte[1024];
                int len;

                while((len = inp.read(buffer)) >= 0)
                  out.write(buffer, 0, len);

                inp.close();
                out.close();
                
            }
        }
        zip.close();
        CurrentStorage.get().storeProjectManager();             
    }
    catch (Exception ex) {
        new ExceptionDialog(ex, "Failed to read from "+zipfile, "Make sure that this file is a Memoranda project archive.");
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:60,代码来源:ProjectPackager.java


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