<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF[
	<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
	<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
	<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
	<!ENTITY swivt 'http://semantic-mediawiki.org/swivt/1.0#'>
	<!ENTITY wiki 'http://http://www.moxy.com.au/Wiki/Wiki/index.php/Special:URIResolver/'>
	<!ENTITY property 'http://http://www.moxy.com.au/Wiki/Wiki/index.php/Special:URIResolver/Property-3A'>
	<!ENTITY wikiurl 'http://www.moxy.com.au/Wiki/index.php/'>
]>

<rdf:RDF
	xmlns:rdf="&rdf;"
	xmlns:rdfs="&rdfs;"
	xmlns:owl ="&owl;"
	xmlns:swivt="&swivt;"
	xmlns:wiki="&wiki;"
	xmlns:property="&property;">
	<!-- Ontology header -->
	<owl:Ontology rdf:about="&wikiurl;Special:ExportRDF/What_If_All_the_Ice_Melts">
		<swivt:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2012-05-23T13:11:14+00:00</swivt:creationDate>
		<owl:imports rdf:resource="http://semantic-mediawiki.org/swivt/1.0" />
	</owl:Ontology>
	<!-- exported page data -->
	<swivt:Subject rdf:about="&wiki;What_If_All_the_Ice_Melts">
		<rdfs:label>What If All the Ice Melts</rdfs:label>
		<swivt:page rdf:resource="&wikiurl;What_If_All_the_Ice_Melts"/>
		<rdfs:isDefinedBy rdf:resource="&wikiurl;Special:ExportRDF/What_If_All_the_Ice_Melts"/>
		<rdf:type rdf:resource="&wiki;Category-3APrediction"/>
		<property:DecisionSituation rdf:datatype="http://www.w3.org/2001/XMLSchema#string">What would happen if all the ice in the polar ice caps melts? How much would sea levels rise?</property:DecisionSituation>
		<property:SeaLevelIncrease rdf:datatype="http://www.w3.org/2001/XMLSchema#string">{
#Get the volume of ice
totalVolumeOfIce = sparql("SELECT ?x WHERE{&lt;http://www.moxy.com.au/Wiki/a#Global_Grounded_Ice&gt; prop:Volume ?x}");

#Get the volume in km3
totalVolumeOfIce = utConvert(totalVolumeOfIce, "km3",1);

#Fetch the ice density and water density
iceDensity = utConvert(sparql("SELECT ?x WHERE{&lt;http://www.moxy.com.au/Wiki/a#Water_Ice&gt; prop:Density ?x}"),'kg/m3',1);
waterDensity = utConvert(sparql("SELECT ?x WHERE{&lt;http://www.moxy.com.au/Wiki/a#Water&gt; prop:Density ?x}"),'kg/m3',1);

#Calculate the volume of water created when the ice melts
totalVolumeOfWater = totalVolumeOfIce * iceDensity / waterDensity;

#Get the area of the ocean
seaArea = utConvert(sparql("SELECT ?x WHERE{&lt;http://www.moxy.com.au/Wiki/a#Ocean&gt; prop:Area ?x}"),'km2',1);

#Divide the volume of water by the area of the ocean, and convert to meters
seaLevelIncrease = utConvert("km", "m", totalVolumeOfWater / seaArea);

#Return a string containing the units, rounded to the nearest 10 meters
paste(round(seaLevelIncrease, -1), "m");
}</property:SeaLevelIncrease>
	</swivt:Subject>
	<!-- auxiliary definitions -->
	<owl:DatatypeProperty rdf:about="&property;SeaLevelIncrease">
		<rdfs:label>SeaLevelIncrease</rdfs:label>
		<swivt:page rdf:resource="&wikiurl;Property:SeaLevelIncrease"/>
		<rdfs:isDefinedBy rdf:resource="&wikiurl;Special:ExportRDF/Property:SeaLevelIncrease"/>
	</owl:DatatypeProperty>
	<owl:DatatypeProperty rdf:about="&property;DecisionSituation">
		<rdfs:label>DecisionSituation</rdfs:label>
		<swivt:page rdf:resource="&wikiurl;Property:DecisionSituation"/>
		<rdfs:isDefinedBy rdf:resource="&wikiurl;Special:ExportRDF/Property:DecisionSituation"/>
	</owl:DatatypeProperty>
	<owl:Class rdf:about="&wiki;Category-3APrediction">
		<rdfs:label>Prediction</rdfs:label>
		<swivt:page rdf:resource="&wikiurl;Category:Prediction"/>
		<rdfs:isDefinedBy rdf:resource="&wikiurl;Special:ExportRDF/Category:Prediction"/>
	</owl:Class>
	<!-- References to the SWiVT Ontology, see http://semantic-mediawiki.org/swivt/ -->
	<owl:AnnotationProperty rdf:about="&swivt;page">
		<rdfs:isDefinedBy rdf:resource="http://semantic-mediawiki.org/swivt/1.0"/>
	</owl:AnnotationProperty>
	<owl:AnnotationProperty rdf:about="&swivt;creationDate">
		<rdfs:isDefinedBy rdf:resource="http://semantic-mediawiki.org/swivt/1.0"/>
	</owl:AnnotationProperty>
	<owl:Class rdf:about="&swivt;Subject">
		<rdfs:isDefinedBy rdf:resource="http://semantic-mediawiki.org/swivt/1.0"/>
	</owl:Class>
	<!-- Created by Semantic MediaWiki, http://semantic-mediawiki.org -->
</rdf:RDF>
