Package edu.stanford.bmir.protege.web.server.inject

Examples of edu.stanford.bmir.protege.web.server.inject.ManchesterSyntaxParsingContextModule


        return UserHasProjectWritePermissionValidator.get();
    }

    @Override
    protected ChangeListGenerator<Void> getChangeListGenerator(SetManchesterSyntaxFrameAction action, OWLAPIProject project, ExecutionContext executionContext) {
        Injector injector = Guice.createInjector(new ProjectModule(project), new ManchesterSyntaxParsingContextModule(action));
        ManchesterSyntaxChangeGenerator changeGenerator = injector.getInstance(ManchesterSyntaxChangeGenerator.class);
        List<OWLOntologyChange> changes = changeGenerator.generateChanges(action.getFromRendering(), action.getToRendering());
        return new FixedChangeListGenerator<Void>(changes);
    }
View Full Code Here


    @Override
    protected GetManchesterSyntaxFrameCompletionsResult execute(GetManchesterSyntaxFrameCompletionsAction action, OWLAPIProject project, ExecutionContext executionContext) {
        String syntax = action.getSyntax();
        int from = action.getFrom();
        String triggerText = syntax.substring(0, from) + "\u0000";
        Injector injector = Guice.createInjector(new ProjectModule(project), new ManchesterSyntaxParsingContextModule(action));
        ManchesterSyntaxFrameParser parser = injector.getInstance(ManchesterSyntaxFrameParser.class);
        try {
            parser.parse(triggerText);
        } catch (ParserException e) {
//            ManchesterOWLSyntaxTokenizer tokenizer = new ManchesterOWLSyntaxTokenizer(syntax);
View Full Code Here

    }

    @Override
    protected CheckManchesterSyntaxFrameResult execute(CheckManchesterSyntaxFrameAction action, OWLAPIProject project, ExecutionContext executionContext) {
//        try {
            Injector injector = Guice.createInjector(new ProjectModule(project), new ManchesterSyntaxParsingContextModule(action));
            ManchesterSyntaxChangeGenerator changeGenerator = injector.getInstance(ManchesterSyntaxChangeGenerator.class);
            try {
                List<OWLOntologyChange> changeList = changeGenerator.generateChanges(action.getFrom(), action.getTo());
                if(changeList.isEmpty()) {
                    return new CheckManchesterSyntaxFrameResult(ManchesterSyntaxFrameParseResult.UNCHANGED);
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.server.inject.ManchesterSyntaxParsingContextModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.