if (obj instanceof Serializable) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(baos);
out.writeObject(obj);
AbsConcept absSerializable = new AbsConcept(SERIALIZABLE);
String stringValue = new String(Base64.encodeBase64(baos.toByteArray()), "US-ASCII");
absSerializable.set(SERIALIZABLE_VALUE, stringValue);
return absSerializable;
}
catch (Throwable t) {
throw new OntologyException("Error in object serialization.", t);
}