Examples of SimplePath


Examples of net.sourceforge.javautil.common.io.impl.SimplePath

        parts.add(0, artifact.getPath().replaceAll("[\\\\/]", ""));
      } else
        parts.add(0, artifact.getName());
    }
   
    return new SimplePath( parts.toArray(new String[parts.size()]) );
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

   * @return The {@link #rootPrefix}
   */
  public String getRootPrefix() { return rootPrefix; }
  public void setRootPrefix(String rootPrefix) {
    this.rootPrefix = rootPrefix;
    this.root = new SecureFTPDirectory(this, null, new SimplePath(""), getFiles(new SimplePath(".")).firstElement().getAttrs());
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

    this.directory = directory;
    this.path = directory.getPath();
  }

  public File getFile(String path) {
    ISystemArtifact artifact = directory.getArtifact(ISystemArtifact.class, new SimplePath(path));
     
    if (artifact != null) {
      return artifact.getRealArtifact();
    } else {
      return null;
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

    }
  }

  public URL getResource(String path) {
    try {
      return directory.getArtifact(new SimplePath(path)).getURL();
    } catch (VirtualArtifactNotFoundException e) {
      return null;
    }
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

  }

  public List<String> getResourcePaths(String path) {
    Set<String> set = new LinkedHashSet<String>();
    try {
      IVirtualArtifact artifact = directory.getArtifact(new SimplePath(path));
     
      if (artifact instanceof IVirtualDirectory) {
        Iterator<IVirtualArtifact> subs = ((IVirtualDirectory)artifact).getArtifacts();
        while (subs.hasNext()) {
          IVirtualArtifact sub = subs.next();
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

   * @param directory The root directory of a {@link IWebApplication}.
   * @return A web app server descriptor if it exists, otherwise null
   */
  public static WebApplicationServerDescriptor get (IVirtualDirectory directory) {
    try {
      return XMLDocument.read(directory.getFile(new SimplePath("WEB-INF/web-server.xml")), WebApplicationServerDescriptor.class);
    } catch (VirtualArtifactNotFoundException e) {
      return null;
    }
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

      .append( reference.getVersion().toVersionString() )
      .toString();
  }

  public IVirtualPath createPackagePath(IClassPackageReference reference) {
    return new SimplePath( CollectionUtil.push(reference.getGroupId().split("\\."),
      reference.getArtifactId(), reference.getVersion().toVersionString()) );
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

    return new SimplePath( CollectionUtil.push(reference.getGroupId().split("\\."),
      reference.getArtifactId(), reference.getVersion().toVersionString()) );
  }

  public IVirtualPath createArtifactPath(IClassArtifactReference reference) {
    return new SimplePath( CollectionUtil.push(reference.getGroupId().split("\\."), reference.getArtifactId() ));
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

    return resolver;
  }

  public static void addProjectMainTarget (CompositeClassSource ccs, ProjectObjectModel model, IVirtualDirectory root) {
    try {
      IVirtualDirectory dir = root.getDirectory( new SimplePath(model.getCompileDirectoryOrDefault()) );
      ccs.add(new VirtualDirectoryClassSource(dir));
    } catch (VirtualArtifactNotFoundException e) {
    }
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.impl.SimplePath

    }
  }
 
  public static void addProjectTestTarget (CompositeClassSource ccs, ProjectObjectModel model, IVirtualDirectory root) {
    try{
      IVirtualDirectory dir = root.getDirectory( new SimplePath(model.getCompileTestsDirectoryOrDefault()) );
      ccs.add(new VirtualDirectoryClassSource(dir));
    } catch (VirtualArtifactNotFoundException e) {
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.