Package org.jboss.shrinkwrap.descriptor.spi

Examples of org.jboss.shrinkwrap.descriptor.spi.Node


   // Constructor ------------------------------------------------------------------------||
   //-------------------------------------------------------------------------------------||

   public ArquillianDescriptorImpl(String descirptorName)
   {
      this(descirptorName, new Node("arquillian"));
   }
View Full Code Here


   private Node container;
  
   // test only
   public ContainerDefImpl(String descirptorName)
   {
      this(descirptorName, new Node("arquillian"));
   }
View Full Code Here

    * @see org.jboss.arquillian.impl.configuration.api.ContainerDef#getProperties()
    */
   @Override
   public Map<String, String> getContainerProperties()
   {
      Node props = container.getSingle("configuration");
      Map<String, String> properties = new HashMap<String, String>();
     
      if(props != null)
      {
         for(Node prop: props.get("property"))
         {
            properties.put(prop.attribute("name"), prop.text());
         }
      }
      return properties;
View Full Code Here

    * @see org.jboss.arquillian.impl.configuration.api.ContainerDef#getProperties()
    */
   @Override
   public Map<String, String> getProtocolProperties()
   {
      Node props = protocol.getSingle("configuration");
      Map<String, String> properties = new HashMap<String, String>();
     
      if(props != null)
      {
         for(Node prop: props.get("property"))
         {
            properties.put(prop.attribute("name"), prop.text());
         }
      }
      return properties;
View Full Code Here

   private Node extension;

   // test only
   public ExtensionDefImpl(String descirptorName)
   {
      this(descirptorName, new Node("arquillian"));
   }
View Full Code Here

    */
   @Override
   public Map<String, String> getExtensionProperties()
   {

      Node props = extension.getSingle("configuration");
      Map<String, String> properties = new HashMap<String, String>();

      if (props != null)
      {
         for (Node prop : props.get("property"))
         {
            properties.put(prop.attribute("name"), prop.text());
         }
      }
      return properties;
View Full Code Here

      return this;
   }
  
   public Map<String, String> getProperties()
   {
      Node props = protocol.getSingle("configuration");
      Map<String, String> properties = new HashMap<String, String>();
     
      if(props != null)
      {
         for(Node prop: props.get("property"))
         {
            properties.put(prop.attribute("name"), prop.text());
         }
      }
      return properties;
View Full Code Here

      return null;
   }

   private String getTextIfExists(Query query)
   {
      Node propery = engine.getSingle(query);
      if(propery != null)
      {
         return propery.text();
      }
      return null;
   }
View Full Code Here

         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document doc = builder.parse(stream);

         Node root = new Node(doc.getDocumentElement().getNodeName());
         readRecursive(root, doc.getDocumentElement());
         return root;

      }
      catch (Exception e)
View Full Code Here

         for (int i = 0; i < sourceChildren.getLength(); i++)
         {
            org.w3c.dom.Node child = sourceChildren.item(i);
            if (child.getNodeType() != org.w3c.dom.Node.TEXT_NODE)
            {
               Node newTarget = target.create(child.getNodeName());
               if (onlyTextChildren(child))
               {
                  newTarget.text(child.getTextContent());
                  readAttributes(newTarget, child);
               }
               else
               {
                  readRecursive(newTarget, child);
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.spi.Node

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.