Package org.apache.cocoon

Examples of org.apache.cocoon.Engine$Block


    } else return entityHeight;
  }

  @Override
  public AlmostBoolean isBlockSolid(final int id) {
    final Block block = Block.e(id);
    if (block == null || block.getMaterial() == null) {
      return AlmostBoolean.MAYBE;
    }
    else {
      return AlmostBoolean.match(block.getMaterial().isSolid());
    }
  }
View Full Code Here


    }
  }

  @Override
  public AlmostBoolean isBlockLiquid(final int id) {
    final Block block = Block.e(id);
    if (block == null || block.getMaterial() == null) {
      return AlmostBoolean.MAYBE;
    }
    else {
      return AlmostBoolean.match(block.getMaterial().isLiquid());
    }
  }
View Full Code Here

    } else return entityHeight;
  }

  @Override
  public AlmostBoolean isBlockSolid(final int id) {
    final Block block = Block.getById(id);
    if (block == null || block.getMaterial() == null) {
      return AlmostBoolean.MAYBE;
    }
    else {
      return AlmostBoolean.match(block.getMaterial().isSolid());
    }
  }
View Full Code Here

    }
  }

  @Override
  public AlmostBoolean isBlockLiquid(final int id) {
    final Block block = Block.getById(id);
    if (block == null || block.getMaterial() == null) {
      return AlmostBoolean.MAYBE;
    }
    else {
      return AlmostBoolean.match(block.getMaterial().isLiquid());
    }
  }
View Full Code Here

    {
        // Try parsing as an internal Minecraft name
        // This is so that things like "minecraft:stone" aren't parsed
        // as the block "minecraft" with data "stone", but instead as the
        // block "minecraft:stone" with no block data.
        Block block = Block.b(input);
        if (block != null)
        {
            return BukkitMaterialData.ofMinecraftBlock(block, 0);
        }
View Full Code Here

            blockName = input.substring(0, splitIndex);
            blockData = Integer.parseInt(input.substring(splitIndex + 1));
        }

        // Get the material belonging to the block and data
        Block block = Block.b(blockName);
        if (block != null)
        {
            return BukkitMaterialData.ofMinecraftBlock(block, blockData);
        }
        DefaultMaterial defaultMaterial = DefaultMaterial.getMaterial(blockName);
View Full Code Here

            + "</body></html>";
        
        try {
            // Get the Cocoon Engine
            out.println("Getting an instance of the Cocoon engine...<br />");
            Engine cocoonEngine = Engine.getInstance();
                      
            // Wrap my request object and add the String document to it
            out.println("Wrapping the original request...<br />");
            CocoonServletRequest myReq =
                new CocoonServletRequest(document, req);
                
            // Specify some additional parmaters
            out.println("Adding parameters to my request to Cocoon... <br />");
            myReq.addParameter("foo", "bar");
            myReq.addParameter("apache", "xml");
           
            // Pass in the real response object.  If I wanted to
            //   filter the output further, I could easily construct
            //   a CocoonServletResponse object and pass that in,
            //   and pull the output out of it.
            out.println("Generate some content... <br />");
            cocoonEngine.handle(myReq, res);
           
        } catch (Exception e) {
            out.println("Error: " + e.getMessage());
        }
       
View Full Code Here

            + "</body></html>";
        
        try {
            // Get the Cocoon Engine
            out.println("Getting an instance of the Cocoon engine...<br />");
            Engine cocoonEngine = Engine.getInstance();
                      
            // Wrap my request object and add the String document to it
            out.println("Wrapping the original request...<br />");
            CocoonServletRequest myReq =
                new CocoonServletRequest(document, req);
                
            // Specify some additional parmaters
            out.println("Adding parameters to my request to Cocoon... <br />");
            myReq.addParameter("foo", "bar");
            myReq.addParameter("apache", "xml");
           
            // Pass in the real response object.  If I wanted to
            //   filter the output further, I could easily construct
            //   a CocoonServletResponse object and pass that in,
            //   and pull the output out of it.
            out.println("Generate some content... <br />");
            cocoonEngine.handle(myReq, res);
           
        } catch (Exception e) {
            out.println("Error: " + e.getMessage());
        }
       
View Full Code Here

            + "</body></html>";
        
        try {
            // Get the Cocoon Engine
            out.println("Getting an instance of the Cocoon engine...<br />");
            Engine cocoonEngine = Engine.getInstance();
                      
            // Wrap my request object and add the String document to it
            out.println("Wrapping the original request...<br />");
            CocoonServletRequest myReq =
                new CocoonServletRequest(document, req);
                
            // Specify some additional parmaters
            out.println("Adding parameters to my request to Cocoon... <br />");
            myReq.addParameter("foo", "bar");
            myReq.addParameter("apache", "xml");
           
            // Pass in the real response object.  If I wanted to
            //   filter the output further, I could easily construct
            //   a CocoonServletResponse object and pass that in,
            //   and pull the output out of it.
            out.println("Generate some content... <br />");
            cocoonEngine.handle(myReq, res);
           
        } catch (Exception e) {
            out.println("Error: " + e.getMessage());
        }
       
View Full Code Here

  private synchronized void nextBlockOutputStream() throws IOException {
    long blockId = r.nextLong();
    while (store.blockExists(blockId)) {
      blockId = r.nextLong();
    }
    nextBlock = new Block(blockId, bytesWrittenToBlock);
    blocks.add(nextBlock);
    bytesWrittenToBlock = 0;
  }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.Engine$Block

Copyright © 2018 www.massapicom. 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.