Search in sources :

Example 16 with SerializerException

use of org.bimserver.plugins.serializers.SerializerException in project BIMserver by opensourceBIM.

the class TestSimultaniousDownloadWithCaching method start.

private void start() {
    BimServerConfig config = new BimServerConfig();
    Path homeDir = Paths.get("home");
    try {
        if (Files.isDirectory(homeDir)) {
            PathUtils.removeDirectoryWithContent(homeDir);
        }
    } catch (IOException e) {
        e.printStackTrace();
    }
    config.setClassPath(System.getProperty("java.class.path"));
    config.setHomeDir(homeDir);
    config.setPort(8080);
    config.setStartEmbeddedWebServer(true);
    config.setResourceFetcher(new LocalDevelopmentResourceFetcher(Paths.get("../")));
    final BimServer bimServer = new BimServer(config);
    try {
        LocalDevPluginLoader.loadPlugins(bimServer.getPluginManager(), null);
        bimServer.start();
        if (bimServer.getServerInfo().getServerState() == ServerState.NOT_SETUP) {
            bimServer.getService(AdminInterface.class).setup("http://localhost", "Administrator", "admin@bimserver.org", "admin", null, null, null);
        }
    } catch (PluginException e2) {
        e2.printStackTrace();
    } catch (ServerException e) {
        e.printStackTrace();
    } catch (DatabaseInitException e) {
        e.printStackTrace();
    } catch (BimserverDatabaseException e) {
        e.printStackTrace();
    } catch (DatabaseRestartRequiredException e) {
        e.printStackTrace();
    } catch (UserException e) {
        e.printStackTrace();
    }
    try {
        final ServiceMap serviceMap = bimServer.getServiceFactory().get(AccessMethod.INTERNAL);
        ServiceInterface serviceInterface = serviceMap.get(ServiceInterface.class);
        SettingsInterface settingsInterface = serviceMap.get(SettingsInterface.class);
        final AuthInterface authInterface = serviceMap.get(AuthInterface.class);
        serviceInterface = bimServer.getServiceFactory().get(authInterface.login("admin@bimserver.org", "admin"), AccessMethod.INTERNAL).get(ServiceInterface.class);
        settingsInterface.setCacheOutputFiles(true);
        settingsInterface.setGenerateGeometryOnCheckin(false);
        final SProject project = serviceMap.getServiceInterface().addProject("test", "ifc2x3tc1");
        SDeserializerPluginConfiguration deserializerByName = serviceMap.getServiceInterface().getDeserializerByName("IfcStepDeserializer");
        Path file = Paths.get("../TestData/data/AC11-Institute-Var-2-IFC.ifc");
        serviceInterface.checkin(project.getOid(), "test", deserializerByName.getOid(), file.toFile().length(), file.getFileName().toString(), new DataHandler(new FileDataSource(file.toFile())), false, true);
        final SProject projectUpdate = serviceMap.getServiceInterface().getProjectByPoid(project.getOid());
        ThreadPoolExecutor executor = new ThreadPoolExecutor(20, 20, 1, TimeUnit.HOURS, new ArrayBlockingQueue<Runnable>(1000));
        for (int i = 0; i < 20; i++) {
            executor.execute(new Runnable() {

                @Override
                public void run() {
                    try {
                        ServiceMap serviceMap2 = bimServer.getServiceFactory().get(authInterface.login("admin@bimserver.org", "admin"), AccessMethod.INTERNAL);
                        SSerializerPluginConfiguration serializerPluginConfiguration = serviceMap.getServiceInterface().getSerializerByName("Ifc2x3");
                        Long download = serviceMap2.getServiceInterface().download(Collections.singleton(projectUpdate.getLastRevisionId()), DefaultQueries.allAsString(), serializerPluginConfiguration.getOid(), true);
                        SDownloadResult downloadData = serviceMap2.getServiceInterface().getDownloadData(download);
                        if (downloadData.getFile().getDataSource() instanceof CacheStoringEmfSerializerDataSource) {
                            CacheStoringEmfSerializerDataSource c = (CacheStoringEmfSerializerDataSource) downloadData.getFile().getDataSource();
                            try {
                                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                                c.writeToOutputStream(baos, null);
                                System.out.println(baos.size());
                            } catch (SerializerException e) {
                                e.printStackTrace();
                            }
                        } else {
                            ByteArrayOutputStream baos = new ByteArrayOutputStream();
                            IOUtils.copy(downloadData.getFile().getInputStream(), baos);
                            System.out.println(baos.size());
                        }
                        serviceMap2.getServiceInterface().cleanupLongAction(download);
                    } catch (ServerException e) {
                        e.printStackTrace();
                    } catch (UserException e) {
                        e.printStackTrace();
                    } catch (FileNotFoundException e) {
                        e.printStackTrace();
                    } catch (IOException e) {
                        e.printStackTrace();
                    } catch (PublicInterfaceNotFoundException e1) {
                        e1.printStackTrace();
                    }
                }
            });
        }
        executor.shutdown();
        executor.awaitTermination(1, TimeUnit.HOURS);
        bimServer.stop();
    } catch (ServerException e1) {
        e1.printStackTrace();
    } catch (UserException e1) {
        e1.printStackTrace();
    } catch (InterruptedException e) {
        e.printStackTrace();
    } catch (PublicInterfaceNotFoundException e2) {
        e2.printStackTrace();
    }
}
Also used : AuthInterface(org.bimserver.shared.interfaces.AuthInterface) SDeserializerPluginConfiguration(org.bimserver.interfaces.objects.SDeserializerPluginConfiguration) ServiceMap(org.bimserver.webservices.ServiceMap) CacheStoringEmfSerializerDataSource(org.bimserver.plugins.serializers.CacheStoringEmfSerializerDataSource) FileNotFoundException(java.io.FileNotFoundException) DataHandler(javax.activation.DataHandler) BimServerConfig(org.bimserver.BimServerConfig) SProject(org.bimserver.interfaces.objects.SProject) LocalDevelopmentResourceFetcher(org.bimserver.shared.LocalDevelopmentResourceFetcher) DatabaseInitException(org.bimserver.database.berkeley.DatabaseInitException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) ServiceInterface(org.bimserver.shared.interfaces.ServiceInterface) FileDataSource(javax.activation.FileDataSource) UserException(org.bimserver.shared.exceptions.UserException) Path(java.nio.file.Path) ServerException(org.bimserver.shared.exceptions.ServerException) BimServer(org.bimserver.BimServer) PluginException(org.bimserver.shared.exceptions.PluginException) SDownloadResult(org.bimserver.interfaces.objects.SDownloadResult) IOException(java.io.IOException) ByteArrayOutputStream(java.io.ByteArrayOutputStream) SerializerException(org.bimserver.plugins.serializers.SerializerException) AdminInterface(org.bimserver.shared.interfaces.AdminInterface) SettingsInterface(org.bimserver.shared.interfaces.SettingsInterface) PublicInterfaceNotFoundException(org.bimserver.shared.exceptions.PublicInterfaceNotFoundException) DatabaseRestartRequiredException(org.bimserver.database.DatabaseRestartRequiredException) SSerializerPluginConfiguration(org.bimserver.interfaces.objects.SSerializerPluginConfiguration) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor)

