Examples of BlockType


Examples of com.claymus.site.module.block.BlockType

    int accessLevel = module.getAccessLevel(user.getRole());
    if(accessLevel < ModuleHelper.ADD)
      throw new UserException();

    BlockType blockData = BlockData.getBlockType(blockDTO.getClass().getSimpleName().replace("DTO", ""));
    Block block = new Block(blockData, blockDTO.getLocation());
    block.update(blockDTO);
    block = BlockData.createBlock(block);
    if(block == null)
      throw new ServerException("Block could not be created. Please try again later.");
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.block.BlockType

            // [TxTDB:PATCH-UP]
            // synchronized - needed for multiple reader?
            synchronized (block)
            {
                int x = block.getByteBuffer().getInt(0) ;
                BlockType type = getType(x) ;
               
                if ( type != BPTREE_BRANCH && type != BPTREE_LEAF )
                    throw new BPTreeException("Wrong block type: "+type) ;
                int count = decodeCount(x) ;
                return overlay(bpTree, block, (type==BPTREE_LEAF), count) ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.block.BlockType

            // Just the count needs to be fixed up.
//            ByteBuffer bb = node.getBackingByteBuffer() ;
//            BlockType bType = (node.isLeaf ? BPTREE_LEAF : BPTREE_BRANCH ) ;

            Block block = node.getBackingBlock() ;
            BlockType bType = (node.isLeaf ? BPTREE_LEAF : BPTREE_BRANCH ) ;

            int c = encodeCount(bType, node.getCount()) ;
            block.getByteBuffer().putInt(0, c) ;
            return block ;
        }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.block.BlockType

            // [TxTDB:PATCH-UP]
            // synchronized - needed for multiple reader?
            synchronized (block)
            {
                int x = block.getByteBuffer().getInt(0) ;
                BlockType type = getType(x) ;
               
                if ( type != BPTREE_BRANCH && type != BPTREE_LEAF )
                    throw new BPTreeException("Wrong block type: "+type) ;
                int count = decodeCount(x) ;
                return overlay(bpTree, block, (type==BPTREE_LEAF), count) ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.block.BlockType

            // Just the count needs to be fixed up.
//            ByteBuffer bb = node.getBackingByteBuffer() ;
//            BlockType bType = (node.isLeaf ? BPTREE_LEAF : BPTREE_BRANCH ) ;

            Block block = node.getBackingBlock() ;
            BlockType bType = (node.isLeaf ? BPTREE_LEAF : BPTREE_BRANCH ) ;

            int c = encodeCount(bType, node.getCount()) ;
            block.getByteBuffer().putInt(0, c) ;
            return block ;
        }
View Full Code Here

Examples of com.sk89q.worldedit.blocks.BlockType

            str.append("Missing these blocks: ");
            int size = missingBlocks.size();
            int i = 0;

            for (Integer id : missingBlocks.keySet()) {
                BlockType type = BlockType.fromID(id);

                str.append(type != null
                        ? type.getName() + " (" + id + ")"
                        : id.toString());

                str.append(" [Amt: ").append(missingBlocks.get(id)).append("]");

                ++i;
View Full Code Here

Examples of com.sk89q.worldedit.blocks.BlockType

    @Override
    public boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session, com.sk89q.worldedit.util.Location clicked) {
        World world = (World) clicked.getExtent();
        EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1, player);
        targetBlock = (editSession).getBlock(clicked.toVector());
        BlockType type = BlockType.fromID(targetBlock.getType());

        if (type != null) {
            player.print("Replacer tool switched to: " + type.getName());
        }

        return true;
    }
View Full Code Here

Examples of com.sk89q.worldedit.blocks.BlockType

                        c.getID().getType(), c.getID().getData());
                player.print(str);
            }
        } else {
            for (Countable<Integer> c : distribution) {
                BlockType block = BlockType.fromID(c.getID());
                String str = String.format("%-7s (%.3f%%) %s #%d",
                        String.valueOf(c.getAmount()),
                        c.getAmount() / (double) size * 100,
                        block == null ? "Unknown" : block.getName(), c.getID());
                player.print(str);
            }
        }
    }
View Full Code Here

Examples of com.vmware.bdd.entity.IpBlockEntity.BlockType

      Long[] owners = { 1L, 2L, 3L, 4L, 5L };
      BlockType[] blockTypes = { BlockType.ASSIGNED, BlockType.FREE };

      for (int i = 0; i < count; ++i) {
         Long ownerId = IpBlockEntity.FREE_BLOCK_OWNER_ID;
         BlockType blockType = blockTypes[(int) (Math.random() * blockTypes.length)
                                % blockTypes.length];
         if (blockType != BlockType.FREE) {
            ownerId = owners[(int) (Math.random() * owners.length) % owners.length];
         }

View Full Code Here

Examples of edu.byu.ece.rapidSmith.bitstreamTools.configurationSpecification.BlockType

    int frameSize = spec.getFrameSize();
    int numTopRows = spec.getTopNumberOfRows();
    int numBottomRows = spec.getBottomNumberOfRows();
   
    BlockType bramContentType = spec.getBRAMContentBlockType();
   
   
    int frameCount = 0;
    for (BlockType blockType : spec.getBlockTypes()) {
      if (ignoreBRAMContent && blockType == bramContentType) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.