Removed wrong toString() function
This commit is contained in:
parent
52f776277a
commit
a6cc4b870c
|
@ -1,13 +1,11 @@
|
||||||
package org.gcube.informationsystem.base.impl.entities;
|
package org.gcube.informationsystem.base.impl.entities;
|
||||||
|
|
||||||
import java.io.StringWriter;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName;
|
import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
import org.gcube.informationsystem.base.impl.ElementImpl;
|
import org.gcube.informationsystem.base.impl.ElementImpl;
|
||||||
import org.gcube.informationsystem.base.reference.entities.EntityElement;
|
import org.gcube.informationsystem.base.reference.entities.EntityElement;
|
||||||
import org.gcube.informationsystem.model.reference.properties.Metadata;
|
import org.gcube.informationsystem.model.reference.properties.Metadata;
|
||||||
import org.gcube.informationsystem.serialization.ElementMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
|
@ -47,20 +45,4 @@ public abstract class EntityElementImpl extends ElementImpl implements EntityEle
|
||||||
this.metadata = metadata;
|
this.metadata = metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString(){
|
|
||||||
StringWriter stringWriter = new StringWriter();
|
|
||||||
try {
|
|
||||||
ElementMapper.marshal(this, stringWriter);
|
|
||||||
return stringWriter.toString();
|
|
||||||
}catch(Exception e){
|
|
||||||
try {
|
|
||||||
ElementMapper.marshal(this.metadata, stringWriter);
|
|
||||||
return stringWriter.toString();
|
|
||||||
} catch(Exception e1){
|
|
||||||
return super.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue