-
Notifications
You must be signed in to change notification settings - Fork 616
XSLT Serializer
Ruben de Laat edited this page Jul 10, 2013
·
2 revisions
To make it easier to create serializer plugins for the BIMserver, you can also define the serialization logic in an XSLT which takes an IFCXML file as the source file.
Note: Is is usually a lot easier to start from existing code, have a look at the "Cobie2Serializer" project for example.
- Follow the Plugin Development page
- Add a dependancy to the "XsltSerializer" project
- Create an xslt file in the plugin-project's root
- Change the "TestPlugin" file:
private boolean initialized;
private URL url;
@Override
public void init(PluginManager pluginManager) throws PluginException {
url = pluginManager.getPluginContext(this).getResourceAsUrl("[NAME OF YOUR XSLT FILE]");
initialized = true;
}
@Override
public String getName() {
return getClass().getName();
}
@Override
public String getDescription() {
return "Cobie2";
}
@Override
public String getVersion() {
return "1.0";
}
@Override
public boolean isInitialized() {
return initialized;
}
@Override
public Set<Class<? extends Plugin>> getRequiredPlugins() {
return null;
}
@Override
public EmfSerializer createSerializer() {
XsltSerializer xsltSerializer = new XsltSerializer();
xsltSerializer.setXsltUrl(url);
return xsltSerializer;
}
@Override
public String getDefaultSerializerName() {
return "[NAME OF YOUR SERIALIZER]";
}
@Override
public String getDefaultExtension() {
return "[EXTENSION OF YOU XSLT TARGET FORMAT]";
}
@Override
public String getDefaultContentType() {
return "[CONTENT TYPE OF YOUR XSLT TARGET FORMAT]";
}
Example project structure: http://bimserver.googlecode.com/svn/wiki/images/cobieproject.png
You can pass parameters to the XSLT engine the following way. You have to add this code to the init method.
xsltSerializer.addParameter(new XsltParameter("topic", "component"));
Get Started
- Quick Guide
- Requirements Version 1.2
- Requirements Version 1.3
- Requirements Version 1.4
- Requirements Version 1.4 > 2015-09-12
- Requirements Version 1.5
- Download
- JAR Starter
- Setup
Deployment
- Ubuntu installation 1.3
- Windows installation
- Security
- Memory Usage
- More memory
- Performance statistics
- Large databases
Developers
- Service Interfaces
- Common functions
- Data Model
- Low Level Calls
- Endpoints
Clients
BIMServer Developers
- Plugins in 1.5
- Plugin Development
- Eclipse
- Eclipse Modeling Framework
- Embedding
- Terminology
- Database/Versioning
- IFC STEP Encoding
- Communication
- Global changes in 1.5
- Writing a service
- Services/Notifications
- BIMserver 1.5 Developers
- Extended data
- Extended data schema
- Object IDM
New developments
- New remote service interface
- Plugins new
- Deprecated
- New query language
- Visual query language
- Reorganizing BIMserver JavaScript API
General