Strabon

changeset 355:ae895563802f

added some comments
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon Jun 25 19:46:57 2012 +0300 (2012-06-25)
parents f5cfc1483751
children 0d7dbda7c52b
files generaldb/src/main/java/org/openrdf/sail/generaldb/model/GeneralDBPolyhedron.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/model/GeneralDBPolyhedron.java	Mon Jun 25 19:28:19 2012 +0300
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/model/GeneralDBPolyhedron.java	Mon Jun 25 19:46:57 2012 +0300
     1.3 @@ -8,12 +8,33 @@
     1.4  
     1.5  import com.vividsolutions.jts.io.ParseException;
     1.6  
     1.7 +/**
     1.8 + * 
     1.9 + * @author Manos Karpathiotakis <mk@di.uoa.gr>
    1.10 + *
    1.11 + */
    1.12 +public class GeneralDBPolyhedron extends RdbmsValue {
    1.13  
    1.14 -public class GeneralDBPolyhedron extends RdbmsValue{
    1.15 -
    1.16 +	private static final long serialVersionUID = -7751266742783048766L;
    1.17 +	
    1.18 +	/**
    1.19 +	 * The string representation of this value. The representation
    1.20 +	 * may be one of the Constraint-based, WKT, or GML encodings.
    1.21 +	 * 
    1.22 +	 * @see #setPolyhedronStringRep(StrabonPolyhedron)
    1.23 +	 */
    1.24  	private String polyhedronStringRep;
    1.25 +	
    1.26 +	/**
    1.27 +	 * The underlying strabon polyhedron
    1.28 +	 */
    1.29  	private StrabonPolyhedron polyhedron;
    1.30 +	
    1.31 +	/**
    1.32 +	 * The datatype of the polyhedron
    1.33 +	 */
    1.34  	private URI datatype;
    1.35 +	
    1.36  	/**
    1.37  	 * CONSTRUCTOR
    1.38  	 */
    1.39 @@ -29,6 +50,7 @@
    1.40  
    1.41  			e.printStackTrace();
    1.42  		}
    1.43 +		
    1.44  		setPolyhedronStringRep(this.polyhedron);
    1.45  		this.datatype = datatype;
    1.46  	}
    1.47 @@ -56,11 +78,13 @@
    1.48  		return polyhedronStringRep;
    1.49  	}
    1.50  
    1.51 -	public void setPolyhedronStringRep(StrabonPolyhedron polyhedron) throws  IOException, ClassNotFoundException {
    1.52 +	public void setPolyhedronStringRep(StrabonPolyhedron polyhedron) throws IOException, ClassNotFoundException {
    1.53  		//TODO kkyzir prepares this method
    1.54 -
    1.55 +		// TODO add GML
    1.56 +		
    1.57  		if (StrabonPolyhedron.EnableConstraintRepresentation) {
    1.58  			this.polyhedronStringRep = polyhedron.toConstraints();	
    1.59 +			
    1.60  		} else {
    1.61  			this.polyhedronStringRep = polyhedron.toWKT();
    1.62  		}		
    1.63 @@ -93,7 +117,7 @@
    1.64  		return new String("\""+this.polyhedronStringRep+";http://www.opengis.net/def/crs/EPSG/0/"
    1.65  				+this.getPolyhedron().getGeometry().getSRID()+"\"" + "^^<" + 
    1.66  				((StrabonPolyhedron.EnableConstraintRepresentation)  ? 
    1.67 -						StrabonPolyhedron.stRDFSemiLinearPointset : StrabonPolyhedron.ogcGeometry)
    1.68 +						StrabonPolyhedron.stRDFSemiLinearPointset : StrabonPolyhedron.WKT)
    1.69  						+">");
    1.70  	}
    1.71