UriHandler historyUriHandler = UriHandler.getUriHandler(historyUri);
if (historyUriHandler.isHistoryUri()) {
NodeRevisionDescriptors historyNrds = content.retrieve(sToken, historyUri);
NodeRevisionDescriptor historyNrd =
content.retrieve(sToken, historyNrds, NodeRevisionNumber.HIDDEN_0_0);
NodeProperty versionSet = historyNrd.getProperty(P_VERSION_SET);
try {
XMLValue versionSetValue = new XMLValue(versionSet.getValue().toString());
NodeRevisionDescriptor vrNrd = null;
NodeProperty labelNameSetProperty = null;
String labelNameSetString = null;
Iterator versionSetIterator = versionSetValue.iterator();
String vrUri = null;
UriHandler vrUriHandler = null;
boolean found = false;
while ( !found && versionSetIterator.hasNext() ) {
vrUri = ((Element)versionSetIterator.next()).getText();
vrUriHandler = UriHandler.getUriHandler(vrUri);
NodeRevisionNumber vrRevisionNumber = new NodeRevisionNumber(vrUriHandler.getVersionName());
vrNrd = content.retrieve(sToken, historyNrds, vrRevisionNumber);
labelNameSetProperty = vrNrd.getProperty(P_LABEL_NAME_SET);
if ( (labelNameSetProperty != null) && (labelNameSetProperty.getValue() != null) ) {
labelNameSetString = labelNameSetProperty.getValue().toString();
if (labelNameSetString != null) {
XMLValue labelNameSet = new XMLValue(labelNameSetString);
Iterator labelNameSetIterator = labelNameSet.iterator();
while ( !found && labelNameSetIterator.hasNext() ) {
found = label.equals(((Element)labelNameSetIterator.next()).getText());