Package edu.stanford.bmir.protege.web.client.rpc.data

Examples of edu.stanford.bmir.protege.web.client.rpc.data.DocumentId


     * the documentId of the upload.
     * @return The document Id
     */
    public DocumentId getDocumentId() {
        if(jsonObject == null) {
            return new DocumentId("");
        }
        if(!wasUploadAccepted()) {
            return new DocumentId("");
        }
        JSONValue value = jsonObject.get(FileUploadResponseAttributes.UPLOAD_FILE_ID.name());
        if(value == null) {
            return new DocumentId("");
        }
        JSONString string = value.isString();
        if(string == null) {
            return new DocumentId("");
        }
        return new DocumentId(string.stringValue().trim());
    }
View Full Code Here


        return NullValidator.get();
    }

    @Override
    public GetCSVGridResult execute(GetCSVGridAction action, ExecutionContext executionContext) {
        DocumentId documentId = action.getCSVDocumentId();
        File file = new File(FileUploadConstants.UPLOADS_DIRECTORY, documentId.getDocumentId());
        if(!file.exists()) {
            throw new RuntimeException("CSV file does not exist");
        }
        CSVGrid grid = getCSVGrid(file, action.getRowLimit());
        return new GetCSVGridResult(grid);
View Full Code Here

    private synchronized void createProjectFromSources(NewProjectSettings newProjectSettings) throws IOException {
        try {
            File uploadsDirectory = FileUploadConstants.UPLOADS_DIRECTORY;

            DocumentId documentId = newProjectSettings.getSourceDocumentId();
            File uploadedFile = new File(uploadsDirectory, documentId.getDocumentId());
            UploadedProjectSourcesExtractor extractor = new UploadedProjectSourcesExtractor(new ZipInputStreamChecker
                                                                                                    (),
                                                                                            new ZipArchiveProjectSourcesExtractor(new DefaultTempFileFactory(), new DefaultRootOntologyDocumentMatcher()), new SingleDocumentProjectSourcesExtractor());

            if (uploadedFile.exists()) {
View Full Code Here

    private void createProjectFromUpload(UploadFileInfo data, FileUploadResponse result) {
        UIUtil.showLoadProgessBar(PROGRESS_DIALOG_TITLE, "Creating project");
        ProjectManagerServiceAsync projectManagerService = GWT.create(ProjectManagerService.class);
        UserId userId = Application.get().getUserId();
        DocumentId documentId = result.getDocumentId();
        String projectName = data.getProjectSettings().getProjectName();
        String projectDescription = data.getProjectSettings().getProjectDescription();
        ProjectType projectType = data.getProjectSettings().getProjectType();
        NewProjectSettings newProjectSettings = new NewProjectSettings(userId, projectName, projectDescription, projectType, documentId);
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.client.rpc.data.DocumentId

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.