Package org.dom4j

Examples of org.dom4j.Element.elementTextTrim()


        Element snapshotElem = xml.getElement( "//metadata/versioning/snapshot" );
        if ( snapshotElem != null )
        {
            MavenRepositoryMetadata.Snapshot snapshot = new MavenRepositoryMetadata.Snapshot();
            snapshot.setTimestamp( snapshotElem.elementTextTrim( "timestamp" ) );
            String tmp = snapshotElem.elementTextTrim( "buildNumber" );
            if ( NumberUtils.isNumber( tmp ) )
            {
                snapshot.setBuildNumber( NumberUtils.toInt( tmp ) );
            }
View Full Code Here


        Element snapshotElem = xml.getElement( "//metadata/versioning/snapshot" );
        if ( snapshotElem != null )
        {
            MavenRepositoryMetadata.Snapshot snapshot = new MavenRepositoryMetadata.Snapshot();
            snapshot.setTimestamp( snapshotElem.elementTextTrim( "timestamp" ) );
            String tmp = snapshotElem.elementTextTrim( "buildNumber" );
            if ( NumberUtils.isNumber( tmp ) )
            {
                snapshot.setBuildNumber( NumberUtils.toInt( tmp ) );
            }
            metadata.setSnapshotVersion( snapshot );
View Full Code Here

      // read the process name
      parseProcessDefinitionAttributes(root);

      // get the process description
      String description = root.elementTextTrim("description");
      if (description != null)
      {
        processDefinition.setDescription(description);
      }
View Full Code Here

        }
    }

    private void init(Document document) {
        Element root = document.getRootElement();
        deploymentName = root.elementTextTrim("deployment-name");
        Iterator it = root.elementIterator("deployment-entry");
        while (it.hasNext()) {
            Element element = (Element) it.next();
            String archiveName = element.elementTextTrim("archive-name");
            String descriptorName = element.elementTextTrim("descriptor-name");
View Full Code Here

        Element root = document.getRootElement();
        deploymentName = root.elementTextTrim("deployment-name");
        Iterator it = root.elementIterator("deployment-entry");
        while (it.hasNext()) {
            Element element = (Element) it.next();
            String archiveName = element.elementTextTrim("archive-name");
            String descriptorName = element.elementTextTrim("descriptor-name");
            addEntry(archiveName, descriptorName);
        }
    }
View Full Code Here

        deploymentName = root.elementTextTrim("deployment-name");
        Iterator it = root.elementIterator("deployment-entry");
        while (it.hasNext()) {
            Element element = (Element) it.next();
            String archiveName = element.elementTextTrim("archive-name");
            String descriptorName = element.elementTextTrim("descriptor-name");
            addEntry(archiveName, descriptorName);
        }
    }

    /**
 
View Full Code Here

            Element snapshotElem = xml.getElement( "//metadata/versioning/snapshot" );
            if ( snapshotElem != null )
            {
                SnapshotVersion snapshot = new SnapshotVersion();
                snapshot.setTimestamp( snapshotElem.elementTextTrim( "timestamp" ) );
                String tmp = snapshotElem.elementTextTrim( "buildNumber" );
                if( NumberUtils.isNumber( tmp ))
                {
                    snapshot.setBuildNumber( NumberUtils.toInt( tmp ) );
                }
View Full Code Here

            Element snapshotElem = xml.getElement( "//metadata/versioning/snapshot" );
            if ( snapshotElem != null )
            {
                SnapshotVersion snapshot = new SnapshotVersion();
                snapshot.setTimestamp( snapshotElem.elementTextTrim( "timestamp" ) );
                String tmp = snapshotElem.elementTextTrim( "buildNumber" );
                if( NumberUtils.isNumber( tmp ))
                {
                    snapshot.setBuildNumber( NumberUtils.toInt( tmp ) );
                }
                metadata.setSnapshotVersion( snapshot );
View Full Code Here

    actionDelegate.setConfiguration("<id>63</id><greeting>aloha</greeting>");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("63", actionElement.elementTextTrim("id"));
    assertEquals("aloha", actionElement.elementTextTrim("greeting"));
  }

  public void testReadActionTextConfiguration() {
    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
View Full Code Here

    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("63", actionElement.elementTextTrim("id"));
    assertEquals("aloha", actionElement.elementTextTrim("greeting"));
  }

  public void testReadActionTextConfiguration() {
    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition>" +
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.