Examples of clean()


Examples of org.exoplatform.services.jcr.impl.backup.DataRestore.clean()

      DataRestoreContext context =
         new DataRestoreContext(new String[]{DataRestoreContext.STORAGE_DIR}, new Object[]{tempDir});
      DataRestore restorer = wsQuotaManager.getDataRestorer(context);

      restorer.clean();

      assertEquals(dbQuotaManager.getRepositoryDataSize(), repDataSize - wsDataSize);

      try
      {
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.clean.rdbms.DBCleanerTool.clean()

         {
            DBCleanerTool repositoryDBCleaner =
               DBCleanService.getRepositoryDBCleaner(conn, repository.getConfiguration());

            // clean and rollback first
            repositoryDBCleaner.clean();

            conn.rollback();

            repositoryDBCleaner.rollback();
View Full Code Here

Examples of org.flywaydb.core.Flyway.clean()

        if ("true".equals(applicationProperties.getProperty("dbmigrate.clean"))) {
            logger.info("clean database");

            Flyway flyway = new Flyway();
            flyway.setDataSource(dataSource);
            flyway.clean();
        }

        Collection<DatabaseMigrateInfo> databaseMigrateInfos = new DatabaseMigrateInfoBuilder(
                applicationProperties).build();
View Full Code Here

Examples of org.glassfish.internal.deployment.ExtendedDeploymentContext.clean()

            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            throw new GlassFishException("Cannot create context for undeployment ", e);
        } catch (TransactionFailure e) {
            throw new GlassFishException(e);
        } finally {
            deploymentContext.clean();
        }

        if (_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "Successfully removed context "+name);
        }
View Full Code Here

Examples of org.hibernate.search.backend.Workspace.clean()

      for ( LuceneWorker.WorkWithPayload luceneWork : queueWithFlatDPs ) {
        worker.performWork( luceneWork );
      }
    }
    finally {
      workspace.clean();
      queue.clear();
    }
  }

  private void checkForBatchIndexing(Workspace workspace) {
View Full Code Here

Examples of org.htmlcleaner.HtmlCleaner.clean()

 
  public static Collection<String> findAllLinkHref(String html, String hostUrl) throws Exception{
    Collection<String> urls = new ArrayList<String>();
   
    HtmlCleaner cleaner = new HtmlCleaner();
    TagNode node = cleaner.clean(html);
    Object[] ns = node.evaluateXPath("//a[@href]");
    for (Object object : ns) {
      TagNode node2=(TagNode) object;
      String href = node2.getAttributeByName("href");
      if (href == null || href.trim().length() == 0)
View Full Code Here

Examples of org.htmlcleaner.HtmlCleaner.clean()

 
  private List<Map<String, Object>> parseHtml(Page page) throws Exception{
    HtmlCleaner cleaner = new HtmlCleaner();
    cleaner.getProperties().setTreatUnknownTagsAsContent(true);
    String html = page.getContent();
    TagNode rootNode = cleaner.clean(html);
    fel.getContext().set("$page_content", html);
        final List<Field> fields = target.getModel().getField();
    String isModelArray = target.getModel().getIsArray();
    String modelXpath = target.getModel().getXpath();
    List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
View Full Code Here

Examples of org.htmlcleaner.HtmlCleaner.clean()

 
  public static Object evalXpath(String html, String xpath, String attribute){
    List<Object> result = new ArrayList<Object>();
    HtmlCleaner cleaner = new HtmlCleaner();
    try {
      TagNode tagNode = cleaner.clean(html);
      Object[] nodeVals = tagNode.evaluateXPath(xpath);
      for (Object tag : nodeVals){
        TagNode _tag = (TagNode)tag;
        Object val = null;
        if (attribute != null)
View Full Code Here

Examples of org.htmlcleaner.HtmlCleaner.clean()

      for( int i=0 ; i<lElements.size() ; i++ )
      {
        try
        {
          HtmlCleaner cleaner = new HtmlCleaner();
          TagNode rootNode = cleaner.clean(new URL(url));
          TagNode tagElements[] = rootNode.getElementsByName( lElements.get(i).getTag(), true );
          for( int j=0 ; j<tagElements.length ; j++ )
            if( lElements.get(i).getClas().equalsIgnoreCase("*") || tagElements[j].getAttributeByName("class").equals(lElements.get(i).getClas()) )
              lElements.get(i).add( tagElements[j].getText().toString() );
        }
View Full Code Here

Examples of org.htmlcleaner.HtmlCleaner.clean()

      HtmlCleaner cleaner = new HtmlCleaner();
     
      CleanerProperties props = cleaner.getProperties();
      props.setUseEmptyElementTags(false);
     
      TagNode node = cleaner.clean(sb.toString());
      Document myJDom = new JDomSerializer(props, true).createJDom(node);
      XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
      sbResult.append(outputter.outputString(myJDom));
    }
    catch (IOException e) {logger.error(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.