Example 17 with SerializerException

use of org.bimserver.plugins.serializers.SerializerException in project BIMserver by opensourceBIM.

the class LongStreamingDownloadAction method getCheckoutResult.

public SCheckoutResult getCheckoutResult() throws SerializerException {
    if (checkoutResult.getFile() != null) {
        // already populated by cached file
        return checkoutResult;
    }
    if (serializer == null) {
        if (messagingStreamingSerializer == null) {
            throw new SerializerException("No serializer");
        } else {
            DataSource dataSource = new MessagingStreamingDataSource(messagingStreamingSerializer);
            checkoutResult.setFile(new DataHandler(dataSource));
        }
    } else {
        if (getBimServer().getNewDiskCacheManager().isEnabled()) {
            NewDiskCacheOutputStream diskCacheOutputStream = getBimServer().getNewDiskCacheManager().startCaching(downloadDescriptor);
            CacheStoringStreamingSerializerDataSource cacheStoringEmfSerializerDataSource = new CacheStoringStreamingSerializerDataSource(serializer, diskCacheOutputStream, new DoneListener() {

                @Override
                public void done() {
                    changeActionState(ActionState.FINISHED, "Done", 100);
                }
            });
            checkoutResult.setFile(new DataHandler(cacheStoringEmfSerializerDataSource));
        } else {
            StreamingSerializerDataSource streamingSerializerDataSource = new StreamingSerializerDataSource(filename, serializer, new DoneListener() {

                @Override
                public void done() {
                    changeActionState(ActionState.FINISHED, "Done", 100);
                }
            });
            checkoutResult.setFile(new DataHandler(streamingSerializerDataSource));
        }
    }
    return checkoutResult;
}
Also used : NewDiskCacheOutputStream(org.bimserver.cache.NewDiskCacheOutputStream) DoneListener(org.bimserver.plugins.serializers.DoneListener) StreamingSerializerDataSource(org.bimserver.plugins.serializers.StreamingSerializerDataSource) CacheStoringStreamingSerializerDataSource(org.bimserver.plugins.serializers.CacheStoringStreamingSerializerDataSource) DataHandler(javax.activation.DataHandler) SerializerException(org.bimserver.plugins.serializers.SerializerException) CacheStoringStreamingSerializerDataSource(org.bimserver.plugins.serializers.CacheStoringStreamingSerializerDataSource) StreamingSerializerDataSource(org.bimserver.plugins.serializers.StreamingSerializerDataSource) CacheStoringStreamingSerializerDataSource(org.bimserver.plugins.serializers.CacheStoringStreamingSerializerDataSource) DataSource(javax.activation.DataSource)

