package com.elharo.xml.relaxng;
import org.relaxng.datatype.*;
import org.relaxng.datatype.helpers.*;
public class PrimeDatatypeLibrary implements DatatypeLibrary {
public Datatype createDatatype(String typeLocalName)
throws DatatypeException {
if ("prime".equals(typeLocalName)) {
return new PrimeDatatype();
}
throw new DatatypeException("Unsupported type: " + typeLocalName);
}
public DatatypeBuilder createDatatypeBuilder(String baseTypeLocalName)
throws DatatypeException {
return new ParameterlessDatatypeBuilder(
createDatatype("prime")
);
}
}