convert method
Converts input and returns the result of the conversion.
Implementation
@override
LockEntry? convert(XmlElement input) {
final lockScopeNode = input.getElement(
WebDavElementNames.lockscope,
namespace: input.namespaceUri,
);
final lockTypeNode = input.getElement(
WebDavElementNames.locktype,
namespace: input.namespaceUri,
);
if (!(lockScopeNode != null && lockTypeNode != null)) return null;
final lockScope = lockScopeParser.convert(lockScopeNode);
if (lockScope == null) {
throw WebDavParserDataError(
"Can't parse ${WebDavElementNames.lockscope}",
data: input,
);
}
return LockEntry(
lockScope: lockScope,
isWriteLock: lockTypeParser.convert(lockTypeNode) ?? false,
);
}