Index addIndex(String name, String docType, String path, String dataType, boolean caseSensitive, boolean range, boolean unique, String description) { // TODO: what it is for?! String typePath = path; //xdmRepo.getModelManagement().normalizePath(docType); Index index = new Index(1, new Date(), getCurrentUser(), name, docType, typePath, path, new QName(xs_ns, dataType, xs_prefix), caseSensitive, range, unique, description, true); Schema schema = getEntity(); if (schema.addIndex(index)) { // store schema! flushEntity(schema); return index; } return null; }
@Override public Index read(ObjectDataInput in) throws IOException { Object[] entity = super.readEntity(in); Index xIndex = new Index( (int) entity[0], (Date) entity[1], (String) entity[2], in.readUTF(), in.readUTF(), in.readUTF(), in.readUTF(), QName.valueOf(in.readUTF()), in.readBoolean(), in.readBoolean(), in.readBoolean(), in.readUTF(), in.readBoolean()); return xIndex; }