package io.lumify.palantir.model; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Writable; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; public class PtOntologyResource extends PtModelBase { private long id; private long type; private String path; private byte[] contents; private boolean deleted; private long createdBy; private long timeCreated; private long lastModified; public long getId() { return id; } public void setId(long id) { this.id = id; } public long getType() { return type; } public void setType(long type) { this.type = type; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public byte[] getContents() { return contents; } public void setContents(byte[] contents) { this.contents = contents; } public boolean isDeleted() { return deleted; } public void setDeleted(boolean deleted) { this.deleted = deleted; } public long getCreatedBy() { return createdBy; } public void setCreatedBy(long createdBy) { this.createdBy = createdBy; } public long getTimeCreated() { return timeCreated; } public void setTimeCreated(long timeCreated) { this.timeCreated = timeCreated; } public long getLastModified() { return lastModified; } public void setLastModified(long lastModified) { this.lastModified = lastModified; } @Override public Writable getKey() { return new LongWritable(getId()); } @Override public void write(DataOutput out) throws IOException { out.writeLong(getId()); out.writeLong(getType()); out.writeUTF(getPath()); out.write(getContents()); out.writeBoolean(isDeleted()); out.writeLong(getCreatedBy()); out.writeLong(getTimeCreated()); out.writeLong(getLastModified()); } @Override public void readFields(DataInput in) throws IOException { throw new RuntimeException("not implemented"); } }