Class IfcApi
java.lang.Object
nl.bimbase.bimworks.client.apis.SubApi
nl.bimbase.bimworks.client.apis.IfcApi
IFC related API calls
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondownloadErrorModel(UUID errorUuid) Download the IFC model of an Error.downloadIfcXml(UUID versionUuid) The model as ifcXML (generated on first request and cached server-side).downloadModel(UUID versionUuid) Download a model, this will return the byte-for-byte original IFC modeldownloadModel(UUID versionUuid, String targetSchema) Download a model converted to another IFC schema.downloadModel(UUID versionUuid, String targetSchema, boolean validate) Export a new IFC model from one or more models, filtered by the given query.com.fasterxml.jackson.databind.node.ObjectNodegetSchemaConversionReport(UUID versionUuid, String targetSchema) The log of a schema conversion: what it lost, added and changed.Methods inherited from class SubApi
getBimWorksClient
-
Constructor Details
-
IfcApi
-
-
Method Details
-
downloadModel
Download a model, this will return the byte-for-byte original IFC model- Parameters:
versionUuid- The UUID of the Version to download- Returns:
- An InputStream that can be used to get the content. Responsibility for closing this stream is on the caller.
- Throws:
BimWorksException
-
downloadModel
Download a model converted to another IFC schema. The only supported conversion is IFC2X3 to IFC4; every other one is refused with a message that names the supported ones. A target schema that the model already has is no error: the model is then downloaded as it was uploaded. The objects of the converted file have the express ids and the GlobalIds of the model. A conversion can take minutes for a large model, so this call waits up to 30 minutes; the converted file is kept on the server, so a second request is answered at once. What the conversion lost and added is ingetSchemaConversionReport(UUID, String).- Parameters:
versionUuid- The UUID of the Version to downloadtargetSchema- The schema to convert to, for example "IFC4"- Returns:
- An InputStream that can be used to get the content. Responsibility for closing this stream is on the caller.
- Throws:
BimWorksException
-
downloadModel
public InputStream downloadModel(UUID versionUuid, String targetSchema, boolean validate) throws BimWorksException - Parameters:
validate- Whether the server holds the converted file against the schema check before it serves it. This about doubles the time of a conversion. The result of the check is part of the response of the task, which this method does not return: use the task API for it- Throws:
BimWorksException
-
getSchemaConversionReport
public com.fasterxml.jackson.databind.node.ObjectNode getSchemaConversionReport(UUID versionUuid, String targetSchema) throws BimWorksException The log of a schema conversion: what it lost, added and changed. Reads a log, converts nothing: a conversion that was never made is not found.- Parameters:
versionUuid- A Version that was made by CONVERT SCHEMA, or, with targetSchema, the Version that was downloaded convertedtargetSchema- Only for a converted download, the schema it was converted to; else null- Returns:
- conversion (the numbers), report (the findings, capped per rule) and detail_log
- Throws:
BimWorksException
-
downloadErrorModel
Download the IFC model of an Error. This can be useful for debugging.- Parameters:
errorUuid- The UUID of the Error- Returns:
- An InputStream that can be used to get the content. Responsibility for closing this stream is on the caller.
- Throws:
BimWorksException
-
export
Export a new IFC model from one or more models, filtered by the given query. The query should not contain a GET statement, if it does it is ignored. Only subclasses of IfcProduct can be queried. By default all geometric representations are also included in the results. The decomposes/containment tree all the way up to IfcProject is included for each result. For IfcProject also the UnitAssignment is always included, as are the OwnerHistory objects, to make it a valid IFC file. When querying multiple models, it should be expected that the resulting IFC will not be valid. For example it will usually have multiple IfcProject entities.- Parameters:
versionUuids- The Version UUIDs of the models to queryquery- The BQL query to filter by- Returns:
- An InputStream, closing the InputStream is the responsibility of the caller
- Throws:
BimWorksException
-
downloadIfcXml
The model as ifcXML (generated on first request and cached server-side). The caller closes the stream.- Throws:
BimWorksException
-