/* * Copyright (C) 2004 Map Bureau - http://www.mapbureau.com * * This package is Free Software released under the BSD license. * * See license.html at the top of this package for the full license terms. * */ /* compile("file://../lib/geometry2d/1.1/revision2.fb","file://../lib/geometry2d/1.1/revision2.fbl"); excludeNonTopicalNamespaces = true; compile("file://../lib/geometry2d/1.1/revision2.rdf","file://../lib/geometry2d/1.1/revision2.fbl"); */ /* assumes prior loading of the following code, normally in init.fbl load("{stdlibPrefix}discovery0.fb"); discovery:namespaces(); discovery:discovery(); */ install(namespace('dc')); install(namespace('geom')); startPersisting(); setHomeAndTopic(namespace('geom2d')); //startCollectingTriples(); namespace('geom2d').dc:title = "RDF Geometry Vocabulary, 2D Section"; namespace('geom2d').dc:creator = "Chris Goad cg@mapbureau.com"; namespace('geom2d').dc:date = "2004-10-27"; namespace('geom2d')..rdfs:seeAlso = resource("http://fabl.net/lib/geometry/1.1/"); addComment(namespace('geom'),"See also http://fabl.net/lib/geometry/1.1/revision2.html"); class("geom2d:Shape"); endClass(); geom2d:Shape .. rdfs:subClassOf = geom:Shape; geom2d:Shape . rdfs:comment = "A geom:Shape with geom:minDimension >= 2"; class("geom2d:Point"); restrict geom:x {cardinality 1;allValuesFrom double} restrict geom:y {cardinality 1;allValuesFrom double} endClass(); geom2d:Point .. rdfs:subClassOf = geom:Point; geom2d:Point .. rdfs:subClassOf = geom2d:Shape; class("geom2d:Transformation"); endClass(); geom2d:Transformation .. rdfs:subClassOf = geom:Transformation; geom2d:Transformation . rdfs:comment = "The class of all functions with geom2d:Point as domain and range"; allocate("geom2d:a",Property); allocate("geom2d:b",Property); allocate("geom2d:c",Property); allocate("geom2d:d",Property); allocate("geom2d:e",Property); allocate("geom2d:f",Property); class("geom2d:Matrix"); restrict geom2d:a {cardinality 1;allValuesFrom double} restrict geom2d:b {cardinality 1;allValuesFrom double} restrict geom2d:c {cardinality 1;allValuesFrom double} restrict geom2d:d {cardinality 1;allValuesFrom double} restrict geom2d:e {cardinality 1;allValuesFrom double} restrict geom2d:f {cardinality 1;allValuesFrom double} endClass(); geom2d:Matrix .. rdfs:subClassOf = geom2d:Transformation; geom2d:Matrix .. rdfs:comment = "Corresponds to the matrix transform definition in SVG"; class("geom2d:Group"); restrict geom:elements {cardinality 1;allValuesFrom SeqOf(geom2d:Shape)} endClass(); geom2d:Group .. rdfs:subClassOf = geom:Group; geom2d:Group .. rdfs:subClassOf = geom2d:Shape; class("geom2d:Curve"); endClass(); geom2d:Curve .. rdfs:subClassOf = geom2d:Shape; geom2d:Curve .. rdfs:subClassOf = geom:Curve; allocate("geom2d:u",Property); allocate("geom2d:v",Property); allocate("geom2d:w",Property); class("geom2d:Line"); restrict geom2d:u {cardinality 1;allValuesFrom double} restrict geom2d:v {cardinality 1;allValuesFrom double} restrict geom2d:w {cardinality 1;allValuesFrom double} endClass(); geom2d:Line.rdfs:comment = "The set of points (x,y) satisfying the equation u*x + v*y + w = 0"; class("geom2d:Ray"); restrict geom:end0 {cardinality 1;allValuesFrom geom2d:Point} restrict geom:direction {cardinality 1;allValuesFrom geom2d:Point} endClass(); geom2d:Ray.rdfs:comment = "The set of points (x,y) of the form end0 + t*direction, for t >= 0"; class("geom2d:CurveSegment"); restrict geom:end0 {cardinality 1;allValuesFrom geom2d:Point} restrict geom:end1 {cardinality 1;allValuesFrom geom2d:Point} endClass(); geom2d:CurveSegment .. rdfs:subClassOf = geom2d:Curve; geom2d:CurveSegment .. rdfs:subClassOf = geom:CurveSegment; class("geom2d:ClosedCurve"); endClass(); geom2d:ClosedCurve .. rdfs:subClassOf = geom2d:Curve; geom2d:ClosedCurve .. rdfs:subClassOf = geom:ClosedCurve; class("geom2d:FilledCurve"); restrict geom:boundary {cardinality 1;allValuesFrom geom2d:ClosedCurve} endClass(); geom2d:FilledCurve .. rdfs:subClassOf = geom2d:Shape; geom2d:FilledCurve . rdfs:comment = "The interior of a non-self-intersecting ClosedCurve"; class("geom2d:LineSegment"); restrict geom:end0 {cardinality 1;allValuesFrom geom2d:Point} restrict geom:end1 {cardinality 1;allValuesFrom geom2d:Point} endClass(); geom2d:LineSegment .. rdfs:subClassOf = geom2d:CurveSegment; geom2d:LineSegment .. rdfs:subClassOf = geom:LineSegment; class("geom2d:Polyline"); restrict geom:points {cardinality 1;allValuesFrom SeqOf(geom2d:Point)} endClass(); geom2d:Polyline .. rdfs:subClassOf = geom2d:Curve; geom2d:Polyline .. rdfs:subClassOf = geom:Polyline; class("geom2d:Polygon"); restrict geom:boundary {cardinality 1;allValuesFrom geom2d:Polyline} endClass(); geom2d:Polygon.. rdfs:subClassOf = geom2d:FilledCurve; geom2d:Polygon . rdfs:comment = "A FilledCurve whose boundary is a Polyline"; allocate("geom2d:pathData",Property); class("geom2d:SVGPath"); restrict geom2d:pathData {cardinality 1;allValuesFrom string} endClass(); geom2d:SVGPath . rdfs:comment = "A curve defined using the SVG path syntax"; class("geom2d:Box"); restrict geom:xmin {cardinality 1;allValuesFrom double} restrict geom:xmax {cardinality 1;allValuesFrom double} restrict geom:ymin {cardinality 1;allValuesFrom double} restrict geom:ymax {cardinality 1;allValuesFrom double} endClass(); geom2d:Box .. rdfs:subClassOf = geom2d:Shape; geom2d:Box .. rdfs:subClassOf = geom:Box; geom2d:Box .. rdfs:subClassOf = geom2d:Shape; geom2d:Box .. rdfs:subClassOf = geom:Box; class("geom2d:Circle"); restrict geom:center {cardinality 1;allValuesFrom geom2d:Point} restrict geom:radius {cardinality 1;allValuesFrom double} endClass();