List of usage examples for org.dom4j Node getText
String getText();
Returns the text of this node.
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
/** * Extracts and returns the Source repository id from the sync info. * /*from w ww .j a v a 2 s . c o m*/ * @param syncInfo * - The incoming sync info for the repository. * @return - Returns the repository id from this sync info. */ public String getSourceRepositoryId(Document syncInfo) { Node node = syncInfo.selectSingleNode(SOURCE_REPOSITORY_ID); if (node == null) return null; return node.getText(); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
/** * Extracts and returns the Source repository kind from the sync info. * /*from ww w. jav a 2 s.co m*/ * @param syncInfo * - The incoming sync info for this repository. * @return - Returns the repository kind from the incoming sync info of this * repository If this is a CCF 2.x process, it will return the * directory of the XSLT file(s) to be used for the field mapping */ public String getSourceRepositoryKind(Document syncInfo) { if (isCCF2xProcess()) { // first figure out the scope String fieldMappingScopeString = getFieldMappingScope(syncInfo); String xsltDirectory = ""; try { FieldMappingScope fieldMappingScope = FieldMappingScope.valueOf(fieldMappingScopeString); Directions direction = Directions.values()[Integer .parseInt(getRepositoryMappingDirectionDirection(syncInfo))]; switch (fieldMappingScope) { case CCF_CORE: { xsltDirectory = direction.name() + File.separatorChar + FIELD_MAPPING_CORE_DIRECTORY + File.separatorChar + getFieldMappingName(syncInfo) + File.separatorChar; break; } case EXTERNAL_APP: { xsltDirectory = direction.name() + File.separatorChar + getExternalAppLinkId(syncInfo) + File.separatorChar + getFieldMappingName(syncInfo) + File.separatorChar; break; } case LANDSCAPE: { xsltDirectory = direction.name() + File.separatorChar + FIELD_MAPPING_LANDSCAPE_DIRECTORY + File.separatorChar + getFieldMappingName(syncInfo) + File.separatorChar; break; } case REPOSITORY_MAPPING_DIRECTION: { xsltDirectory = direction.name() + File.separatorChar + getRepositoryMappingDirectionId(syncInfo) + File.separatorChar + getFieldMappingName(syncInfo) + File.separatorChar; break; } } } catch (Exception e) { log.warn("Unknown fieldMappingScope " + fieldMappingScopeString + " or direction for synch info " + syncInfo.asXML()); } return xsltDirectory; } Node node = syncInfo.selectSingleNode(SOURCE_REPOSITORY_KIND); if (node == null) return null; return node.getText(); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
public String getSourceSystemEncoding(Document syncInfo) { Node node = syncInfo.selectSingleNode(SOURCE_SYSTEM_ENCODING); if (node == null) return null; return node.getText(); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
/** * Extracts and returns the Source system id from the sync info. * /* w ww. j a va 2 s.c o m*/ * @param syncInfo * - the incoming sync info for this repository * @return - The source system id for this repository. */ public String getSourceSystemId(Document syncInfo) { Node node = syncInfo.selectSingleNode(SOURCE_SYSTEM_ID); if (node == null) return null; return node.getText(); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
/** * Extracts and returns the source system kind from the sync info. * /* w w w . j a va 2s .c o m*/ * @param syncInfo * - The incoming sync info for this repository. * @return - The source system kind for this repository. * * If this is a CCF 2.x process, this attribute is populated with * the repository mapping direction id */ public String getSourceSystemKind(Document syncInfo) { if (isCCF2xProcess()) { return getRepositoryMappingDirectionId(syncInfo); } Node node = syncInfo.selectSingleNode(SOURCE_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 getSourceSystemTimezone(Document syncInfo) { Node node = syncInfo.selectSingleNode(SOURCE_SYSTEM_TIMEZONE); if (node == null) return null; return convertTimeZoneFromCCF2xDataBaseFormat(node.getText()); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
/** * Extracts and returns the target repository id from the sync info. * // w w w.j av a2 s.c o m * @param syncInfo * - The incoming sync info for this repository. * @return - the target repository id that is mapped to this repository. */ public String getTargetRepositoryId(Document syncInfo) { Node node = syncInfo.selectSingleNode(TARGET_REPOSITORY_ID); if (node == null) return null; return node.getText(); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
/** * Extracts and returns the target repository kind from the sync info. * //from www . j a v a 2s . c o m * @param syncInfo * - The incoming sync info for this repository. * @return - The target repository id extracted from this repository info. * * If this is a CCF 2.x process, it will return the kind of field * mapping to be applied */ public String getTargetRepositoryKind(Document syncInfo) { if (isCCF2xProcess()) { return getFieldMappingKind(syncInfo); } Node node = syncInfo.selectSingleNode(TARGET_REPOSITORY_KIND); if (node == null) return null; return node.getText(); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
public String getTargetSystemEncoding(Document syncInfo) { Node node = syncInfo.selectSingleNode(TARGET_SYSTEM_ENCODING); if (node == null) return null; return node.getText(); }
From source file:com.collabnet.ccf.core.AbstractReader.java
License:Open Source License
/** * Extracts and returns the Target system id from the sync info. * /*from w w w . j av a 2 s .c om*/ * @param syncInfo * - The incoming sync info for this repository. * @return - The target system id from the sync info */ public String getTargetSystemId(Document syncInfo) { Node node = syncInfo.selectSingleNode(TARGET_SYSTEM_ID); if (node == null) return null; return node.getText(); }