IPT Demo

From Filtered Push Wiki
Jump to: navigation, search

Example of GBIF IPT as a FP Annotation Injection client.

Uses a slightly modified GBIF IPT ProviderToolkit with the FP message code wrappped up in a library, one new form for IPT, and one class to extract darwincore and annotation concepts from the form submission, format them as an FP annotation message, and inject that message into an FP Triage node.

The injected message:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns4:Message xmlns:ns2="http://rs.tdwg.org/dwc/dwcore" xmlns:ns3="http://rs.tdwg.org/dwc/dwelement" xmlns:ns4="http://www.filteredpush.org">
    <Header/>
    <Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:AddAnnotationMessageBodyT">
        <AnnotationAbout xsi:type="ns4:CollectionLocatorT">
            <ns2:GlobalUniqueIdentifier>27a33883-381d-4556-b258-5d8db66dfd97</ns2:GlobalUniqueIdentifier>
            <ns2:InstitutionCode>BGBM</ns2:InstitutionCode>
            <ns2:CollectionCode>B</ns2:CollectionCode>
            <ns2:CatalogNumber>4</ns2:CatalogNumber>
        </AnnotationAbout>
        <Annotation>
            <AnnotationSection>
                <AnnotationSchemaType>http://rs.tdwg.org/dwc/dwelement.xsd</AnnotationSchemaType>
                <ns3:ScientificNameAuthorship xmlns="http://rs.tdwg.org/dwc/dwelement">Clementi</ns3:ScientificNameAuthorship>
                <ns3:DateIdentified xmlns="http://rs.tdwg.org/dwc/dwelement">2009-09-09</ns3:DateIdentified>
                <ns3:Binomial xmlns="http://rs.tdwg.org/dwc/dwelement">Alyssum erosulum Clementi</ns3:Binomial>
                <ns3:IdentifiedBy xmlns="http://rs.tdwg.org/dwc/dwelement">A Botanist</ns3:IdentifiedBy>
                <ns3:ScientificName xmlns="http://rs.tdwg.org/dwc/dwelement">Alyssum erosulum Clementi</ns3:ScientificName>
                <ns3:Genus xmlns="http://rs.tdwg.org/dwc/dwelement">Alyssum</ns3:Genus>
                <ns3:SpecificEpithet xmlns="http://rs.tdwg.org/dwc/dwelement">erosulum</ns3:SpecificEpithet>
                <ns3:IdentificationRemarks xmlns="http://rs.tdwg.org/dwc/dwelement">Example new determination</ns3:IdentificationRemarks>
            </AnnotationSection>
        </Annotation>
        <Annotator xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">(IPT Test) Annon. User</Annotator>
        <AnnotationDateTime>2009-08-09</AnnotationDateTime>
    </Body>
</ns4:Message>