I hope somebody can help me and tell me what im doing wrong. Thanks in advance.
Im excecuting this script on the groovy console in gate
new File("../outfile.csv").withWriterAppend{ out ->doc.getAnnotations().each {anno ->
if( anno.getFeatures() )
anno.getFeatures().each{ fName, fValue ->
out.writeLine(/"${doc.getName()}","${anno.getType()}","${doc.stringFor(anno)}",${anno.start()},${anno.end()},"${fName}","${fValue}"/)
}
else
out.writeLine(/"${doc.getName()}","${anno.getType()}","${doc.stringFor(anno)}",${anno.start()},${anno.end()},,/)
}}
But im havig this exception
groovy.lang.MissingPropertyException: No such property: doc for class: ConsoleScript0
at ConsoleScript0$_run_closure1.doCall(ConsoleScript0:2)
at ConsoleScript0.run(ConsoleScript0:1)
at gate.groovy.GroovySupport$1$1$1.run(GroovySupport.java:134)