Example 18 with SerializerException

use of org.bimserver.plugins.serializers.SerializerException in project BIMserver by opensourceBIM.

the class MessagingSerializerInputstream method read.

@Override
public int read() throws IOException {
    try {
        if (buffer != null && pos < buffer.length) {
            return buffer[pos++];
        } else {
            buffer = null;
            while (buffer == null) {
                out.reset();
                boolean write = messagingStreamingSerializer.writeMessage(out, null);
                byte[] newBuffer = out.toByteArray();
                if (newBuffer.length > 0) {
                    buffer = newBuffer;
                    pos = 1;
                    return buffer[0];
                }
                if (!write) {
                    return -1;
                }
            }
        }
        return 0;
    } catch (SerializerException e) {
        throw new IOException(e);
    }
}
Also used : IOException(java.io.IOException) SerializerException(org.bimserver.plugins.serializers.SerializerException)

Example 19 with SerializerException

use of org.bimserver.plugins.serializers.SerializerException in project BIMserver by opensourceBIM.

the class OfflineGeometryGenerator method generateForAllElements.

public void generateForAllElements() {
    try {
        serializer.init(model, null, true);
        InputStream in = new SerializerInputstream(serializer);
        renderEngineModel = renderEngine.openModel(in);
        final RenderEngineSettings settings = new RenderEngineSettings();
        settings.setPrecision(Precision.SINGLE);
        settings.setIndexFormat(IndexFormat.AUTO_DETECT);
        settings.setGenerateNormals(true);
        settings.setGenerateTriangles(true);
        settings.setGenerateWireFrame(false);
        final RenderEngineFilter renderEngineFilter = new RenderEngineFilter();
        renderEngineModel.setSettings(settings);
        renderEngineModel.setFilter(renderEngineFilter);
        renderEngineModel.generateGeneralGeometry();
        for (IfcProduct ifcProduct : model.getAllWithSubTypes(IfcProduct.class)) {
            generateGeometry(ifcProduct);
        }
    } catch (SerializerException e) {
        e.printStackTrace();
    } catch (RenderEngineException e) {
        e.printStackTrace();
    }
}
Also used : RenderEngineFilter(org.bimserver.plugins.renderengine.RenderEngineFilter) InputStream(java.io.InputStream) IfcProduct(org.bimserver.models.ifc2x3tc1.IfcProduct) SerializerInputstream(org.bimserver.plugins.serializers.SerializerInputstream) RenderEngineSettings(org.bimserver.plugins.renderengine.RenderEngineSettings) SerializerException(org.bimserver.plugins.serializers.SerializerException) RenderEngineException(org.bimserver.plugins.renderengine.RenderEngineException)

Example 20 with SerializerException

use of org.bimserver.plugins.serializers.SerializerException in project BIMserver by opensourceBIM.

the class ServiceImpl method triggerRevisionService.

