Reference·Java · nl.bimbase.bimworks.client.apisJava

IfcApi

CLASS in nl.bimbase.bimworks.client.apis.

API catalogue · nl.bimbase.bimworks.client.apis · CLASS

Java#
public class IfcApi

IFC related API calls

Inheritance and interfaces#

Members#

Member Kind Description
IfcApi(BimWorksClient) CONSTRUCTOR
downloadModel(UUID) METHOD Download a model, this will return the byte-for-byte original IFC model
downloadModel(UUID, String) METHOD 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 s…
downloadModel(UUID, String, boolean) METHOD As #downloadModel(UUID, String).
getSchemaConversionReport(UUID, String) METHOD 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.
downloadErrorModel(UUID) METHOD Download the IFC model of an Error. This can be useful for debugging.
export(Set<UUID>, String) METHOD 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 sub…
downloadIfcXml(UUID) METHOD The model as ifcXML (generated on first request and cached server-side). The caller closes the stream.

IfcApi(BimWorksClient)#

Java#
public IfcApi(nl.bimbase.bimworks.client.BimWorksClient bimWorksClient)

Parameters#

Name Type Description
bimWorksClient BimWorksClient

downloadModel(UUID)#

Java#
public java.io.InputStream downloadModel(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksException

Download a model, this will return the byte-for-byte original IFC model

Parameters#

Name Type Description
versionUuid java.util.UUID 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.

Exceptions#

  • BimWorksException —

downloadModel(UUID, String)#

Java#
public java.io.InputStream downloadModel(java.util.UUID versionUuid, java.lang.String targetSchema) throws nl.bimbase.bimworks.client.BimWorksException

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 in #getSchemaConversionReport(UUID, String).

Parameters#

Name Type Description
versionUuid java.util.UUID The UUID of the Version to download
targetSchema java.lang.String 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.

Exceptions#

  • BimWorksException —

downloadModel(UUID, String, boolean)#

Java#
public java.io.InputStream downloadModel(java.util.UUID versionUuid, java.lang.String targetSchema, boolean validate) throws nl.bimbase.bimworks.client.BimWorksException

As #downloadModel(UUID, String).

Parameters#

Name Type Description
versionUuid java.util.UUID
targetSchema java.lang.String
validate boolean 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

getSchemaConversionReport(UUID, String)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getSchemaConversionReport(java.util.UUID versionUuid, java.lang.String targetSchema) throws nl.bimbase.bimworks.client.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#

Name Type Description
versionUuid java.util.UUID A Version that was made by CONVERT SCHEMA, or, with targetSchema, the Version that was downloaded converted
targetSchema java.lang.String 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

Exceptions#

  • BimWorksException —

downloadErrorModel(UUID)#

Java#
public java.io.InputStream downloadErrorModel(java.util.UUID errorUuid) throws nl.bimbase.bimworks.client.BimWorksException

Download the IFC model of an Error. This can be useful for debugging.

Parameters#

Name Type Description
errorUuid java.util.UUID 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.

Exceptions#

  • BimWorksException —

export(Set<UUID>, String)#

Java#
public java.io.InputStream export(java.util.Set<java.util.UUID> versionUuids, java.lang.String query) throws nl.bimbase.bimworks.client.BimWorksException

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#

Name Type Description
versionUuids java.util.Set<java.util.UUID> The Version UUIDs of the models to query
query java.lang.String The BQL query to filter by

Returns#

An InputStream, closing the InputStream is the responsibility of the caller

Exceptions#

  • BimWorksException —

downloadIfcXml(UUID)#

Java#
public java.io.InputStream downloadIfcXml(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksException

The model as ifcXML (generated on first request and cached server-side). The caller closes the stream.

Parameters#

Name Type Description
versionUuid java.util.UUID

Inherited members#

  • java.lang.Object#equals(java.lang.Object)
  • java.lang.Object#toString()
  • java.lang.Object#wait(long)
  • java.lang.Object#wait(long,int)
  • java.lang.Object#wait()
  • java.lang.Object#finalize()
  • java.lang.Object#getClass()
  • java.lang.Object#hashCode()
  • java.lang.Object#clone()
  • java.lang.Object#notify()
  • java.lang.Object#notifyAll()
  • getBimWorksClient()