Conal-Tuohy / ands-la-trobe

Automatically exported from code.google.com/p/ands-la-trobe
1 stars 1 forks source link

Add sample block to dataset schema #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Sample data is collected by the RLI/BOSS system. We should harvest this 
meaningful data in a reusable way.

Add the following repetable block to dataset schema:
{{{
<sample>
  <id />
  <details />
  <type />
</sample>
}}}

and something like the following to the dataset.xhtml form: 

{{{

<xf:repeat nodeset="instance('dataset-metadata')/my:sample">
    <h3>Sample:</h3>
    <xf:input ref="./my:id">
        <xf:label>Id: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:details">
        <xf:label>Details: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:type">
        <xf:label>Type: </xf:label>
    </xf:input><br />
    <xf:trigger>
        <xf:label>Remove</xf:label>
        <xf:delete ev:event="DOMActivate" nodeset="." />
    </xf:trigger>
</xf:repeat>
<xf:trigger>
    <xf:label>Add Sample</xf:label>
    <xf:insert ev:event="DOMActivate" origin="instance('dataset-template')/my:sample[1]" position="after"/>
</xf:trigger>

}}}

Original issue reported on code.google.com by tosello....@gmail.com on 28 Oct 2011 at 4:21

GoogleCodeExporter commented 9 years ago
done.

Original comment by tosello....@gmail.com on 28 Oct 2011 at 4:21

GoogleCodeExporter commented 9 years ago
Error: feilds are actually to be taken from spreadsheet as well as RLI/BOSS.
The required repeatable block is as follows:
{{{
        <sample>
                <name></name>
                <id></id>
                <cas></cas>
                <dimensions></dimensions>
                <supplier></supplier>
                <supplierCode></supplierCode>
                <purity></purity>
                <typicalAnalysis></typicalAnalysis>
                <prep></prep>
                <additionalNotes></additionalNotes>
        </sample>
}}}

Original comment by tosello....@gmail.com on 28 Oct 2011 at 4:42

GoogleCodeExporter commented 9 years ago
<xf:repeat nodeset="instance('dataset-metadata')/my:sample">
    <h3>Sample:
        <xf:trigger>
        <xf:label>Remove</xf:label>
        <xf:delete ev:event="DOMActivate" nodeset="." />
        </xf:trigger>
    </h3>
    <xf:input ref="./my:name">
        <xf:label>Sample Name: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:id">
        <xf:label>Sample ID: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:cas">
        <xf:label>CAS Number: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:dimensions">
        <xf:label>Dimensions: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:supplier">
        <xf:label>Supplier: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:supplierCode">
        <xf:label>Supplier Code: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:purity">
        <xf:label>Purity: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:typicalAnalysis">
        <xf:label>Typical Analysis: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:prep">
        <xf:label>Prep: </xf:label>
    </xf:input><br />
    <xf:input ref="./my:additionalNotes">
        <xf:label>Additional Notes: </xf:label>
    </xf:input><br />
</xf:repeat>
<xf:trigger>
    <xf:label>Add Sample</xf:label>
    <xf:insert ev:event="DOMActivate" origin="instance('dataset-template')/my:sample[1]" position="after"/>
</xf:trigger>

Original comment by tosello....@gmail.com on 28 Oct 2011 at 4:55

GoogleCodeExporter commented 9 years ago
Additional: 

Add methods to boss-to-dataset, foxml-to-solr and foxml-to-rif-cs to include 
this data in meaningful ways.

Original comment by tosello....@gmail.com on 28 Oct 2011 at 5:27

GoogleCodeExporter commented 9 years ago
boss-to-dataset: 

{{{
                        <xsl:for-each select="boss:logsheet/boss:table[@name='sampletable']/boss:row">
                        <sample>
                                <name><xsl:value-of select="boss:column[3]"/></name>
                                <id><xsl:value-of select="boss:column[1]"/></id>
                                <cas></cas>
                                <dimensions></dimensions>
                                <supplier></supplier>
                                <supplierCode></supplierCode>
                                <purity></purity>
                                <typicalAnalysis></typicalAnalysis>
                                <prep></prep>
                                <additionalNotes><xsl:value-of select="boss:column[2]"/></additionalNotes>
                        </sample>
                        </xsl:for-each>
}}}

Original comment by tosello....@gmail.com on 28 Oct 2011 at 5:44

GoogleCodeExporter commented 9 years ago
Need to commit these revisions to the code repository

Original comment by Conal.Tuohy on 1 Nov 2011 at 8:47

GoogleCodeExporter commented 9 years ago
xform & boss-to-dataset.xsl changes committed.

Original comment by tosello....@gmail.com on 1 Nov 2011 at 10:39

GoogleCodeExporter commented 9 years ago

Original comment by tosello....@gmail.com on 1 Nov 2011 at 10:41

GoogleCodeExporter commented 9 years ago
Still need to add sample data to rif-cs (fox-ml-to-rif-cs.xsl)

Original comment by tosello....@gmail.com on 4 Nov 2011 at 6:49