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


Java RepositoryDirectory.DIRECTORY_SEPARATOR属性代码示例

本文整理汇总了Java中org.pentaho.di.repository.RepositoryDirectory.DIRECTORY_SEPARATOR属性的典型用法代码示例。如果您正苦于以下问题:Java RepositoryDirectory.DIRECTORY_SEPARATOR属性的具体用法?Java RepositoryDirectory.DIRECTORY_SEPARATOR怎么用?Java RepositoryDirectory.DIRECTORY_SEPARATOR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.pentaho.di.repository.RepositoryDirectory的用法示例。


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

示例1: toString

public String toString()
{
    String string = "";
    
    if (sourceRepository && !Const.isEmpty(directory) && !Const.isEmpty(repositoryName))
    {
        string+="["+repositoryName+"] "; 
        
        if (directory.endsWith(RepositoryDirectory.DIRECTORY_SEPARATOR))
        {
            string+=": "+directory+filename;
        }
        else
        {
            string+=": "+RepositoryDirectory.DIRECTORY_SEPARATOR+filename;
        }
    }
    else
    {
        string+=filename;
    }
        
    return string;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:LastUsedFile.java

示例2: toString

public String toString() {
       if (!Const.isEmpty(filename)) {
       	if (Const.isEmpty(name)) {
       		return filename;
       	} else {
       		return filename+" : "+name;
       	}
       }

       if (name != null) {
       	if (directory!=null) {
       		String path = directory.getPath();
       		if (path.endsWith(RepositoryDirectory.DIRECTORY_SEPARATOR)) {
       			return path+name;
       		} else {
       			return path+RepositoryDirectory.DIRECTORY_SEPARATOR+name;
       		}
       	} else {
       		return name;
       	}
       } else {
       	return JobMeta.class.getName();
       }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:JobMeta.java

示例3: toString

/**
 * @return the textual representation of the transformation: it's name. If the name has not been set, the classname
 * is returned.
 */
public String toString()
{
    if (!Const.isEmpty(filename)) {
    	if (Const.isEmpty(name)) {
    		return filename;
    	} else {
    		return filename+" : "+name;
    	}
    }

    if (name != null) {
    	if (directory!=null) {
    		String path = directory.getPath();
    		if (path.endsWith(RepositoryDirectory.DIRECTORY_SEPARATOR)) {
    			return path+name;
    		} else {
    			return path+RepositoryDirectory.DIRECTORY_SEPARATOR+name;
    		}
    	} else {
    		return name;
    	}
    } else {
    	return TransMeta.class.getName();
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:TransMeta.java

示例4: toString

/**
    * Gets a textual representation of the job. If its name has been set, it will be returned,
    * otherwise the classname is returned.
    *
    * @return the textual representation of the job.
    */
public String toString() {
       if (!Const.isEmpty(filename)) {
       	if (Const.isEmpty(name)) {
       		return filename;
       	} else {
       		return filename+" : "+name;
       	}
       }

       if (name != null) {
       	if (directory!=null) {
       		String path = directory.getPath();
       		if (path.endsWith(RepositoryDirectory.DIRECTORY_SEPARATOR)) {
       			return path+name;
       		} else {
       			return path+RepositoryDirectory.DIRECTORY_SEPARATOR+name;
       		}
       	} else {
       		return name;
       	}
       } else {
       	return JobMeta.class.getName();
       }
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:30,代码来源:JobMeta.java

示例5: toString

/**
 * Gets a textual representation of the job. If its name has been set, it will be returned, otherwise the classname is
 * returned.
 *
 * @return the textual representation of the job.
 */
public String toString() {
  if ( !Utils.isEmpty( filename ) ) {
    if ( Utils.isEmpty( name ) ) {
      return filename;
    } else {
      return filename + " : " + name;
    }
  }

  if ( name != null ) {
    if ( directory != null ) {
      String path = directory.getPath();
      if ( path.endsWith( RepositoryDirectory.DIRECTORY_SEPARATOR ) ) {
        return path + name;
      } else {
        return path + RepositoryDirectory.DIRECTORY_SEPARATOR + name;
      }
    } else {
      return name;
    }
  } else {
    return JobMeta.class.getName();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:30,代码来源:JobMeta.java

示例6: toString

/**
 * Gets a textual representation of the transformation. If its name has been set, it will be returned, otherwise the
 * classname is returned.
 *
 * @return the textual representation of the transformation.
 */
@Override
public String toString() {
  if ( !Utils.isEmpty( filename ) ) {
    if ( Utils.isEmpty( name ) ) {
      return filename;
    } else {
      return filename + " : " + name;
    }
  }

  if ( name != null ) {
    if ( directory != null ) {
      String path = directory.getPath();
      if ( path.endsWith( RepositoryDirectory.DIRECTORY_SEPARATOR ) ) {
        return path + name;
      } else {
        return path + RepositoryDirectory.DIRECTORY_SEPARATOR + name;
      }
    } else {
      return name;
    }
  } else {
    return TransMeta.class.getName();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:31,代码来源:TransMeta.java

示例7: toString

public String toString() {
  String string = "";

  if ( sourceRepository && !Utils.isEmpty( directory ) && !Utils.isEmpty( repositoryName ) ) {
    string += "[" + repositoryName + "] ";

    if ( directory.endsWith( RepositoryDirectory.DIRECTORY_SEPARATOR ) ) {
      string += ": " + directory + filename;
    } else {
      string += ": " + directory + RepositoryDirectory.DIRECTORY_SEPARATOR + filename;
    }
  } else {
    string += filename;
  }

  return string;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:LastUsedFile.java

示例8: getPathAndName

/**
 * @return The directory path plus the name of the transformation
 */
public String getPathAndName()
{
    if (getDirectory().isRoot())
        return getDirectory().getPath() + getName();
    else
        return getDirectory().getPath() + RepositoryDirectory.DIRECTORY_SEPARATOR + getName();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:10,代码来源:TransMeta.java

示例9: getPathAndName

/**
 * @return The directory path plus the name of the transformation
 */
public String getPathAndName()
{
    if (getRepositoryDirectory().isRoot())
        return getRepositoryDirectory().getPath() + getName();
    else
        return getRepositoryDirectory().getPath() + RepositoryDirectory.DIRECTORY_SEPARATOR + getName();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:10,代码来源:TransMeta.java

示例10: getPathAndName

/**
 * Gets the repository directory path and name of the transformation.
 *
 * @return The repository directory path plus the name of the transformation
 */
public String getPathAndName()
{
    if (getRepositoryDirectory().isRoot())
        return getRepositoryDirectory().getPath() + getName();
    else
        return getRepositoryDirectory().getPath() + RepositoryDirectory.DIRECTORY_SEPARATOR + getName();
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:12,代码来源:TransMeta.java

示例11: toString

/**
    * Gets a textual representation of the transformation. If its name has been set, it will be returned,
    * otherwise the classname is returned.
    *
    * @return the textual representation of the transformation.
    */
@Override
   public String toString()
   {
       if (!Const.isEmpty(filename)) {
       	if (Const.isEmpty(name)) {
       		return filename;
       	} else {
       		return filename+" : "+name;
       	}
       }

       if (name != null) {
       	if (directory!=null) {
       		String path = directory.getPath();
       		if (path.endsWith(RepositoryDirectory.DIRECTORY_SEPARATOR)) {
       			return path+name;
       		} else {
       			return path+RepositoryDirectory.DIRECTORY_SEPARATOR+name;
       		}
       	} else {
       		return name;
       	}
       } else {
       	return TransMeta.class.getName();
       }
   }
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:32,代码来源:TransMeta.java

示例12: getPathAndName

/**
 * Gets the repository directory path and name of the transformation.
 *
 * @return The repository directory path plus the name of the transformation
 */
public String getPathAndName() {
  if ( getRepositoryDirectory().isRoot() ) {
    return getRepositoryDirectory().getPath() + getName();
  } else {
    return getRepositoryDirectory().getPath() + RepositoryDirectory.DIRECTORY_SEPARATOR + getName();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:12,代码来源:TransMeta.java

示例13: getPathObjectCombination

@Override
public String getPathObjectCombination( String transName ) {
  if ( isRoot() ) {
    return getPath() + transName;
  } else {
    return getPath() + RepositoryDirectory.DIRECTORY_SEPARATOR + transName;
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:LazyUnifiedRepositoryDirectory.java

示例14: findDirectory

@Override public RepositoryDirectory findDirectory( String path ) {
  if ( StringUtils.isEmpty( path ) ) {
    return null;
  }
  String absolutePath;
  if ( path.startsWith( RepositoryDirectory.DIRECTORY_SEPARATOR ) ) {
    if ( self.getPath().endsWith( RepositoryDirectory.DIRECTORY_SEPARATOR ) ) {
      absolutePath = self.getPath() + path.substring( 1 );
    } else {
      absolutePath = self.getPath() + path;
    }
  } else {
    if ( self.getPath().endsWith( RepositoryDirectory.DIRECTORY_SEPARATOR ) ) {
      absolutePath = self.getPath() + path;
    } else {
      absolutePath = self.getPath() + RepositoryDirectory.DIRECTORY_SEPARATOR + path;
    }
  }

  RepositoryFile file = repository.getFile( absolutePath );
  if ( file == null || !file.isFolder() ) {
    return null;
  }
  if ( isRoot() && RepositoryDirectory.DIRECTORY_SEPARATOR.equals( absolutePath ) ) {
    return this;
  }

  // Verifies if this is the parent directory of file and if so passes this as parent argument
  String parentPath = getParentPath( absolutePath );
  if ( self.getPath().endsWith( RepositoryDirectory.DIRECTORY_SEPARATOR ) ) {
    if ( parentPath.equals( self.getPath().substring( 0, self.getPath().length() - 1 ) ) ) {
      return new LazyUnifiedRepositoryDirectory( file, this, repository, registry );
    }
  } else {
    if ( parentPath.equals( self.getPath() ) ) {
      return new LazyUnifiedRepositoryDirectory( file, this, repository, registry );
    }
  }

  return new LazyUnifiedRepositoryDirectory( file, findDirectory( parentPath ), repository, registry );

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:42,代码来源:LazyUnifiedRepositoryDirectory.java


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