本文整理汇总了Java中org.bimserver.plugins.PluginConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java PluginConfiguration类的具体用法?Java PluginConfiguration怎么用?Java PluginConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PluginConfiguration类属于org.bimserver.plugins包,在下文中一共展示了PluginConfiguration类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getRenderEnginePool
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public RenderEnginePool getRenderEnginePool(Schema schema, String className, PluginConfiguration pluginConfiguration) throws PluginException {
if (pools.containsKey(schema)) {
Map<String, RenderEnginePool> map = pools.get(schema);
if (map.containsKey(className)) {
return map.get(className);
} else {
// Maybe this plugin has been installed after startup, let's have a look in the PluginManager
RenderEnginePlugin renderEnginePlugin = bimServer.getPluginManager().getRenderEnginePlugin(className, true);
if (renderEnginePlugin == null) {
throw new PluginException("No render engine found for className " + className);
} else {
RenderEnginePool renderEnginePool = renderEnginePoolFactory.newRenderEnginePool(new RenderEngineFactory(){
@Override
public RenderEngine createRenderEngine() throws RenderEngineException {
return renderEnginePlugin.createRenderEngine(pluginConfiguration, schema.name());
}});
map.put(className, renderEnginePool);
return renderEnginePool;
}
}
} else {
throw new PluginException("No render engine found for schema " + schema);
}
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:25,代码来源:RenderEnginePools.java
示例2: createMerger
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public org.bimserver.plugins.modelmerger.ModelMerger createMerger(DatabaseSession databaseSession, Long currentUoid) throws MergeException, BimserverDatabaseException {
DatabaseSession session = bimServer.getDatabase().createSession();
try {
User user = databaseSession.get(StorePackage.eINSTANCE.getUser(), currentUoid, OldQuery.getDefault());
UserSettings userSettings = user.getUserSettings();
ModelMergerPluginConfiguration modelMergerObject = userSettings.getDefaultModelMerger();
if (modelMergerObject != null) {
ModelMergerPlugin modelMergerPlugin = bimServer.getPluginManager().getModelMergerPlugin(modelMergerObject.getPluginDescriptor().getPluginClassName(), true);
if (modelMergerPlugin != null) {
org.bimserver.plugins.modelmerger.ModelMerger modelMerger = modelMergerPlugin.createModelMerger(new PluginConfiguration(modelMergerObject.getSettings()));
return modelMerger;
} else {
throw new MergeException("No Model Merger found " + modelMergerObject.getPluginDescriptor().getPluginClassName());
}
} else {
throw new MergeException("No configured Model Merger found");
}
} finally {
session.close();
}
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:23,代码来源:MergerFactory.java
示例3: getModelCompare
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public org.bimserver.plugins.modelcompare.ModelCompare getModelCompare() throws ModelCompareException, BimserverDatabaseException {
Revision revision1 = getDatabaseSession().get(roid1, OldQuery.getDefault());
Revision revision2 = getDatabaseSession().get(roid2, OldQuery.getDefault());
PackageMetaData packageMetaData = bimServer.getMetaDataManager().getPackageMetaData(revision1.getProject().getSchema());
if (revision1.getProject().getSchema().equals(revision2.getProject().getSchema())) {
ModelComparePluginConfiguration modelCompareObject = getDatabaseSession().get(StorePackage.eINSTANCE.getModelComparePluginConfiguration(), mcid, OldQuery.getDefault());
if (modelCompareObject != null) {
ModelComparePlugin modelComparePlugin = bimServer.getPluginManager().getModelComparePlugin(modelCompareObject.getPluginDescriptor().getPluginClassName(), true);
if (modelComparePlugin != null) {
org.bimserver.plugins.modelcompare.ModelCompare modelCompare = modelComparePlugin.createModelCompare(new PluginConfiguration(modelCompareObject.getSettings()), packageMetaData);
return modelCompare;
} else {
throw new ModelCompareException("No Model Compare found " + modelCompareObject.getPluginDescriptor().getPluginClassName());
}
} else {
throw new ModelCompareException("No configured Model Compare found");
}
} else {
throw new ModelCompareException("Not the same schema");
}
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:22,代码来源:CompareDatabaseAction.java
示例4: getModelCompare
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public org.bimserver.plugins.modelcompare.ModelCompare getModelCompare() throws ModelCompareException, BimserverDatabaseException {
Revision revision1 = getDatabaseSession().get(roid1, OldQuery.getDefault());
Revision revision2 = getDatabaseSession().get(roid2, OldQuery.getDefault());
PackageMetaData packageMetaData = getBimServer().getMetaDataManager().getPackageMetaData(revision1.getProject().getSchema());
if (revision1.getProject().getSchema().equals(revision2.getProject().getSchema())) {
ModelComparePluginConfiguration modelCompareObject = getDatabaseSession().get(StorePackage.eINSTANCE.getModelComparePluginConfiguration(), mcid, OldQuery.getDefault());
if (modelCompareObject != null) {
ModelComparePlugin modelComparePlugin = getBimServer().getPluginManager().getModelComparePlugin(modelCompareObject.getPluginDescriptor().getPluginClassName(), true);
if (modelComparePlugin != null) {
org.bimserver.plugins.modelcompare.ModelCompare modelCompare = modelComparePlugin.createModelCompare(new PluginConfiguration(modelCompareObject.getSettings()), packageMetaData);
return modelCompare;
} else {
throw new ModelCompareException("No Model Compare found " + modelCompareObject.getPluginDescriptor().getPluginClassName());
}
} else {
throw new ModelCompareException("No configured Model Compare found");
}
} else {
throw new ModelCompareException("Schemas not the same");
}
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:22,代码来源:DownloadCompareDatabaseAction.java
示例5: start
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
private void start() {
Path src = TestFile.RIOLERING_TEST.getFile();
PluginManager pluginManager;
try {
pluginManager = LocalDevPluginLoader.createPluginManager(Paths.get("home"));
DeserializerPlugin deserializerPlugin = pluginManager.getFirstDeserializer("ifc", Schema.IFC2X3TC1, true);
Deserializer deserializer = deserializerPlugin.createDeserializer(new PluginConfiguration());
deserializer.init(pluginManager.getMetaDataManager().getPackageMetaData("ifc2x3tc1"));
try {
model = DeserializerUtils.readFromFile(deserializer, src);
} catch (Exception e) {
e.printStackTrace();
}
step1();
} catch (PluginException e1) {
e1.printStackTrace();
}
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:19,代码来源:IfcRioleringTest.java
示例6: readModel
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public IfcModelInterface readModel(Path file) {
PluginManager pluginManager;
try {
pluginManager = LocalDevPluginLoader.createPluginManager(Paths.get("home"));
DeserializerPlugin deserializerPlugin = pluginManager.getFirstDeserializer("ifc", Schema.IFC2X3TC1, true);
Deserializer deserializer = deserializerPlugin.createDeserializer(new PluginConfiguration());
deserializer.init(pluginManager.getMetaDataManager().getPackageMetaData("ifc2x3tc1"));
try {
IfcModelInterface model = DeserializerUtils.readFromFile(deserializer, file);
return model;
} catch (Exception e) {
e.printStackTrace();
}
} catch (PluginException e1) {
e1.printStackTrace();
}
return null;
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:19,代码来源:GuidHighlighterTester.java
示例7: createModelCompare
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public ModelCompare createModelCompare(PluginConfiguration pluginConfiguration, PackageMetaData packageMetaData) throws ModelCompareException {
Set<EPackage> packages = new HashSet<>();
packages.add(packageMetaData.getEPackage());
ObjectIDM objectIDM = new HideAllInversesObjectIDM(packages, packageMetaData);
return new NameBasedModelCompare(objectIDM);
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:8,代码来源:NameBasedModelComparePlugin.java
示例8: createRenderEngine
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public RenderEngine createRenderEngine(PluginConfiguration pluginConfiguration, String schema) throws RenderEngineException {
try {
return new IfcOpenShellEngine(filename);
} catch (IOException e) {
throw new RenderEngineException(e);
}
}
开发者ID:BenzclyZhang,项目名称:BimSPARQL,代码行数:8,代码来源:IfcOpenShellEnginePlugin.java
示例9: regenerateGeometry
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public void regenerateGeometry(Long croid) throws ServerException, UserException {
LOGGER.info("Regenerating geometry for concrete revision" + croid);
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
session.setOverwriteEnabled(true); // Normally we wouldn't be allowed to change existing data
ConcreteRevision concreteRevision = session.get(StorePackage.eINSTANCE.getConcreteRevision(), croid, OldQuery.getDefault());
PackageMetaData packageMetaData = getBimServer().getMetaDataManager().getPackageMetaData(concreteRevision.getProject().getSchema());
IfcModelInterface model = new BasicIfcModel(packageMetaData, null);
session.getMap(model, new OldQuery(packageMetaData, concreteRevision.getProject().getId(), concreteRevision.getId(), -1));
User user = session.get(getAuthorization().getUoid(), OldQuery.getDefault());
UserSettings userSettings = user.getUserSettings();
RenderEnginePluginConfiguration defaultRenderEngine = userSettings.getDefaultRenderEngine();
if (defaultRenderEngine == null) {
throw new BimBotsException("No default render engine has been selected for this user");
}
RenderEnginePool pool = getBimServer().getRenderEnginePools().getRenderEnginePool(model.getPackageMetaData().getSchema(), defaultRenderEngine.getPluginDescriptor().getPluginClassName(), new PluginConfiguration(defaultRenderEngine.getSettings()));
new GeometryGenerator(getBimServer()).generateGeometry(pool, getBimServer().getPluginManager(), session, model, concreteRevision.getProject().getId(), concreteRevision.getId(), true, null);
session.commit();
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:29,代码来源:AdminServiceImpl.java
示例10: execute
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public SerializerPluginConfiguration execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {
for (SerializerPluginConfiguration serializerPluginConfiguration : getDatabaseSession().getAllOfType(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), SerializerPluginConfiguration.class, OldQuery.getDefault())) {
PluginConfiguration pluginConfiguration = new PluginConfiguration(serializerPluginConfiguration.getSettings());
String string = pluginConfiguration.getString(SerializerPlugin.CONTENT_TYPE);
if (string != null && string.equals(contentType)) {
return serializerPluginConfiguration;
}
}
return null;
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:12,代码来源:GetSerializerByContentTypeDatabaseAction.java
示例11: init
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public void init(Thread thread) {
super.init(thread);
if (getBimServer().getServerSettingsCache().getServerSettings().getCacheOutputFiles() && getBimServer().getDiskCacheManager().contains(downloadParameters)) {
return;
}
ObjectIDM objectIDM = null;
if (downloadParameters.getUseObjectIDM()) {
session = getBimServer().getDatabase().createSession();
try {
SerializerPluginConfiguration serializerPluginConfiguration = session.get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), downloadParameters.getSerializerOid(), OldQuery.getDefault());
if (serializerPluginConfiguration != null) {
ObjectIDMPluginConfiguration objectIdm = serializerPluginConfiguration.getObjectIDM();
if (objectIdm != null) {
ObjectIDMPlugin objectIDMPlugin = getBimServer().getPluginManager().getObjectIDMByName(objectIdm.getPluginDescriptor().getPluginClassName(), true);
if (objectIDMPlugin != null) {
objectIDM = objectIDMPlugin.getObjectIDM(new PluginConfiguration());
}
}
}
} catch (BimserverDatabaseException e) {
LOGGER.error("", e);
} finally {
session.close();
}
}
session = getBimServer().getDatabase().createSession();
switch (downloadParameters.getDownloadType()) {
case DOWNLOAD_BY_NEW_JSON_QUERY:
action = new DownloadByNewJsonQueryDatabaseAction(getBimServer(), session, accessMethod, downloadParameters.getRoids(), downloadParameters.getJsonQuery(), downloadParameters.getSerializerOid(), getAuthorization());
break;
case DOWNLOAD_PROJECTS:
action = new DownloadProjectsDatabaseAction(getBimServer(), session, accessMethod, downloadParameters.getRoids(), downloadParameters.getSerializerOid(), getAuthorization(), objectIDM);
break;
case DOWNLOAD_COMPARE:
action = new DownloadCompareDatabaseAction(getBimServer(), session, accessMethod, downloadParameters.getRoids(), downloadParameters.getModelCompareIdentifier(), downloadParameters.getCompareType(), getAuthorization(), objectIDM);
break;
}
action.addProgressListener(this);
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:41,代码来源:LongDownloadAction.java
示例12: getExtension
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public String getExtension(Long serializerOid) {
DatabaseSession session = bimDatabase.createSession();
try {
SerializerPluginConfiguration found = session.get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), serializerOid, OldQuery.getDefault());
if (found != null) {
return new PluginConfiguration(found.getSettings()).getString(SerializerPlugin.EXTENSION);
}
} catch (BimserverDatabaseException e) {
LOGGER.error("", e);
} finally {
session.close();
}
return null;
}
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:15,代码来源:SerializerFactory.java
示例13: createDeserializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public StreamingDeserializer createDeserializer(PluginConfiguration pluginConfiguration) {
return new Ifc4StepStreamingDeserializer();
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:5,代码来源:Ifc4StepStreamingDeserializerPlugin.java
示例14: createDeserializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public Deserializer createDeserializer(PluginConfiguration pluginConfiguration) {
return new Ifc4StepDeserializer(Schema.IFC4);
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:5,代码来源:Ifc4StepDeserializerPlugin.java
示例15: createDeserializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public StreamingDeserializer createDeserializer(PluginConfiguration pluginConfiguration) {
return new Ifc2x3tc1StepStreamingDeserializer();
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:5,代码来源:Ifc2x3tc1StepStreamingDeserializerPlugin.java
示例16: createDeserializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public Deserializer createDeserializer(PluginConfiguration pluginConfiguration) {
return new Ifc2x3tc1StepDeserializer();
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:5,代码来源:Ifc2x3tc1StepDeserializerPlugin.java
示例17: Ifc4StepSerializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public Ifc4StepSerializer(PluginConfiguration pluginConfiguration) {
super(pluginConfiguration);
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:4,代码来源:Ifc4StepSerializer.java
示例18: IfcStepSerializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
public IfcStepSerializer(PluginConfiguration pluginConfiguration) {
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:3,代码来源:IfcStepSerializer.java
示例19: createSerializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public Serializer createSerializer(PluginConfiguration pluginConfiguration) {
return new Ifc2x3tc1StepSerializer(pluginConfiguration);
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:5,代码来源:Ifc2x3tc1StepSerializerPlugin.java
示例20: createSerializer
import org.bimserver.plugins.PluginConfiguration; //导入依赖的package包/类
@Override
public Serializer createSerializer(PluginConfiguration pluginConfiguration) {
return new Ifc4StepSerializer(pluginConfiguration);
}
开发者ID:opensourceBIM,项目名称:IfcPlugins,代码行数:5,代码来源:Ifc4StepSerializerPlugin.java
注:本文中的org.bimserver.plugins.PluginConfiguration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论