Example usage for org.dom4j Node getText

List of usage examples for org.dom4j Node getText

Introduction

In this page you can find the example usage for org.dom4j Node getText.

Prototype

String getText();

Source Link

Document

Returns the text of this node.

Usage

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

/**
 * Extracts and returns the target system kind from the sync info.
 * /*  w w  w.  j ava  2 s  .c o m*/
 * @param syncInfo
 *            - The incoming sync info for this repository.
 * @return - the target system kind from this repository sync info.
 * 
 *         If this is a CCF 2.x process, this method returns the repository
 *         mapping id
 */
public String getTargetSystemKind(Document syncInfo) {
    if (isCCF2xProcess()) {
        return getRepositoryMappingId(syncInfo);
    }
    Node node = syncInfo.selectSingleNode(TARGET_SYSTEM_KIND);
    if (node == null)
        return null;
    return node.getText();
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

public String getTargetSystemTimezone(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(TARGET_SYSTEM_TIMEZONE);
    if (node == null)
        return null;
    return convertTimeZoneFromCCF2xDataBaseFormat(node.getText());
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

public boolean isArtifactForced(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(FORCED_ARTIFACT);
    if (node == null)
        return false;
    String val = node.getText();
    if (!StringUtils.isEmpty(val)) {
        return Boolean.parseBoolean(val);
    }//  ww  w .  j a  va2 s  .  com
    return false;
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

protected String getExternalAppLinkId(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(EXTERNAL_APP_LINK_ID);
    if (node == null)
        return null;
    return node.getText();
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

protected String getFieldMappingKind(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(FIELD_MAPPING_KIND);
    if (node == null)
        return null;
    return node.getText();
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

protected String getFieldMappingName(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(FIELD_MAPPING_NAME);
    if (node == null)
        return null;
    return node.getText();
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

protected String getFieldMappingScope(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(FIELD_MAPPING_SCOPE);
    if (node == null)
        return null;
    return node.getText();
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

/**
 * Returns the source artifact id that was sync-ed in the last CCF cycle.
 * /*from   w w  w .ja v  a  2 s.co m*/
 * @param syncInfo
 *            - The incoming sync info of a particular repository.
 * @return - The source artifact id that was sync-ed last for this
 *         repository.
 */
protected String getLastSourceArtifactId(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(LAST_SOURCE_ARTIFACT_ID);
    if (node == null)
        return null;
    return node.getText();
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

/**
 * Returns the version of the artifact that was sync-ed in the last CCF
 * cycle./*from   www  . ja v a  2 s  .co m*/
 * 
 * @param syncInfo
 *            - The incoming sync info
 * @return - The version of the artifact that was last sync-ed
 */
protected String getLastSourceVersion(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(LAST_SOURCE_ARTIFACT_VERSION);
    if (node == null)
        return null;
    return node.getText();
}

From source file:com.collabnet.ccf.core.AbstractReader.java

License:Open Source License

protected String getRepositoryMappingDirectionDirection(Document syncInfo) {
    Node node = syncInfo.selectSingleNode(REPOSITORY_MAPPING_DIRECTION_DIRECTION);
    if (node == null)
        return null;
    return node.getText();
}