コード例 #1
0
  @Override
  public Double execute()
      throws UserException, BimserverDatabaseException, BimserverLockConflictException {
    Revision revision = getDatabaseSession().get(roid, OldQuery.getDefault());

    IfcProduct ifcProduct =
        getDatabaseSession()
            .get(
                oid,
                new OldQuery(
                    bimServer
                        .getMetaDataManager()
                        .getPackageMetaData(revision.getProject().getSchema()),
                    revision.getProject().getId(),
                    revision.getId(),
                    revision.getOid()));
    return ifcProduct.getGeometry().getVolume();
  }
コード例 #2
0
 @Override
 public Set<User> execute()
     throws UserException, BimserverLockConflictException, BimserverDatabaseException {
   User actingUser = getUserByUoid(authorization.getUoid());
   Condition condition = new IsOfTypeCondition(StorePackage.eINSTANCE.getUser());
   condition =
       condition.and(
           new Not(
               new AttributeCondition(
                   StorePackage.eINSTANCE.getUser_UserType(), new EnumLiteral(UserType.SYSTEM))));
   if (actingUser.getUserType() != UserType.ADMIN) {
     condition =
         condition.and(
             new AttributeCondition(
                 StorePackage.eINSTANCE.getUser_State(), new EnumLiteral(ObjectState.ACTIVE)));
   }
   return CollectionUtils.mapToSet(
       getDatabaseSession().query(condition, User.class, OldQuery.getDefault()));
 }
コード例 #3
0
  @Override
  public SGeometryInfo execute()
      throws UserException, BimserverDatabaseException, BimserverLockConflictException {
    Revision revision = getDatabaseSession().get(roid, OldQuery.getDefault());

    IfcProduct ifcProduct =
        getDatabaseSession()
            .get(
                oid,
                new OldQuery(
                    bimServer
                        .getMetaDataManager()
                        .getPackageMetaData(revision.getProject().getSchema()),
                    revision.getProject().getId(),
                    revision.getId(),
                    revision.getOid()));
    GeometryInfo geometry = ifcProduct.getGeometry();
    SGeometryInfo convertToSObject = bimServer.getSConverter().convertToSObject(geometry);
    return convertToSObject;
  }