private void initSchemas() { schemas = new HashMap<>(); schemas.put("default", new Schema(1, new Date(), "admin", "default", "default schema for test and demo purpose", true, null)); schemas.put("TPoX", new Schema(1, new Date(), "admin", "TPoX", "TPoX: schema for TPoX-related tests", false, null)); schemas.put("XMark", new Schema(1, new Date(), "admin", "XMark", "XMark benchmark schema", false, null)); }
protected Schema initSchema() { com.bagri.core.server.api.SchemaRepository xdmRepo = (com.bagri.core.server.api.SchemaRepository) xRepo; Schema schema = xdmRepo.getSchema(); if (schema == null) { schema = new Schema(1, new java.util.Date(), "test", "test", "test schema", true, null); //xdmRepo.setSchema(schema); //xdmRepo.setDataFormats(getBasicDataFormats()); } return schema; }
@Override public Object process(Entry<String, Schema> entry) { logger.debug("process.enter; entry: {}", entry); if (entry.getValue() == null) { String schemaName = entry.getKey(); String pwd = properties.getProperty(pn_schema_password); if (pwd != null) { properties.setProperty(pn_schema_password, encrypt(pwd)); } Schema schema = new Schema(getVersion(), new Date(), getAdmin(), schemaName, description, true, properties); //if (initSchemaInCluster(schema) == 0) { schema.setActive(false); //} entry.setValue(schema); auditEntity(AuditType.create, schema); //if (schema.isActive()) { // logger.debug("process; schema activated, starting population"); // SchemaPopulator pop = new SchemaPopulator(schema.getName()); // execService.submitToAllMembers(pop); //} return schema; } return null; }
@Override public Schema read(ObjectDataInput in) throws IOException { Object[] entity = super.readEntity(in); Schema xSchema = new Schema( (int) entity[0], (Date) entity[1],