Hi, org.apache.uima.ruta.ImportStatementsTest and org.apache.uima.ruta.StrictImportTest are throwing a NPE (as they should). I will add a comment to UIMA-3377 that this is maybe a good place to create a runtime exception that is more informative.
Peter Am 09.01.2014 05:47, schrieb Alexandre Patry (JIRA): > [ > https://issues.apache.org/jira/browse/UIMA-3303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13866313#comment-13866313 > ] > > Alexandre Patry commented on UIMA-3303: > --------------------------------------- > > I finally had the time to push some code :) > > ruta-core now supports the following grammar when running in strict mode : > > {noformat} > import := "IMPORT" (all|package|type) ("FROM" source)? (AS alias)? > all := "*" // Allows import with long names > package := "PACKAGE" <package name> // Allows imports with short names > type := <type name> // Allows imports of single types > source := qualifiedClasspathSource > qualifiedClasspathSource := <org.apache.uima.types.MyTypes> > alias := <package alias (prefix) or type alias (alternative type name)> > {noformat} > > Unit tests are in {{org.apache.uima.ruta.ImportStatementsTest}} and I will > update the manual later this week. > > >> Add a way to alias types in RUTA (e.g. "IMPORT type AS alias") >> -------------------------------------------------------------- >> >> Key: UIMA-3303 >> URL: https://issues.apache.org/jira/browse/UIMA-3303 >> Project: UIMA >> Issue Type: Bug >> Components: ruta >> Reporter: Alexandre Patry >> Assignee: Alexandre Patry >> >> It would be convenient to define type aliases in RUTA script. >> One scenario where it would help is when many types have the same short name: >> {noformat} >> IMPORT com.example.a.T AS TA >> IMPORT com.example.b.T AS TB >> {noformat} >> For a discussion about it, see UIMA-3292. > > > -- > This message was sent by Atlassian JIRA > (v6.1.5#6160) >
