From PTC Integrity 10.5 and higher, Items can be versioned by using the CheckInCommand.
Extract from Integrity documentation : To track the evolution of your documents through the project lifecycle, you create unique document versions at various stages of the project. You create a new version by checking in your document or content item. Creating a document or content version provides you with an exact record of the document as it was at the time you performed the check-in operation.
When you create a new version by checking in a document or a content item, the live document can continue to evolve through its lifecycle, while document version cannot be edited once you create it.
Item.
Options.OPTION_IGNORE_INCLUDE_VERSIONED_ITEM
MDWorkbench workbench = null;
Model model = null;
try {
// configure connection on Integrity server
Map<String, Object> options = new HashMap<String, Object>();
options.put(Options.OPTION_IGNORE_CONNECTOR_UI, true);
options.put(Options.OPTION_INTEGRATION_POINT_KIND, IntegrationPointKind.SERVER);
options.put(Options.OPTION_SERVER, "myserver");
options.put(Options.OPTION_PORT, "7001");
options.put(Options.OPTION_USER, "myUser");
options.put(Options.OPTION_PASSWORD, "myPassword");
// restrict content to one particular project
DatabaseConfiguration configuration = new DatabaseConfiguration();
configuration.getProjects().add("/MyProject");
options.put(Options.OPTION_DATABASE_CONFIGURATION, configuration);
// Set this option to true to disable include versioned items
options.put(Options.OPTION_IGNORE_INCLUDE_VERSIONED_ITEM, true);
// read the model
model = workbench.getMetamodelManager().getMetamodel(IntegrityPackage.eINSTANCE).createModel();
model.read("Application", "", options);
// get the database instance
Database database = model.<Database>getInstances(IntegrityPackage.Literals.DATABASE).first();
// access on-demand the content of the database
List<Type> types = database.getTypes();
...
}
finally {
// disposes the model
if (model != null) {
model.clear();
}
if (workbench != null) {
workbench.shutdown();
}
}