var SStruct = Class.create();
SStruct.prototype = {
	initialize : function(options) {
		this.initializeSStruct(options);
	},
	
	initializeSStruct : function(options) {
		this.init(options);
	},
	
	init : function(options) {
		if (!options)
			return;
		Object.extend(this, options);
		this.options = options;
	},
	
	getParent : function() {
		return this.parent;
	},
	
	setParent : function(p) {
		this.parent = p;
	},
	
	getChildren : function() {
		return this.children;
	},
	
	getSymbol : function() {
		return this.symbol;
	},
	
	setSymbol : function(s) {
		this.symbol = s;
	},
	
	getName : function() {
		return this.name;
	},
	
	setName : function(n) {
		this.name = n;
	},
	
	getDescription : function() {
		return this.description;
	},
	
	setDescription : function(d) {
		this.description = d;
	},
	
	getPrimitiveType : function() {
		return this.primitive;
	},
	
	setPrimitiveType : function(p) {
		this.primitive = p;
	},
	
	addChild : function(struct) {
		struct.setParent(this);
		this.getChildren().push(struct);
	},
	
	isPrimitive : function() {
		return this.primitive;
	},
	
	isComplex : function() {
		return this.complex;
	},
	
	isCollection : function() {
		return this.collection;
	},
	
	/*
	 * Returns true if this struct is primitive and geo-based. 
	 * Otherwise false.
	 */
	isGeo : function() {
		return this.geo
	},
	
	/*
	 * Returns true, if this struct or one of its children is geo-based.
	 * Otherwise false.
	 */
	isAGeo : function() {
		return this.aGeo || this.isGeo();
	},
	
	/**
	 * Returns true, if this struct is root.
	 * Otherwise false.
	 */
	isRoot : function() {
		return this.root;
	},
	
	/*
	 * Returns the geo-type of this struct if it is geo-based.
	 * Otherwise null.
	 */
	getGeomType : function() {
		return this.getPrimitiveType();
	}
};