@Override
public void triggerRevisionService(Long roid, Long soid) throws ServerException, UserException {
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        Revision revision = (Revision) session.get(StorePackage.eINSTANCE.getRevision(), roid, OldQuery.getDefault());
        if (revision == null) {
            throw new UserException("No revision found for roid " + roid);
        }
        NewService newService = session.get(StorePackage.eINSTANCE.getNewService(), soid, OldQuery.getDefault());
        if (revision.getServicesLinked().contains(newService)) {
            // We don't want no loops
            return;
        }
        String url = newService.getResourceUrl();
        SerializerPluginConfiguration serializer = newService.getSerializer();
        PackageMetaData pmd = getBimServer().getMetaDataManager().getPackageMetaData(revision.getProject().getSchema());
        Query query = DefaultQueries.all(pmd);
        Long topicId = download(Collections.singleton(roid), new JsonQueryObjectModelConverter(pmd).toJson(query).toString(), serializer.getOid(), false);
        CloseableHttpClient httpclient = HttpClients.createDefault();
        HttpPost httpPost = new HttpPost(url);
        LongAction<?> longAction = getBimServer().getLongActionManager().getLongAction(topicId);
        if (longAction == null) {
            throw new UserException("No data found for topicId " + topicId);
        }
        SCheckoutResult result;
        if (longAction instanceof LongStreamingDownloadAction) {
            LongStreamingDownloadAction longStreamingDownloadAction = (LongStreamingDownloadAction) longAction;
            if (longStreamingDownloadAction.getErrors().isEmpty()) {
                try {
                    result = longStreamingDownloadAction.getCheckoutResult();
                } catch (SerializerException e) {
                    throw new UserException(e);
                }
            } else {
                LOGGER.error(longStreamingDownloadAction.getErrors().get(0));
                throw new ServerException(longStreamingDownloadAction.getErrors().get(0));
            }
        } else {
            LongDownloadOrCheckoutAction longDownloadAction = (LongDownloadOrCheckoutAction) longAction;
            try {
                longDownloadAction.waitForCompletion();
                if (longDownloadAction.getErrors().isEmpty()) {
                    result = longDownloadAction.getCheckoutResult();
                } else {
                    LOGGER.error(longDownloadAction.getErrors().get(0));
                    throw new ServerException(longDownloadAction.getErrors().get(0));
                }
            } catch (Exception e) {
                LOGGER.error("", e);
                throw new ServerException(e);
            }
        }
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        LOGGER.info("Starting serialization");
        DataSource datasource = result.getFile().getDataSource();
        if (datasource instanceof ExtendedDataSource) {
            ((ExtendedDataSource) datasource).writeToOutputStream(baos, null);
        }
        LOGGER.info("Serialization done");
        if (newService.getAccessToken() != null) {
            httpPost.setHeader("Authorization", "Bearer " + newService.getAccessToken());
        }
        httpPost.setHeader("Input-Type", newService.getInput());
        httpPost.setHeader("Output-Type", newService.getOutput());
        httpPost.setEntity(new ByteArrayEntity(baos.toByteArray()));
        CloseableHttpResponse response = httpclient.execute(httpPost);
        LOGGER.info(response.getStatusLine().toString());
        if (response.getStatusLine().getStatusCode() == 401) {
            throw new UserException("Remote service responded with a 401 Unauthorized");
        } else if (response.getStatusLine().getStatusCode() == 200) {
            Header[] headers = response.getHeaders("Content-Disposition");
            String filename = "unknown";
            if (headers.length > 0) {
                String contentDisposition = headers[0].getValue();
                if (contentDisposition.contains("filename=")) {
                    int indexOf = contentDisposition.indexOf("filename=") + 10;
                    filename = contentDisposition.substring(indexOf, contentDisposition.indexOf("\"", indexOf + 1));
                } else {
                    filename = contentDisposition;
                }
            }
            Header dataTitleHeader = response.getFirstHeader("Data-Title");
            String dataTitle = newService.getName() + " Results";
            if (dataTitleHeader != null) {
                dataTitle = dataTitleHeader.getValue();
            }
            byte[] responseBytes = ByteStreams.toByteArray(response.getEntity().getContent());
            Action action = newService.getAction();
            if (action instanceof StoreExtendedData) {
                SFile file = new SFile();
                file.setData(responseBytes);
                file.setFilename(filename);
                file.setSize(responseBytes.length);
                file.setMime(response.getHeaders("Content-Type")[0].getValue());
                Long fileId = uploadFile(file);
                SExtendedData extendedData = new SExtendedData();
                extendedData.setAdded(new Date());
                extendedData.setRevisionId(roid);
                extendedData.setTitle(dataTitle);
                extendedData.setSize(responseBytes.length);
                extendedData.setFileId(fileId);
                extendedData.setSchemaId(getExtendedDataSchemaByName(newService.getOutput()).getOid());
                addExtendedDataToRevision(roid, extendedData);
            } else if (action instanceof CheckinRevision) {
                CheckinRevision checkinRevision = (CheckinRevision) action;
                Project targetProject = checkinRevision.getProject();
                String extension = filename.substring(filename.lastIndexOf(".") + 1);
                SDeserializerPluginConfiguration deserializer = getSuggestedDeserializerForExtension(extension, targetProject.getOid());
                Long checkingTopicId = initiateCheckin(targetProject.getOid(), deserializer.getOid());
                checkinInitiatedInternal(checkingTopicId, targetProject.getOid(), dataTitle, deserializer.getOid(), (long) responseBytes.length, filename, new DataHandler(new ByteArrayDataSource(responseBytes, "ifc")), false, true, newService.getOid());
            }
        } else {
            throw new UserException("Remote service responded with a " + response.getStatusLine());
        }
    } catch (Exception e) {
        handleException(e);
    } finally {
        session.close();
    }
}
Also used : HttpPost(org.apache.http.client.methods.HttpPost) CheckinDatabaseAction(org.bimserver.database.actions.CheckinDatabaseAction) GetDeserializerByIdDatabaseAction(org.bimserver.database.actions.GetDeserializerByIdDatabaseAction) GetAllReadableProjectsDatabaseAction(org.bimserver.database.actions.GetAllReadableProjectsDatabaseAction) AddModelCheckerToProjectDatabaseAction(org.bimserver.database.actions.AddModelCheckerToProjectDatabaseAction) GetProjectsByNameDatabaseAction(org.bimserver.database.actions.GetProjectsByNameDatabaseAction) AddProjectDatabaseAction(org.bimserver.database.actions.AddProjectDatabaseAction) LongCheckinAction(org.bimserver.longaction.LongCheckinAction) GetUserByUoidDatabaseAction(org.bimserver.database.actions.GetUserByUoidDatabaseAction) UpdateProjectDatabaseAction(org.bimserver.database.actions.UpdateProjectDatabaseAction) BimDatabaseAction(org.bimserver.database.actions.BimDatabaseAction) GetAllExtendedDataSchemasDatabaseAction(org.bimserver.database.actions.GetAllExtendedDataSchemasDatabaseAction) UserHasRightsDatabaseAction(org.bimserver.database.actions.UserHasRightsDatabaseAction) GetAllNewServicesOfProjectDatabaseAction(org.bimserver.database.actions.GetAllNewServicesOfProjectDatabaseAction) LongBranchAction(org.bimserver.longaction.LongBranchAction) AddExtendedDataToProjectDatabaseAction(org.bimserver.database.actions.AddExtendedDataToProjectDatabaseAction) GetSerializerByContentTypeDatabaseAction(org.bimserver.database.actions.GetSerializerByContentTypeDatabaseAction) GetSubProjectsDatabaseAction(org.bimserver.database.actions.GetSubProjectsDatabaseAction) SAction(org.bimserver.interfaces.objects.SAction) LongStreamingDownloadAction(org.bimserver.longaction.LongStreamingDownloadAction) GetModelCheckerOidDatabaseAction(org.bimserver.database.actions.GetModelCheckerOidDatabaseAction) BranchToExistingProjectDatabaseAction(org.bimserver.database.actions.BranchToExistingProjectDatabaseAction) RegenerateGeometryDatabaseAction(org.bimserver.database.actions.RegenerateGeometryDatabaseAction) GetAllAuthorizedUsersOfProjectDatabaseAction(org.bimserver.database.actions.GetAllAuthorizedUsersOfProjectDatabaseAction) GetAllCheckoutsOfRevisionDatabaseAction(org.bimserver.database.actions.GetAllCheckoutsOfRevisionDatabaseAction) ChangeUserTypeDatabaseAction(org.bimserver.database.actions.ChangeUserTypeDatabaseAction) GetAvailableClassesDatabaseAction(org.bimserver.database.actions.GetAvailableClassesDatabaseAction) GetProjectByPoidDatabaseAction(org.bimserver.database.actions.GetProjectByPoidDatabaseAction) RemoveServiceFromProjectDatabaseAction(org.bimserver.database.actions.RemoveServiceFromProjectDatabaseAction) StreamingCheckinDatabaseAction(org.bimserver.database.actions.StreamingCheckinDatabaseAction) UploadFileDatabaseAction(org.bimserver.database.actions.UploadFileDatabaseAction) DeleteUserDatabaseAction(org.bimserver.database.actions.DeleteUserDatabaseAction) LongGenericAction(org.bimserver.longaction.LongGenericAction) AddUserDatabaseAction(org.bimserver.database.actions.AddUserDatabaseAction) GetQueryEngineByNameDatabaseAction(org.bimserver.database.actions.GetQueryEngineByNameDatabaseAction) RemoveNewServiceFromProjectDatabaseAction(org.bimserver.database.actions.RemoveNewServiceFromProjectDatabaseAction) GetAllProjectsSmallDatabaseAction(org.bimserver.database.actions.GetAllProjectsSmallDatabaseAction) RemoveModelCheckerFromProjectDatabaseAction(org.bimserver.database.actions.RemoveModelCheckerFromProjectDatabaseAction) LongAction(org.bimserver.longaction.LongAction) LongDownloadAction(org.bimserver.longaction.LongDownloadAction) GetAllUsersDatabaseAction(org.bimserver.database.actions.GetAllUsersDatabaseAction) GetAllProjectsDatabaseAction(org.bimserver.database.actions.GetAllProjectsDatabaseAction) LongDownloadOrCheckoutAction(org.bimserver.longaction.LongDownloadOrCheckoutAction) GetRevisionSummaryDatabaseAction(org.bimserver.database.actions.GetRevisionSummaryDatabaseAction) UndeleteUserDatabaseAction(org.bimserver.database.actions.UndeleteUserDatabaseAction) GetSerializerByIdDatabaseAction(org.bimserver.database.actions.GetSerializerByIdDatabaseAction) GetAllWritableProjectsDatabaseAction(org.bimserver.database.actions.GetAllWritableProjectsDatabaseAction) SetRevisionTagDatabaseAction(org.bimserver.database.actions.SetRevisionTagDatabaseAction) GetExtendedDataSchemaByIdDatabaseAction(org.bimserver.database.actions.GetExtendedDataSchemaByIdDatabaseAction) GetOidByGuidDatabaseAction(org.bimserver.database.actions.GetOidByGuidDatabaseAction) AddExtendedDataSchemaDatabaseAction(org.bimserver.database.actions.AddExtendedDataSchemaDatabaseAction) RemoveUserFromExtendedDataSchemaDatabaseAction(org.bimserver.database.actions.RemoveUserFromExtendedDataSchemaDatabaseAction) GetUserByUserNameDatabaseAction(org.bimserver.database.actions.GetUserByUserNameDatabaseAction) GetAllRevisionsByUserDatabaseAction(org.bimserver.database.actions.GetAllRevisionsByUserDatabaseAction) GetSerializerByNameDatabaseAction(org.bimserver.database.actions.GetSerializerByNameDatabaseAction) GetIfcHeaderDatabaseAction(org.bimserver.database.actions.GetIfcHeaderDatabaseAction) GetCheckoutWarningsDatabaseAction(org.bimserver.database.actions.GetCheckoutWarningsDatabaseAction) GetQueryEngineByIdDatabaseAction(org.bimserver.database.actions.GetQueryEngineByIdDatabaseAction) UpdateRevisionDatabaseAction(org.bimserver.database.actions.UpdateRevisionDatabaseAction) BranchToNewProjectDatabaseAction(org.bimserver.database.actions.BranchToNewProjectDatabaseAction) AddServiceToProjectDatabaseAction(org.bimserver.database.actions.AddServiceToProjectDatabaseAction) GetTopLevelProjectByNameDatabaseAction(org.bimserver.database.actions.GetTopLevelProjectByNameDatabaseAction) GetAllRelatedProjectsDatabaseAction(org.bimserver.database.actions.GetAllRelatedProjectsDatabaseAction) DeleteServiceDatabaseAction(org.bimserver.database.actions.DeleteServiceDatabaseAction) GetDeserializerByNameDatabaseAction(org.bimserver.database.actions.GetDeserializerByNameDatabaseAction) AddLocalServiceToProjectDatabaseAction(org.bimserver.database.actions.AddLocalServiceToProjectDatabaseAction) GetAllCheckoutsOfProjectDatabaseAction(org.bimserver.database.actions.GetAllCheckoutsOfProjectDatabaseAction) LogAction(org.bimserver.models.log.LogAction) GetAllCheckoutsByUserDatabaseAction(org.bimserver.database.actions.GetAllCheckoutsByUserDatabaseAction) GetVolumeDatabaseAction(org.bimserver.database.actions.GetVolumeDatabaseAction) LongCheckoutAction(org.bimserver.longaction.LongCheckoutAction) UpdateModelCheckerDatabaseAction(org.bimserver.database.actions.UpdateModelCheckerDatabaseAction) UpdateGeoTagDatabaseAction(org.bimserver.database.actions.UpdateGeoTagDatabaseAction) Action(org.bimserver.models.store.Action) AddExtendedDataToRevisionDatabaseAction(org.bimserver.database.actions.AddExtendedDataToRevisionDatabaseAction) DeleteProjectDatabaseAction(org.bimserver.database.actions.DeleteProjectDatabaseAction) GetExtendedDataSchemaByNameDatabaseAction(org.bimserver.database.actions.GetExtendedDataSchemaByNameDatabaseAction) RemoveUserFromProjectDatabaseAction(org.bimserver.database.actions.RemoveUserFromProjectDatabaseAction) GetExtendedDataByIdDatabaseAction(org.bimserver.database.actions.GetExtendedDataByIdDatabaseAction) GetAllRevisionsOfProjectDatabaseAction(org.bimserver.database.actions.GetAllRevisionsOfProjectDatabaseAction) GetProjectsOfUserDatabaseAction(org.bimserver.database.actions.GetProjectsOfUserDatabaseAction) SLogAction(org.bimserver.interfaces.objects.SLogAction) AddUserToExtendedDataSchemaDatabaseAction(org.bimserver.database.actions.AddUserToExtendedDataSchemaDatabaseAction) GetSubProjectByNameDatabaseAction(org.bimserver.database.actions.GetSubProjectByNameDatabaseAction) GetNrPrimitivesDatabaseAction(org.bimserver.database.actions.GetNrPrimitivesDatabaseAction) GetRevisionDatabaseAction(org.bimserver.database.actions.GetRevisionDatabaseAction) ValidateModelCheckerDatabaseAction(org.bimserver.database.actions.ValidateModelCheckerDatabaseAction) AddNewServiceToProjectDatabaseAction(org.bimserver.database.actions.AddNewServiceToProjectDatabaseAction) LongStreamingCheckinAction(org.bimserver.longaction.LongStreamingCheckinAction) UndeleteProjectDatabaseAction(org.bimserver.database.actions.UndeleteProjectDatabaseAction) CompareDatabaseAction(org.bimserver.database.actions.CompareDatabaseAction) GetAllNonAuthorizedProjectsOfUserDatabaseAction(org.bimserver.database.actions.GetAllNonAuthorizedProjectsOfUserDatabaseAction) GetAllServicesOfProjectDatabaseAction(org.bimserver.database.actions.GetAllServicesOfProjectDatabaseAction) GetGeometryInfoDatabaseAction(org.bimserver.database.actions.GetGeometryInfoDatabaseAction) GetAvailableClassesInRevisionDatabaseAction(org.bimserver.database.actions.GetAvailableClassesInRevisionDatabaseAction) AddModelCheckerDatabaseAction(org.bimserver.database.actions.AddModelCheckerDatabaseAction) AddUserToProjectDatabaseAction(org.bimserver.database.actions.AddUserToProjectDatabaseAction) GetCheckinWarningsDatabaseAction(org.bimserver.database.actions.GetCheckinWarningsDatabaseAction) UserHasCheckinRightsDatabaseAction(org.bimserver.database.actions.UserHasCheckinRightsDatabaseAction) GetAreaDatabaseAction(org.bimserver.database.actions.GetAreaDatabaseAction) GetGeoTagDatabaseAction(org.bimserver.database.actions.GetGeoTagDatabaseAction) GetAllNonAuthorizedUsersOfProjectDatabaseAction(org.bimserver.database.actions.GetAllNonAuthorizedUsersOfProjectDatabaseAction) GetAllModelCheckersDatabaseAction(org.bimserver.database.actions.GetAllModelCheckersDatabaseAction) JsonQueryObjectModelConverter(org.bimserver.database.queries.om.JsonQueryObjectModelConverter) SDeserializerPluginConfiguration(org.bimserver.interfaces.objects.SDeserializerPluginConfiguration) Query(org.bimserver.database.queries.om.Query) OldQuery(org.bimserver.database.OldQuery) DatabaseSession(org.bimserver.database.DatabaseSession) SCheckoutResult(org.bimserver.interfaces.objects.SCheckoutResult) LongStreamingDownloadAction(org.bimserver.longaction.LongStreamingDownloadAction) DataHandler(javax.activation.DataHandler) CheckinRevision(org.bimserver.models.store.CheckinRevision) LongDownloadOrCheckoutAction(org.bimserver.longaction.LongDownloadOrCheckoutAction) ByteArrayEntity(org.apache.http.entity.ByteArrayEntity) CloseableHttpResponse(org.apache.http.client.methods.CloseableHttpResponse) UserException(org.bimserver.shared.exceptions.UserException) SFile(org.bimserver.interfaces.objects.SFile) NewService(org.bimserver.models.store.NewService) SNewService(org.bimserver.interfaces.objects.SNewService) ByteArrayDataSource(javax.mail.util.ByteArrayDataSource) CloseableHttpClient(org.apache.http.impl.client.CloseableHttpClient) ServerException(org.bimserver.shared.exceptions.ServerException) PackageMetaData(org.bimserver.emf.PackageMetaData) ByteArrayOutputStream(java.io.ByteArrayOutputStream) SerializerException(org.bimserver.plugins.serializers.SerializerException) IOException(java.io.IOException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) SerializerException(org.bimserver.plugins.serializers.SerializerException) BcfException(org.opensourcebim.bcf.BcfException) UserException(org.bimserver.shared.exceptions.UserException) CannotBeScheduledException(org.bimserver.longaction.CannotBeScheduledException) DeserializeException(org.bimserver.plugins.deserializers.DeserializeException) ServerException(org.bimserver.shared.exceptions.ServerException) MessagingException(javax.mail.MessagingException) AddressException(javax.mail.internet.AddressException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) MalformedURLException(java.net.MalformedURLException) Date(java.util.Date) ByteArrayDataSource(javax.mail.util.ByteArrayDataSource) ExtendedDataSource(org.bimserver.plugins.serializers.ExtendedDataSource) DataSource(javax.activation.DataSource) StoreExtendedData(org.bimserver.models.store.StoreExtendedData) Project(org.bimserver.models.store.Project) SProject(org.bimserver.interfaces.objects.SProject) ExtendedDataSource(org.bimserver.plugins.serializers.ExtendedDataSource) SRevision(org.bimserver.interfaces.objects.SRevision) Revision(org.bimserver.models.store.Revision) CheckinRevision(org.bimserver.models.store.CheckinRevision) SExtendedDataAddedToRevision(org.bimserver.interfaces.objects.SExtendedDataAddedToRevision) SIfcHeader(org.bimserver.interfaces.objects.SIfcHeader) Header(org.apache.http.Header) SExtendedData(org.bimserver.interfaces.objects.SExtendedData) SerializerPluginConfiguration(org.bimserver.models.store.SerializerPluginConfiguration) SSerializerPluginConfiguration(org.bimserver.interfaces.objects.SSerializerPluginConfiguration)

Aggregations

SerializerException (org.bimserver.plugins.serializers.SerializerException)26 IOException (java.io.IOException)11 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)8 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)6 UserException (org.bimserver.shared.exceptions.UserException)6 Serializer (org.bimserver.plugins.serializers.Serializer)5 FileNotFoundException (java.io.FileNotFoundException)4 ByteBuffer (java.nio.ByteBuffer)4 DataHandler (javax.activation.DataHandler)4 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)4 IfcModelInterfaceException (org.bimserver.emf.IfcModelInterfaceException)4 GeometryData (org.bimserver.models.geometry.GeometryData)4 DeserializeException (org.bimserver.plugins.deserializers.DeserializeException)4 SerializerPlugin (org.bimserver.plugins.serializers.SerializerPlugin)4 PluginException (org.bimserver.shared.exceptions.PluginException)4 ServerException (org.bimserver.shared.exceptions.ServerException)4 DataSource (javax.activation.DataSource)3 DatabaseSession (org.bimserver.database.DatabaseSession)3 IfcModelInterface (org.bimserver.emf.IfcModelInterface)3 IfcProduct (org.bimserver.models.ifc2x3tc1.IfcProduct)3