<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-3.0.xsd">

     <bean id="hasPart" class="org.dataone.cn.indexer.annotation.SparqlField">
        <constructor-arg name="name" value="hasPart" />
        <constructor-arg name="query">
            <value>
                <![CDATA[
                PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
                PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
                PREFIX ore:     <http://www.openarchives.org/ore/terms/>
                PREFIX dcterms: <http://purl.org/dc/terms/>
                PREFIX schemaorg: <https://schema.org/>

                SELECT (str(?seriesIdValue) as ?seriesId) (str(?hasPartValue) as ?hasPart)
                FROM <$GRAPH_NAME>
                WHERE {

                    ?project schemaorg:hasPart ?resourceMap .
                    ?resourceMap dcterms:identifier ?hasPartValue .
                    ?project dcterms:identifier ?seriesIdValue .


                    }
                 ]]>
            </value>
        </constructor-arg>
    </bean>

    <bean id="isPartOf" class="org.dataone.cn.indexer.annotation.SparqlField">
        <constructor-arg name="name" value="isPartOf" />
        <constructor-arg name="query">
            <value>
                <![CDATA[
                PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
                PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
                PREFIX ore:     <http://www.openarchives.org/ore/terms/>
                PREFIX dcterms: <http://purl.org/dc/terms/>
                PREFIX schemaorg: <https://schema.org/>

                SELECT (str(?pidValue) as ?pid) (str(?isPartOfValue) as ?isPartOf)
                FROM <$GRAPH_NAME>
                WHERE {

                    ?resourceMap schemaorg:isPartOf ?project .
                    ?project dcterms:identifier ?isPartOfValue .
                    ?resourceMap dcterms:identifier ?pidValue .


                    }
                 ]]>
            </value>
        </constructor-arg>
    </bean>

    <bean id="isPartOf.reverse" class="org.dataone.cn.indexer.annotation.SparqlField">
        <constructor-arg name="name" value="hasPart" />
        <constructor-arg name="query">
            <value>
               <![CDATA[
                PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
                PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
                PREFIX ore:     <http://www.openarchives.org/ore/terms/>
                PREFIX dcterms: <http://purl.org/dc/terms/>
                PREFIX schemaorg: <https://schema.org/>

                SELECT (str(?seriesIdValue) as ?seriesId) (str(?hasPartValue) as ?hasPart)
                FROM <$GRAPH_NAME>
                WHERE {

                    ?resourceMap schemaorg:isPartOf ?project .
                    ?project dcterms:identifier ?seriesIdValue .
                    ?resourceMap dcterms:identifier ?hasPartValue .


                    }
                 ]]>
            </value>
        </constructor-arg>
    </bean>

    <bean id="hasPart.reverse" class="org.dataone.cn.indexer.annotation.SparqlField">
        <constructor-arg name="name" value="isPartOf" />
        <constructor-arg name="query">
            <value>
                <![CDATA[
                PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
                PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
                PREFIX ore:     <http://www.openarchives.org/ore/terms/>
                PREFIX dcterms: <http://purl.org/dc/terms/>
                PREFIX schemaorg: <https://schema.org/>

                SELECT (str(?pidValue) as ?pid) (str(?isPartOfValue) as ?isPartOf)
                FROM <$GRAPH_NAME>
                WHERE {

                    ?project schemaorg:hasPart ?resourceMap .
                    ?resourceMap dcterms:identifier ?pidValue .
                    ?project dcterms:identifier ?isPartOfValue .


                    }
                 ]]>
            </value>
        </constructor-arg>
    </bean>
</beans>
