org.xdef.impl.parsers.XDParseSHA1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xdef Show documentation
Show all versions of xdef Show documentation
X-definition 4.2 (Open Source Software)
package org.xdef.impl.parsers;
/** Parser of Schema "SHA1" type.
* @author Vaclav Trojan
*/
public class XDParseSHA1 extends XSParseHexBinary {
private static final String ROOTBASENAME = "SHA1";
public XDParseSHA1() {
super();
_minLength = _maxLength = 20;
}
@Override
public void initParams() {
_whiteSpace = WS_COLLAPSE;
_patterns = null;
_enumeration = null;
_minLength = _maxLength = 20;
}
@Override
public int getLegalKeys() {
return PATTERN +
ENUMERATION +
WHITESPACE + //fixed collapse
// MAXINCLUSIVE +
// MAXEXCLUSIVE +
// MININCLUSIVE +
// MINEXCLUSIVE +
// TOTALDIGITS +
// FRACTIONDIGITS +
LENGTH + //fixed to 20
// MAXLENGTH +
// MINLENGTH +
// NORMALIZE +
// SEPARATOR +
// ITEM +
// BASE +
0;
}
@Override
public String parserName() {return ROOTBASENAME;}
}