Examples of IFileInfo


Examples of org.eclipse.core.filesystem.IFileInfo

   */
  protected boolean isSystemFileReadOnly(FileInfo info)  {
    IFileStore fileStore= getFileStore(info);
    if (fileStore == null)
      return false;
    IFileInfo fileInfo= fileStore.fetchInfo();
    return fileInfo.exists() && fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY);
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IFileInfo

  public IFileInfo getFileInfo( ISolutionFile solutionFile, InputStream in ) {
    try {
      Document doc = XmlDom4JHelper.getDocFromStream( in );

      IFileInfo info = new FileInfo();
      Node node = doc.selectSingleNode( "state-file/documentation/author" ); //$NON-NLS-1$
      if ( node != null ) {
        info.setAuthor( node.getText() );
      } else {
        info.setAuthor( "" ); //$NON-NLS-1$
      }
      info.setDisplayType( "HTML" ); //$NON-NLS-1$
      node = doc.selectSingleNode( "state-file/documentation/title" ); //$NON-NLS-1$
      if ( node != null ) {
        info.setTitle( node.getText() );
      } else {
        info.setTitle( "" ); //$NON-NLS-1$
      }
      node = doc.selectSingleNode( "state-file/documentation/description" ); //$NON-NLS-1$
      if ( node != null ) {
        info.setDescription( node.getText() );
      } else {
        info.setDescription( "" ); //$NON-NLS-1$
      }
      node = doc.selectSingleNode( "state-file/documentation/icon" ); //$NON-NLS-1$
      if ( node != null ) {
        info.setIcon( node.getText() );
      } else {
        info.setIcon( "" ); //$NON-NLS-1$
      }
      return info;
    } catch ( Exception e ) {
      if ( logger != null ) {
        logger.error( getClass().toString(), e );
View Full Code Here

Examples of org.pentaho.platform.api.engine.IFileInfo

            "SolutionRepository.ERROR_0016_FAILED_TO_CREATE_ACTION_SEQUENCE", //$NON-NLS-1$
            path ) );
        return null;
      }

      IFileInfo info = new FileInfo();
      info.setAuthor( actionSequence.getAuthor() );
      info.setDescription( actionSequence.getDescription() );
      info.setDisplayType( actionSequence.getResultType() );
      info.setIcon( actionSequence.getIcon() );
      info.setTitle( actionSequence.getTitle() );
      return info;
    } catch ( Exception e ) {
      if ( logger != null ) {
        logger.error( getClass().toString(), e );
      }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IFileInfo

            String title = solutionFile.getFileName();
            if (title != null && title.endsWith(".saiku")) {
              title = title.substring(0,title.indexOf(".saiku"));
            }

            IFileInfo info = new FileInfo();
            info.setAuthor("");
            info.setDescription("");
            info.setIcon(PluginConfig.ICON);
            info.setTitle(title);
            return info;

        } catch (Exception e) {
            LOG.error(getClass().toString(), e);
        }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IFileInfo

      String author = (String) xpath.evaluate("/cdf/author", doc, XPathConstants.STRING); //$NON-NLS-1$
      String description = (String) xpath.evaluate("/cdf/description", doc, XPathConstants.STRING); //$NON-NLS-1$
      String icon = (String) xpath.evaluate("/cdf/icon", doc, XPathConstants.STRING); //$NON-NLS-1$
      String title = (String) xpath.evaluate("/cdf/title", doc, XPathConstants.STRING); //$NON-NLS-1$

      IFileInfo info = new FileInfo();
      info.setAuthor(author);
      info.setDescription(description);
      info.setDisplayType(result);
      info.setIcon(icon);
      info.setTitle(title);
      return info;

    } catch (Exception e) {
      logger.error(Messages.getErrorString("CdfFileInfoGenerator.ERROR_0001_PARSING_XCDF"), e); //$NON-NLS-1$
      return null;
View Full Code Here

Examples of org.pentaho.platform.api.engine.IFileInfo

    String author = XmlDom4JHelper.getNodeText("/cdf/author", doc, "")//$NON-NLS-1$ //$NON-NLS-2$
    String description = XmlDom4JHelper.getNodeText("/cdf/description", doc, "")//$NON-NLS-1$ //$NON-NLS-2$
    String icon = XmlDom4JHelper.getNodeText("/cdf/icon", doc, "")//$NON-NLS-1$ //$NON-NLS-2$
    String title = XmlDom4JHelper.getNodeText("/cdf/title", doc, "")//$NON-NLS-1$ //$NON-NLS-2$

    IFileInfo info = new FileInfo();
    info.setAuthor(author);
    info.setDescription(description);
    info.setDisplayType(result);
    info.setIcon(icon);
    info.setTitle(title);
    return info;
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IFileInfo

    String author = XmlDom4JHelper.getNodeText("/cdf/author", doc, "")//$NON-NLS-1$ //$NON-NLS-2$
    String description = XmlDom4JHelper.getNodeText("/cdf/description", doc, "")//$NON-NLS-1$ //$NON-NLS-2$
    String icon = XmlDom4JHelper.getNodeText("/cdf/icon", doc, "")//$NON-NLS-1$ //$NON-NLS-2$
    String title = XmlDom4JHelper.getNodeText("/cdf/title", doc, "")//$NON-NLS-1$ //$NON-NLS-2$

    IFileInfo info = new FileInfo();
    info.setAuthor(author);
    info.setDescription(description);
    info.setDisplayType(result);
    info.setIcon(icon);
    info.setTitle(title);
    return info;
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IFileInfo

      String author = (String) xpath.evaluate("/cdf/author", doc, XPathConstants.STRING); //$NON-NLS-1$
      String description = (String) xpath.evaluate("/cdf/description", doc, XPathConstants.STRING); //$NON-NLS-1$
      String icon = (String) xpath.evaluate("/cdf/icon", doc, XPathConstants.STRING); //$NON-NLS-1$
      String title = (String) xpath.evaluate("/cdf/title", doc, XPathConstants.STRING); //$NON-NLS-1$

      IFileInfo info = new FileInfo();
      info.setAuthor(author);
      info.setDescription(description);
      info.setDisplayType(result);
      info.setIcon(icon);
      info.setTitle(title);
      return info;

    } catch (Exception e) {
      logger.error(Messages.getErrorString("CdfFileInfoGenerator.ERROR_0001_PARSING_XCDF"), e); //$NON-NLS-1$
      return null;
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.