⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 staxfile.java

📁 Software Testing Automation Framework (STAF)的开发代码
💻 JAVA
字号:
/*****************************************************************************/
/* Software Testing Automation Framework (STAF)                              */
/* (C) Copyright IBM Corp. 2004, 2005                                        */
/*                                                                           */
/* This software is licensed under the Common Public License (CPL) V1.0.     */
/*****************************************************************************/
package com.ibm.staf.service.stax.staxdoc;

import java.util.*;
import java.io.*;

/******************************************************************************
*
******************************************************************************/
public class StaxFile implements Comparable
{
  private StaxPackage staxPackage = null;
  private String name = null;

  /////////////////////////////////////////////////////////////////////////////

  StaxFile(StaxPackage staxPackage, String fileName)
  {
    this.staxPackage = staxPackage;
	  this.name = fileName;
  }

  /////////////////////////////////////////////////////////////////////////////

  public String getFileName()
  {
    return name;
  }

  public StaxPackage getStaxPackage()
  {
    return staxPackage;
  }

  /////////////////////////////////////////////////////////////////////////////

  public String getRelativePath()
  {
    return staxPackage.getPath();
  }

  public String getRelativeFileName()
  {
    return getRelativePath() + File.separator + name;
  }

  public String getAbsolutePath()
  {
    int lastsepidx = getAbsoluteFileName().lastIndexOf(File.separator);
    return getAbsoluteFileName().substring(0, lastsepidx);
  }

  public String getAbsoluteFileName()
  {
    return staxPackage.getAbsolutePackageName() + File.separator + name;
  }

  /////////////////////////////////////////////////////////////////////////////

  public String getHtmlFilename()
  {
    return name.substring(0, name.indexOf(".xml")) + ".html";
  }

  public String getAbsoluteHtmlFilename()
  {
    return getAbsolutePath() + File.separator + getHtmlFilename();
  }

  /////////////////////////////////////////////////////////////////////////////

  public int compareTo(Object o)
  {
    String s1 = ((StaxFile)this).staxPackage.getPath() + ((StaxFile)this).name;
    String s2 = ((StaxFile)o).staxPackage.getPath() + ((StaxFile)o).name;
    return s1.compareTo(s2);
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -