Xholon Wikipedia tutorial3

Ken Webb 2011-11-20T14:16:24Z

This page is part of a series that explores the many ways in which Xholon and Wikipedia can interact with each other. The tutorial develops a simple model of the Solar System, that can be reused in other Xholon applications, such as models of climate change on the Earth. The Earth is one of the objects in the Solar System, and is critically dependent on energy from the Sun which is at the center of the Solar System.

Specify other relationships between objects

In the first two parts of this tutorial, inheritance hierarchies with classes, and composite structure hierarchies with objects, have been extracted from the Solar System and related Wikipedia pages. The result is two separate tree structures. This part of the tutorial looks at additional relationships between objects, and how to specify these relationships using Xholon.

According to the Wikipedia article, the Solar System consists of the Sun and the astronomical objects gravitationally bound in orbit around it. So gravity is the relationship between objects that defines the Solar System. Further down the article states that the Sun produces temperatures and densities in its core great enough to sustain nuclear fusion, which releases enormous amounts of energy, mostly radiated into space as electromagnetic radiation, peaking in the 400–700 nm band we call visible light. So electromagnetic radiation is an additional relationship between objects, and the one that this tutorial will focus on.

The following XML defines a number of details required by the Xholon framework when running an application. Star is implemented by the org.primordion.user.app.solarsystem.Star Java class, and has a port relationship with InterplanetaryMedium. InterplanetaryMedium has a relationship with each individual Planet. These connections will make it possible for solar energy to move from the Sun through space to the planets.

<xholonClassDetails>

  <Star xhType="XhtypeBehFgsxxx" implName="org.primordion.user.app.solarsystem.Star">
    <port name="space" connector="#xpointer(ancestor::SolarSystem/InterplanetaryMedium)"/>
  </Star>

  <Planet xhType="XhtypeBehFgsxxx" implName="org.primordion.user.app.solarsystem.Planet"/>

  <NaturalSatellite xhType="XhtypeBehFgsxxx" implName="org.primordion.user.app.solarsystem.NaturalSatellite"/>

  <InterplanetaryMedium xhType="XhtypeBehFgsxxx" implName="org.primordion.user.app.solarsystem.Space">
    <port name="planets" connector="#xpointer(ancestor::SolarSystem/descendant::Planet/..)"/>
  </InterplanetaryMedium>

  <AstronomicalObject implName="org.primordion.user.app.solarsystem.AstronomicalObject"/>

</xholonClassDetails>

return to main page