<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,6 +11,7 @@ require dirname( __FILE__ ) . '/chemcaster/Registration.php';
 require dirname( __FILE__ ) . '/chemcaster/Substance.php';
 require dirname( __FILE__ ) . '/chemcaster/Structure.php';
 require dirname( __FILE__ ) . '/chemcaster/Execution.php';
+require dirname( __FILE__ ) . '/chemcaster/Component.php';
 require dirname( __FILE__ ) . '/chemcaster/Log.php';
 require dirname( __FILE__ ) . '/chemcaster/Image.php';
 </diff>
      <filename>lib/chemcaster.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,12 +9,17 @@
  */
 class Chemcaster_Archive extends Chemcaster_Item
 {
-    protected $_links = array( 
-        'zipfile'   =&gt; '',
-        'index'     =&gt; '',
-        'destroy'   =&gt; '',
-        'registry'  =&gt; ''
-    );
+    /**
+     * Archive Compiled
+     * @var boolean
+     */
+    public $done;
+
+    /**
+     * archive initiation
+     * @var datetime
+     */
+    public $created_at;
 }
 
 ?&gt;</diff>
      <filename>lib/chemcaster/Archive.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,8 +9,9 @@
  */
 class Chemcaster_Component extends Chemcaster_Item
 {
-    protected $_links = array(
-        'structure'         =&gt; '',
-        'substance'         =&gt; ''
-    );
+    /**
+     * Component Multiplier
+     * @var number
+     */
+    public $multiplier;
 }</diff>
      <filename>lib/chemcaster/Component.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,18 +9,43 @@
  */
 class Chemcaster_Execution extends Chemcaster_Item implements Iterator, ArrayAccess
 {
-    protected $_results = array();
+    protected $results = array();
 
     /**
      * Used by Iterator Interface
      * @var int
      */
     private $_position = 0;
-    
-    protected $_links = array(
-        'index'         =&gt; '',
-        'executable'    =&gt; ''
-    );
+
+    /**
+     * Cursor
+     * @var string
+     */
+    public $cursor;
+
+    /**
+     * Reverse
+     * @var boolean
+     */
+    public $reverse;
+
+    /**
+     * Max results
+     * @var number
+     */
+    public $maximum_results;
+
+    /**
+     * next cursor
+     * @var string
+     */
+    public $next_cursor;
+
+    /**
+     * previous cursor
+     * @var string
+     */
+    public $previous_cursor;
 
     /**
      * Gets the count of items in this index</diff>
      <filename>lib/chemcaster/Execution.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,30 @@
  */
 class Chemcaster_Image extends Chemcaster_Item
 {
-    protected $_links = array( 'imageable' =&gt; '' );
+    /**
+     * Width of Image
+     * @var number
+     */
+    public $width;
+
+    /**
+     * Height of Image
+     * @var number
+     */
+    public $height;
+
+    /**
+     * Media type
+     * @var string (image/png)
+     */
+    public $format;
+
+    /**
+     * Base64 encoding
+     * @var string
+     */
+    public $data;
+
 }
 
 ?&gt;</diff>
      <filename>lib/chemcaster/Image.php</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      * Stores the itemized resource links (if any)
      * @var array
      */
-    protected $_items = array();
+    protected $items = array();
     
     /**
      * Used by Iterator Interface
@@ -21,8 +21,6 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     private $_position = 0;
 
-    protected $_links = array( 'parent' =&gt; '', 'create' =&gt; '', 'previous_page' =&gt; '', 'next_page' =&gt; '' );
-
     /**
      * Create method for give index
      * @param array $args [see api for appropriate keys]
@@ -30,12 +28,20 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      * @access public
      * @throws Chemcaster_CreationException
      */
-    public function create( $args )
+    public function create( $args = NULL )
     {
-        $link = $this-&gt;_links['create'];
+        if( FALSE === isset($this-&gt;links['create']) )
+        {
+            throw new Chemcaster_MethodNotAllowed(&quot;Create not allowed here&quot;);
+            return;
+        }
+
+        if( NULL === $args ) $args = new stdClass;
+
+        $link = $this-&gt;links['create'];
         $rep_name = strtolower( $link-&gt;getRepresentationName() );
+        
         $json_args = json_encode( array( $rep_name =&gt; $args) );
-
         $ret_json = $this-&gt;_transporter-&gt;post( $link, $json_args );
 
         if( FALSE === $ret_json )
@@ -62,7 +68,7 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     public function size()
     {
-        return count( $this-&gt;_items );
+        return count( $this-&gt;items );
     }
 
     /**
@@ -78,7 +84,7 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     public function current()
     {
-        $link = $this-&gt;_items[$this-&gt;_position];
+        $link = $this-&gt;items[$this-&gt;_position];
         return $this-&gt;_factory($link);
     }
 
@@ -103,7 +109,7 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     public function valid()
     {
-        return isset( $this-&gt;_items[$this-&gt;_position] );
+        return isset( $this-&gt;items[$this-&gt;_position] );
 
     }
 
@@ -112,7 +118,7 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     public function offsetSet($offset, $value)
     {
-        $this-&gt;_items[$offset] = $value;
+        $this-&gt;items[$offset] = $value;
     }
 
     /**
@@ -120,7 +126,7 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     public function offsetExists($offset)
     {
-        return isset($this-&gt;_items[$offset]);
+        return isset($this-&gt;items[$offset]);
     }
 
     /**
@@ -128,7 +134,7 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     public function offsetUnset($offset)
     {
-        unset($this-&gt;_items[$offset]);
+        unset($this-&gt;items[$offset]);
     }
 
     /**
@@ -136,9 +142,9 @@ class Chemcaster_Index extends Chemcaster_Representation implements Iterator, Ar
      */
     public function offsetGet($offset)
     {
-        if( TRUE === isset($this-&gt;_items[$offset]) )
+        if( TRUE === isset($this-&gt;items[$offset]) )
         {
-            $link = $this-&gt;_items[$offset];
+            $link = $this-&gt;items[$offset];
             return $this-&gt;_factory($link);
         }
         else</diff>
      <filename>lib/chemcaster/Index.php</filename>
    </modified>
    <modified>
      <diff>@@ -17,13 +17,13 @@ class Chemcaster_Item extends Chemcaster_Representation
      */
     public function update( $args )
     {
-        if( FALSE === isset($this-&gt;_links['update']) )
+        if( FALSE === isset($this-&gt;links['update']) )
         {
             throw new Chemcaster_MethodNotAllowed(&quot;Update not allowed here&quot;);
             return;
         }
 
-        $link = $this-&gt;_links['update'];
+        $link = $this-&gt;links['update'];
         $rep_name = strtolower( $link-&gt;getRepresentationName() );
         $json_args = json_encode( array( $rep_name =&gt; $args) );
 
@@ -54,13 +54,13 @@ class Chemcaster_Item extends Chemcaster_Representation
      */
     public function destroy( )
     {
-        if( FALSE === isset($this-&gt;_links['destroy']) )
+        if( FALSE === isset($this-&gt;links['destroy']) )
         {
             throw new Chemcaster_MethodNotAllowed(&quot;Destroy not allowed here&quot;);
             return;
         }
 
-        $link = $this-&gt;_links['destroy'];
+        $link = $this-&gt;links['destroy'];
         $rep_name = strtolower( $link-&gt;getRepresentationName() );
 
         $ret_json = $this-&gt;_transporter-&gt;delete( $link );</diff>
      <filename>lib/chemcaster/Item.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,18 +9,25 @@
  */
 class Chemcaster_Log extends Chemcaster_Item implements Iterator, ArrayAccess
 {
-    protected $_events = array();
+    protected $events = array();
 
     /**
      * Used by Iterator Interface
      * @var int
      */
     private $_position = 0;
-    
-    protected $_links = array(
-        'registry'          =&gt; '',
-        'index'             =&gt; ''
-    );
+
+    /**
+     * Created
+     * @var datetime
+     */
+    public $created_at;
+
+    /**
+     * Number of seconds covered by this log
+     * @var number
+     */
+    public $interval;
 
     /**
      * Gets the count of items in this index</diff>
      <filename>lib/chemcaster/Log.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,12 +9,11 @@
  */
 class Chemcaster_Query extends Chemcaster_Item
 {
-    protected $_links = array(
-        'index'        =&gt; '',
-        'images'       =&gt; '',
-        'executions'   =&gt; '',
-        'registry'     =&gt; ''
-    );
+    /**
+     * Query serialization
+     * @var string
+     */
+    public $serialization;
 }
 
 ?&gt;</diff>
      <filename>lib/chemcaster/Query.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,11 +9,9 @@
  */
 class Chemcaster_Registration extends Chemcaster_Item
 {
-    protected $_links = array(
-        'index'             =&gt; '',
-        'update'            =&gt; '',
-        'destroy'           =&gt; '',
-        'registry'          =&gt; '',
-        'substance'         =&gt; ''
-    );
+    /**
+     * Array of templates
+     * @var array
+     */
+    public $templates = array();
 }</diff>
      <filename>lib/chemcaster/Registration.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,14 +9,15 @@
  */
 class Chemcaster_Registry extends Chemcaster_Item
 {
-    protected $_links = array(
-        'service'           =&gt; '',
-        'substances'        =&gt; '',
-        'structures'        =&gt; '',
-        'queries'           =&gt; '',
-        'registrations'     =&gt; '',
-        'index'             =&gt; '',
-        'update'            =&gt; '',
-        'destroy'           =&gt; ''
-    );
+    /**
+     * Registry Name
+     * @var string
+     */
+    public $name;
+
+    /**
+     * Registry can be deleted
+     * @var boolean
+     */
+    public $deletable;
 }</diff>
      <filename>lib/chemcaster/Registry.php</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@ class Chemcaster_Representation
      * Holds array of links. Override in sub classes for specific Representations
      * @var array
      */
-    protected $_links = array();
+    protected $links = array();
 
     /**
      * Class constructor
@@ -55,27 +55,22 @@ class Chemcaster_Representation
             {
                 foreach( $value as $k =&gt; $v )
                 {
-                    $this-&gt;$k = $v;
+                    if( TRUE === is_array($this-&gt;$k) )
+                        foreach( $v as $vv )
+                            array_push($this-&gt;$k, $vv);
+                    else
+                        $this-&gt;$k = $v;
                 }
             }
-            else if( 'items' === $name )
+            else if( TRUE === is_array($value) )
             {
+                $this-&gt;$name = array();
                 foreach( $value as $v )
-                    $this-&gt;_items[] = new Chemcaster_Link($v-&gt;name, $v-&gt;uri, $v-&gt;media_type);
+                    $this-&gt;{$name}[] = new Chemcaster_Link($v-&gt;name, $v-&gt;uri, $v-&gt;media_type);
             }
-            else if( 'results' === $name)
+            else
             {
-                foreach( $value as $v )
-                $this-&gt;_results[] = new Chemcaster_Link($v-&gt;name, $v-&gt;uri, $v-&gt;media_type);
-            }
-            else if( 'events' === $name)
-            {
-                foreach( $value as $v )
-                    $this-&gt;_events[] = new Chemcaster_Link($v-&gt;name, $v-&gt;uri, $v-&gt;media_type);
-            }
-            else if( TRUE === isset($this-&gt;_links[$name]) )
-            {
-                $this-&gt;_links[$name] = new Chemcaster_Link($value-&gt;name, $value-&gt;uri, $value-&gt;media_type);
+                $this-&gt;links[$name] = new Chemcaster_Link($value-&gt;name, $value-&gt;uri, $value-&gt;media_type);
             }
         }
     }
@@ -88,9 +83,9 @@ class Chemcaster_Representation
      */
     public function __get( $property )
     {
-        if( TRUE === array_key_exists($property, $this-&gt;_links) &amp;&amp; '' !== $this-&gt;_links[$property] )
+        if( TRUE === array_key_exists($property, $this-&gt;links) &amp;&amp; '' !== $this-&gt;links[$property] )
         {
-            $link = $this-&gt;_links[$property];
+            $link = $this-&gt;links[$property];
             return $this-&gt;_factory( $link );
         }
         else</diff>
      <filename>lib/chemcaster/Representation.php</filename>
    </modified>
    <modified>
      <diff>@@ -10,10 +10,10 @@
 class Chemcaster_Service extends Chemcaster_Representation
 {
     /**
-     * The links for this rep.
-     * @var array
+     * Version
+     * @var string
      */
-    protected $_links = array( 'registries' =&gt; '' );
+    public $version;
 
     /**
      * Sets up initial connection and returns the Chemcaster_Service object</diff>
      <filename>lib/chemcaster/Service.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,15 @@
  */
 class Chemcaster_Structure extends Chemcaster_Item
 {
-    protected $_links = array(
-        'index'             =&gt; '',
-        'images'            =&gt; '',
-        'components'        =&gt; '',
-        'registry'          =&gt; ''
-    );
+    /**
+     * Serialization
+     * @var string
+     */
+    public $serialization;
+
+    /**
+     * inchi
+     * @var string
+     */
+    public $inchi;
 }</diff>
      <filename>lib/chemcaster/Structure.php</filename>
    </modified>
    <modified>
      <diff>@@ -9,11 +9,15 @@
  */
 class Chemcaster_Substance extends Chemcaster_Item
 {
-    protected $_links = array(
-        'index'             =&gt; '',
-        'registry'          =&gt; '',
-        'registration'      =&gt; '',
-        'components'        =&gt; '',
-        'images'            =&gt; ''
-    );
+    /**
+     * Substance serialization
+     * @var string
+     */
+    public $serialization;
+
+    /**
+     * Substance INCHI
+     * @var string
+     */
+    public $inchi;
 }</diff>
      <filename>lib/chemcaster/Substance.php</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ class RegistryTest extends PHPUnit_Framework_TestCase
              -&gt;will($this-&gt;returnValue('{
                   &quot;registry&quot;: {
                     &quot;name&quot;: &quot;bar&quot;,
-                    &quot;deleteable&quot;: false
+                    &quot;deletable&quot;: false
                   }
                 }'));
 
@@ -44,9 +44,9 @@ class RegistryTest extends PHPUnit_Framework_TestCase
         $this-&gt;assertSame('bar', $this-&gt;registry-&gt;name);
     }
 
-    public function testGetDeleteable()
+    public function testGetDeletable()
     {
-        $this-&gt;assertSame(false, $this-&gt;registry-&gt;deleteable);
+        $this-&gt;assertSame(false, $this-&gt;registry-&gt;deletable);
     }
     
 }</diff>
      <filename>tests/RegistryTest.php</filename>
    </modified>
    <modified>
      <diff>@@ -20,8 +20,7 @@ class StructureTest extends PHPUnit_Framework_TestCase
           -&gt;method('get')
           -&gt;will($this-&gt;returnValue('{
               &quot;structure&quot;: {
-                &quot;name&quot;: &quot;name&quot;,
-                &quot;molfile&quot;: &quot;molfile&quot;,
+                &quot;serialization&quot;: &quot;serialization&quot;,
                 &quot;inchi&quot;: &quot;inchi&quot;
               }
             }'));
@@ -43,14 +42,9 @@ class StructureTest extends PHPUnit_Framework_TestCase
         $this-&gt;assertTrue('Chemcaster_Structure' == get_class($this-&gt;structure));
     }
 
-    public function testStructureName()
+    public function testStructureSerialization()
     {
-        $this-&gt;assertSame('name', $this-&gt;structure-&gt;name);
-    }
-
-    public function testStructureMolfile()
-    {
-        $this-&gt;assertSame('molfile', $this-&gt;structure-&gt;molfile);
+        $this-&gt;assertSame('serialization', $this-&gt;structure-&gt;serialization);
     }
 
     public function testStructureInchi()</diff>
      <filename>tests/StructureTest.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>254d5edb32316415e245b50dbda501ead74846a8</id>
    </parent>
  </parents>
  <author>
    <name>Rob Apodaca</name>
    <email>rob.apodaca@gmail.com</email>
  </author>
  <url>http://github.com/metamolecular/chemcaster-php/commit/c5bf98101f8dd919948311da9fbb23b138c82f9a</url>
  <id>c5bf98101f8dd919948311da9fbb23b138c82f9a</id>
  <committed-date>2009-09-23T20:47:38-07:00</committed-date>
  <authored-date>2009-09-23T20:47:38-07:00</authored-date>
  <message>Using attributes in sub-classes rather than links</message>
  <tree>38162a02a818e1f393d53e6aafa64c65c0d6131e</tree>
  <committer>
    <name>Rob Apodaca</name>
    <email>rob.apodaca@gmail.com</email>
  </committer>
</commit>
