本文整理汇总了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;
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
}
示例13: getPathObjectCombination
@Override
public String getPathObjectCombination( String transName ) {
if ( isRoot() ) {
return getPath() + transName;
} else {
return getPath() + RepositoryDirectory.DIRECTORY_SEPARATOR + transName;
}
}
示例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 );
}