Project

General

Profile

« Previous | Next » 

Revision 8701

switch to index standard since it is more likely we will be able to determine this from our existing EML attribute information. https://projects.ecoinformatics.org/ecoinfo/issues/6253

View differences:

metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrIndexIT.java
218 218
       Identifier annotationPid = new Identifier();
219 219
       annotationPid.setValue(annotation_id);
220 220
       solrIndex.update(annotationPid, annotationSystemMetadata, annotationInputStream);
221
       String annotationResult = doQuery(solrIndex.getSolrServer(), "&fq=characteristic_sm:\"http://ecoinformatics.org/oboe/oboe.1.0/oboe-characteristics.owl#Mass\"");
221
       String annotationResult = doQuery(solrIndex.getSolrServer(), "&fq=standard_sm:\"http://ecoinformatics.org/oboe/oboe.1.0/oboe-standards.owl#Gram\"");
222 222
       assertTrue(annotationResult.contains(pid.getValue()));
223
       assertTrue(annotationResult.contains("http://ecoinformatics.org/oboe/oboe.1.0/oboe-characteristics.owl#Mass"));
223
       assertTrue(annotationResult.contains("http://ecoinformatics.org/oboe/oboe.1.0/oboe-standards.owl#Gram"));
224 224
    }
225 225
    
226 226
    /**
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/annotation/RdfXmlSubprocessor.java
17 17

  
18 18
import java.io.ByteArrayInputStream;
19 19
import java.io.ByteArrayOutputStream;
20
import java.io.File;
21 20
import java.io.IOException;
22 21
import java.io.InputStream;
23 22
import java.net.MalformedURLException;
metacat-index/src/main/resources/application-context-oa.xml
14 14
	</bean>
15 15
	
16 16
	<bean id="annotation.measurement" class="edu.ucsb.nceas.metacat.index.annotation.SparqlField">
17
		<constructor-arg name="name" value="characteristic_sm" />
17
		<constructor-arg name="name" value="standard_sm" />
18 18
		<constructor-arg name="query">
19 19
			<value>
20 20
				<![CDATA[
......
24 24
				PREFIX oboe-core: <http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#> 
25 25
				PREFIX oa: <http://www.w3.org/ns/oa#>
26 26
				PREFIX dcterms: <http://purl.org/dc/terms/>
27
				PREFIX pav: <http://purl.org/pav/>
28 27
				PREFIX foaf: <http://xmlns.com/foaf/0.1/>
29 28

  
30
				SELECT ?characteristic_sm ?pid
29
				SELECT ?standard_sm ?pid
31 30
				FROM <$GRAPH_NAME>
32 31
				WHERE { 
33 32
						
34 33
						?measurement rdf:type oboe-core:Measurement .
35 34
						?measurement rdf:type ?restriction .
36
						?restriction owl:onProperty oboe-core:ofCharacteristic .
37
						?restriction owl:allValuesFrom ?characteristic .
38
						?characteristic rdfs:subClassOf+ ?characteristic_sm .
39
						?characteristic_sm rdfs:subClassOf oboe-core:Characteristic .
35
						?restriction owl:onProperty oboe-core:usesStandard .
36
						?restriction owl:allValuesFrom ?standard .
37
						?standard rdfs:subClassOf+ ?standard_sm .
38
						?standard_sm rdfs:subClassOf oboe-core:Standard .
40 39
						
41
						OPTIONAL { 
42
							?measurement rdf:type ?restriction2 .
43
							?restriction2 owl:onProperty oboe-core:usesStandard .
44
							?restriction2 owl:allValuesFrom ?standard .
45
						}
46
						
47
						?annotation oa:hasBody ?measurement .
40
						?annotation oa:hasBody ?measurement .												
48 41
						?annotation oa:hasTarget ?target .
49 42
						?target oa:hasSource ?metadata .
50 43
						?metadata dcterms:identifier ?pid . 
51 44
						
52
						?annotation oa:annotatedBy ?person .
53
						?person foaf:name ?name .
54 45
				 	} 
55 46
				 ]]>
56 47
			</value>

Also available in: Unified diff