uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandre Patry (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-3303) Add a way to alias types in RUTA (e.g. "IMPORT type AS alias")
Date Tue, 01 Oct 2013 02:10:23 GMT

    [ https://issues.apache.org/jira/browse/UIMA-3303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782563#comment-13782563
] 

Alexandre Patry commented on UIMA-3303:
---------------------------------------

I really like those suggestions, but the more I think about prefixes for typesystems, the
less I am sure about them because package names and type system names are not necessarily
correlated. I would thus suggest the following modifications:

{noformat}
IMPORT * FROM <typesystemfile> -- make all the types from typesystem available in the
current namespace
IMPORT FROM <typesystemfile>   -- shorthand
IMPORT TYPESYSTEM <typesystemfile> -- make all the types from typesystem available using
their long name
IMPORT PACKAGE <package> (FROM <typesystemfile>)? AS <prefix> -- make the
specified package from typesystemfile (or detected automatically) available using prefix
IMPORT <package>.<type> (FROM  <typesystemfile>)?  -- make the specified
type from typesystemfile (or detected automatically) available in the current namespace
IMPORT <package>.<type> (FROM  <typesystemfile>)? AS <alias>  -- make
the specified type from typesystemfile (or detected automatically) available as the given
alias
IMPORT <package>.* (FROM <typesystemfile>)? -- make all the types from the specified
package and typesystemfile (or detected automatically) available in the current namespace
{noformat}

For the automatically detected type variants, are there some implications on the tooling (descriptor
generation, type completion, etc.)?

> 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
>
> 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:
> {{
> IMPORT com.example.a.T AS TA}
> IMPORT com.example.b.T AS TB}
> }}
> For a discussion about it, see UIMA-3292.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message