All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.wietmazairac.bimql.get.attribute.GetAttributeSubIfcShapeAspect Maven / Gradle / Ivy

package nl.wietmazairac.bimql.get.attribute;

import java.util.ArrayList;

import org.bimserver.models.ifc2x3tc1.IfcShapeAspect;

public class GetAttributeSubIfcShapeAspect {
	// fields
	private Object object;
	private String string;

	// constructors
	public GetAttributeSubIfcShapeAspect(Object object, String string) {
		this.object = object;
		this.string = string;
	}

	// methods
	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

	public String getString() {
		return string;
	}

	public void setString(String string) {
		this.string = string;
	}

	public ArrayList getResult() {
	ArrayList resultList = new ArrayList();
		if (string.equals("PartOfProductDefinitionShape")) {
			resultList.add(((IfcShapeAspect) object).getPartOfProductDefinitionShape());
			 //1IfcProductDefinitionShape
		}
		else if (string.equals("ShapeRepresentations")) {
			//3xxx
			for (int i = 0; i < ((IfcShapeAspect) object).getShapeRepresentations().size(); i++) {
				resultList.add(((IfcShapeAspect) object).getShapeRepresentations().get(i));
			}
			 //1EList
		}
		else if (string.equals("Name")) {
			resultList.add(((IfcShapeAspect) object).getName());
			 //1String
		}
		else if (string.equals("Description")) {
			resultList.add(((IfcShapeAspect) object).getDescription());
			 //1String
		}
		return resultList;
	}
}