use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Boolean in project jaxdb by jaxdb.
the class Generator method getTypes.
private Type[] getTypes(final Table table, final Map<String, Table> tableNameToTable, final int depth, final Info info) throws GeneratorExecutionException {
final List<$Column> columns = table.getColumn();
final int size = columns == null ? 0 : columns.size();
final Type[] types;
if (table.getExtends$() == null) {
types = new Type[depth + size];
info.rootClassName = schemaClassName + "." + Identifiers.toClassCase(table.getName$().text());
} else {
types = getTypes(tableNameToTable.get(table.getExtends$().text()), tableNameToTable, depth + size, info);
}
if (columns != null) {
final boolean isSuperTable = depth != 0;
info.totalPrimaryCount.inc(getPrimaryColumnCount(table), isSuperTable);
for (int c = 1; c <= size; ++c) {
final $Column column = columns.get(size - c);
final Type type = getType(table, column);
if (org.jaxdb.ddlx.Generator.isAuto(column))
info.totalAutoCount.inc(1, isSuperTable);
if (type.keyForUpdate)
info.totalKeyForUpdateCount.inc(1, isSuperTable);
types[types.length - depth - c] = type;
}
}
return types;
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Boolean in project jss by dogtagpki.
the class IssuingDistributionPoint method encode.
@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
SEQUENCE seq = new SEQUENCE();
DerOutputStream derOut;
try {
// is a CHOICE, the [0] tag is forced to be EXPLICIT.
if (fullName != null) {
EXPLICIT distPoint = new EXPLICIT(Tag.get(0), fullNameEncoding);
seq.addElement(distPoint);
} else if (relativeName != null) {
derOut = new DerOutputStream();
relativeName.encode(derOut);
ANY raw = new ANY(derOut.toByteArray());
ByteArrayOutputStream bos = new ByteArrayOutputStream();
raw.encodeWithAlternateTag(Tag.get(1), bos);
ANY distPointName = new ANY(bos.toByteArray());
EXPLICIT distPoint = new EXPLICIT(Tag.get(0), distPointName);
seq.addElement(distPoint);
}
if (onlyContainsUserCerts != false) {
seq.addElement(Tag.get(1), new BOOLEAN(true));
}
if (onlyContainsCACerts != false) {
seq.addElement(Tag.get(2), new BOOLEAN(true));
}
// Encodes the ReasonFlags.
if (onlySomeReasons != null) {
derOut = new DerOutputStream();
derOut.putUnalignedBitString(onlySomeReasons);
ANY raw = new ANY(derOut.toByteArray());
ByteArrayOutputStream bos = new ByteArrayOutputStream();
raw.encodeWithAlternateTag(Tag.get(3), bos);
ANY reasonEncoding = new ANY(bos.toByteArray());
seq.addElement(reasonEncoding);
}
if (indirectCRL != false) {
seq.addElement(Tag.get(4), new BOOLEAN(true));
}
seq.encode(implicitTag, ostream);
} catch (InvalidBERException e) {
// the Sun encoding classes
throw new IOException(e.toString());
}
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Boolean in project jss by dogtagpki.
the class PKIArchiveOptions method encode.
/**
* DER-encodes a PKIArchiveOptions.
* @param implicitTag <b>This parameter is ignored.</b> A CHOICE cannot
* have an implicit tag.
*/
@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
// no implicit tags on a CHOICE
assert (implicitTag.equals(tag));
if (type == ENCRYPTED_PRIV_KEY) {
// CHOICEs are always EXPLICITly tagged
EXPLICIT explicit = new EXPLICIT(new Tag(0), encryptedPrivKey);
explicit.encode(tag, ostream);
} else if (type == KEY_GEN_PARAMETERS) {
keyGenParameters.encode(tag, ostream);
} else {
assert (type == ARCHIVE_REM_GEN_PRIV_KEY);
(new BOOLEAN(archiveRemGenPrivKey)).encode(tag, ostream);
}
}
Aggregations