org.citygml4j.cityjson.CityJSON Java Examples

The following examples show how to use org.citygml4j.cityjson.CityJSON. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CityJSONReader.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
public CityModel read() throws CityJSONReadException {
	// prepare builder
	builder.registerTypeAdapterFactory(new CityJSONTypeAdapterFactory()
			.withTypeFilter(typeFilter)
			.processUnknownExtensions(processUnknownExtensions));

	CityJSON cityJSON;
	try {
		cityJSON = builder.create().fromJson(reader, CityJSON.class);
	} catch (JsonIOException | JsonSyntaxException e) {
		throw new CityJSONReadException("Caused by: ", e);
	}

	if (cityJSON != null) {
		metadata = cityJSON.getMetadata();
		return unmarshaller.unmarshal(cityJSON);
	}

	return null;
}
 
Example #2
Source File: ReliefMarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObjectType> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObjectType>create()
						.with(ReliefFeature.class, this::marshalReliefFeature)
						.with(TINRelief.class, this::marshalTINRelief);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #3
Source File: ADEUnmarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
public AbstractFeature unmarshalCityObject(AbstractCityObjectType src, CityJSON cityJSON, AbstractFeature parent) {
    if (unmarshallersByType != null) {
        CityJSONExtensionUnmarshaller unmarshaller = unmarshallersByType.get(src.getType());
        if (unmarshaller != null)
            return unmarshaller.unmarshalCityObject(src, new CityObjectContext(parent, cityJSON));
    }

    else if (src.hasLocalProperty(CityObjectTypeAdapter.UNKNOWN_EXTENSION) && src instanceof GenericCityObjectType) {
        // map unknown extension
        GenericCityObject dest = json.getCityGMLUnmarshaller().getGenericsUnmarshaller().unmarshalGenericCityObject((GenericCityObjectType) src, cityJSON);

        String type = src.getType();
        if (type.startsWith("+"))
            type = type.substring(1);

        dest.setClazz(new Code(type));

        dest.setLocalProperty(CityObjectTypeAdapter.UNKNOWN_EXTENSION, true);
        json.getCityGMLUnmarshaller().getCoreUnmarshaller().unmarshalAsGlobalFeature(dest);

        return dest;
    }

    return null;
}
 
Example #4
Source File: TransportationMarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObjectType> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObjectType>create()
						.with(Road.class, this::marshalRoad)
						.with(Railway.class, this::marshalRailway)
						.with(Square.class, this::marshalSquare);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #5
Source File: TunnelUnmarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObject> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObject>create()
						.with(TunnelType.class, this::unmarshalTunnel)
						.with(TunnelPartType.class, this::unmarshalTunnelPart)
						.with(TunnelInstallationType.class, this::unmarshalTunnelInstallation);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #6
Source File: TransportationUnmarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObject> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObject>create()
						.with(RoadType.class, this::unmarshalRoad)
						.with(RailwayType.class, this::unmarshalRailway)
						.with(TransportSquareType.class, this::unmarshalTransportSquare);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #7
Source File: VegetationUnmarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObject> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObject>create()
						.with(PlantCoverType.class, this::unmarshalPlantCover)
						.with(SolitaryVegetationObjectType.class, this::unmarshalSolitaryVegetationObject);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #8
Source File: BuildingUnmarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObject> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObject>create()
						.with(BuildingType.class, this::unmarshalBuilding)
						.with(BuildingPartType.class, this::unmarshalBuildingPart)
						.with(BuildingInstallationType.class, this::unmarshalBuildingInstallation);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #9
Source File: CityJSONChunkWriter.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
public void writeCityObject(AbstractCityObject cityObject) throws CityJSONWriteException {
	switch (documentState) {
	case END_DOCUMENT:
		throw new IllegalStateException("CityJSON document is already complete.");
	case INITIAL:
		writeStartDocument();
		break;
	case START_DOCUMENT:
		break;
	}

	CityJSON cityJSON = new CityJSON();
	AbstractCityObjectType dest = marshaller.marshal(cityObject, cityJSON);

	for (AbstractCityObjectType child : cityJSON.getCityObjects())
		write(child);

	if (cityJSON.isSetExtensionProperties())
		extensionProperties.putAll(cityJSON.getExtensionProperties());

	write(dest);
}
 
Example #10
Source File: CityJSONWriter.java    From web-feature-service with Apache License 2.0 6 votes vote down vote up
@Override
public void write(AbstractFeature feature, long sequenceId) throws FeatureWriteException {
	if (feature instanceof AbstractCityObject) {
		if (checkForDuplicates && isFeatureAlreadyExported(feature))
			return;

		// security feature: strip geometry from features
		if (geometryStripper != null)
			feature.accept(geometryStripper);

		CityJSON cityJSON = new CityJSON();
		AbstractCityObjectType dest = marshaller.marshal((AbstractCityObject) feature, cityJSON);

		for (AbstractCityObjectType child : cityJSON.getCityObjects())
			writerPool.addWork(child);

		if (cityJSON.isSetExtensionProperties())
			cityJSON.getExtensionProperties().forEach(writer::addRootExtensionProperty);

		writerPool.addWork(dest);
	}
}
 
Example #11
Source File: TunnelMarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObjectType> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObjectType>create()
						.with(Tunnel.class, this::marshalTunnel)
						.with(TunnelPart.class, this::marshalTunnelPart)
						.with(TunnelInstallation.class, this::marshalTunnelInstallation);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #12
Source File: BuildingMarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObjectType> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObjectType>create()
						.with(Building.class, this::marshalBuilding)
						.with(BuildingPart.class, this::marshalBuildingPart)
						.with(BuildingInstallation.class, this::marshalBuildingInstallation);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #13
Source File: VegetationMarshaller.java    From citygml4j with Apache License 2.0 6 votes vote down vote up
private BiFunctionTypeMapper<CityJSON, AbstractCityObjectType> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = BiFunctionTypeMapper.<CityJSON, AbstractCityObjectType>create()
						.with(PlantCover.class, this::marshalPlantCover)
						.with(SolitaryVegetationObject.class, this::marshalSolitaryVegetationObject);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 
Example #14
Source File: CityJSONWriter.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
public void write(CityModel cityModel) throws CityJSONWriteException {
	if (documentState == DocumentState.END_DOCUMENT)
		throw new IllegalStateException("CityJSON document is already complete.");

	CityJSON cityJSON = marshaller.marshal(cityModel);
	if (cityJSON != null) {
		// add metadata
		MetadataType metadata = this.metadata != null ? this.metadata : new MetadataType();
		cityJSON.setMetadata(metadata);

		if (!metadata.isSetGeographicalExtent() && !cityJSON.getVertices().isEmpty()) {
			List<Double> bbox = cityJSON.calcBoundingBox();
			if (cityJSON.isSetTransform()) {
				TransformType transform = cityJSON.getTransform();
				for (int i = 0; i < bbox.size(); i++)
					bbox.set(i, bbox.get(i) * transform.getScale().get(i%3) + transform.getTranslate().get(i%3));
			}
			
			metadata.setGeographicalExtent(bbox);
		}

		if (!metadata.isSetPresentLoDs() && cityJSON.hasCityObjects())
			metadata.setPresentLoDs(cityJSON.calcPresentLoDs());

		// add extensions
		if (extensions != null)
			cityJSON.setExtensions(extensions);

		gson.toJson(cityJSON, CityJSON.class, writer);
	}

	documentState = DocumentState.END_DOCUMENT;
}
 
Example #15
Source File: LandUseUnmarshaller.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
public void unmarshalLandUse(LandUseType src, LandUse dest, CityJSON cityJSON) {
	citygml.getCoreUnmarshaller().unmarshalAbstractCityObject(src, dest, cityJSON);
	
	if (src.isSetAttributes()) {
		Attributes attributes = src.getAttributes();
		if (attributes.isSetClazz())
			dest.setClazz(new Code(attributes.getClazz()));

		if (attributes.isSetFunction())
			dest.addFunction(new Code(attributes.getFunction()));

		if (attributes.isSetUsage())
			dest.addUsage(new Code(attributes.getUsage()));
	}
	
	for (AbstractGeometryType geometryType : src.getGeometry()) {
		if (geometryType instanceof AbstractSurfaceCollectionType) {
			AbstractSurfaceCollectionType surfaceType = (AbstractSurfaceCollectionType)geometryType;
			MultiSurface multiSurface = json.getGMLUnmarshaller().unmarshalMultiSurface(surfaceType, dest);
			
			if (multiSurface != null) {
				int lod = surfaceType.getLod().intValue();
				switch (lod) {
				case 0:
					dest.setLod0MultiSurface(new MultiSurfaceProperty(multiSurface));
					break;
				case 1:
					dest.setLod1MultiSurface(new MultiSurfaceProperty(multiSurface));
					break;
				case 2:
					dest.setLod2MultiSurface(new MultiSurfaceProperty(multiSurface));
					break;
				case 3:
					dest.setLod3MultiSurface(new MultiSurfaceProperty(multiSurface));
					break;
				}
			}
		}	
	}
}
 
Example #16
Source File: CityGMLUnmarshaller.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
public AbstractCityObject unmarshal(AbstractCityObjectType src, CityJSON cityJSON) {
	AbstractCityObject dest = null;
	
	if (src instanceof BridgeType)
		dest = brid.unmarshal(src, cityJSON);
	else if (src instanceof BuildingType)
		dest = bldg.unmarshal(src, cityJSON);
	else if (src instanceof CityFurnitureType)
		dest = frn.unmarshalCityFurniture((CityFurnitureType) src, cityJSON);
	else if (src instanceof CityObjectGroupType)
		dest = grp.unmarshalCityObjectGroup((CityObjectGroupType) src, cityJSON);
	else if (src instanceof GenericCityObjectType)
		dest = gen.unmarshalGenericCityObject((GenericCityObjectType) src, cityJSON);
	else if (src instanceof LandUseType)
		dest = luse.unmarshalLandUse((LandUseType) src, cityJSON);
	else if (src instanceof TINReliefType)
		dest = dem.unmarshalTINRelief((TINReliefType) src, cityJSON);
	else if (src instanceof AbstractTransportationComplexType)
		dest = tran.unmarshal(src, cityJSON);
	else if (src instanceof TunnelType)
		dest = tun.unmarshal(src, cityJSON);
	else if (src instanceof AbstractVegetationObjectType)
		dest = veg.unmarshal(src, cityJSON);
	else if (src instanceof WaterBodyType)
		dest = wtr.unmarshalWaterBody((WaterBodyType) src, cityJSON);
	
	return dest;
}
 
Example #17
Source File: CoreUnmarshaller.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
private void releaseObjectHierarchy(AbstractCityObjectType parent, CityJSON src) {
	if (parent.isSetChildren()) {
		for (String gmlId : parent.getChildren()) {
			AbstractCityObjectType child = src.getCityObject(gmlId);
			if (child.isSetParents() && child.getParents().size() == 1) {
				releaseObjectHierarchy(child, src);
				src.removeCityObject(gmlId);
			}
		}
	}
}
 
Example #18
Source File: CoreMarshaller.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
public void marshalAbstractCityObject(AbstractCityObject src, AbstractCityObjectType dest, CityJSON cityJSON) {
	dest.setGmlId(src.isSetId() && !src.getId().isEmpty() ? src.getId() : DefaultGMLIdManager.getInstance().generateUUID());

	if (src.isSetBoundedBy() && src.getBoundedBy().isSetEnvelope())
		dest.setGeographicalExtent(src.getBoundedBy().getEnvelope().toBoundingBox().toList());

	Attributes attributes = dest.getAttributes();
	if (src.isSetDescription() && src.getDescription().isSetValue())
		attributes.setDescription(src.getDescription().getValue());

	if (src.isSetName()) {
		for (Code name : src.getName()) {
			if (name.isSetValue()) {
				attributes.setName(name.getValue());
				break;
			}
		}
	}

	if (src.isSetCreationDate())
		attributes.setCreationDate(src.getCreationDate());

	if (src.isSetTerminationDate())
		attributes.setTerminationDate(src.getTerminationDate());

	if (src.isSetGenericAttribute())
		citygml.getGenericsMarshaller().marshalGenericAttributes(src, attributes);

	if (src.isSetGenericApplicationPropertyOfCityObject())
		json.getADEMarshaller().marshal(src.getGenericApplicationPropertyOfCityObject(), dest, cityJSON);
}
 
Example #19
Source File: LandUseMarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public AbstractCityObjectType marshal(ModelObject src, CityJSON cityJSON) {
	if (src instanceof LandUse)
		return marshalLandUse((LandUse) src, cityJSON);
	
	return null;
}
 
Example #20
Source File: TransportationUnmarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public Square unmarshalTransportSquare(TransportSquareType src, CityJSON cityJSON) {
	Square dest = new Square();
	unmarshalTransportSquare(src, dest, cityJSON);

	return dest;
}
 
Example #21
Source File: BuildingUnmarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public BuildingPart unmarshalBuildingPart(BuildingPartType src, CityJSON cityJSON) {
	BuildingPart dest = new BuildingPart();
	unmarshalBuildingPart(src, dest, cityJSON);

	return dest;
}
 
Example #22
Source File: TunnelUnmarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public void unmarshalAbstractTunnel(AbstractTunnelType src, AbstractTunnel dest, CityJSON cityJSON) {
	citygml.getCoreUnmarshaller().unmarshalAbstractCityObject(src, dest, cityJSON);

	if (src.isSetAttributes()) {
		TunnelAttributes attributes = src.getAttributes();

		if (attributes.isSetClazz())
			dest.setClazz(new Code(attributes.getClazz()));

		if (attributes.isSetFunction())
			dest.addFunction(new Code(attributes.getFunction()));

		if (attributes.isSetUsage())
			dest.addUsage(new Code(attributes.getUsage()));

		if (attributes.isSetYearOfConstruction())
			dest.setYearOfConstruction(LocalDate.of(attributes.getYearOfConstruction(), 1, 1));

		if (attributes.isSetYearOfDemolition())
			dest.setYearOfConstruction(LocalDate.of(attributes.getYearOfDemolition(), 1, 1));
	}

	for (AbstractGeometryType geometryType : src.getGeometry()) {
		AbstractGeometry geometry = null;
		int lod = 0;

		if (geometryType instanceof AbstractGeometryObjectType) {
			AbstractGeometryObjectType geometryObject = (AbstractGeometryObjectType) geometryType;
			geometry = json.getGMLUnmarshaller().unmarshal(geometryObject, dest);
			lod = geometryObject.getLod().intValue();
		} else if (geometryType instanceof GeometryInstanceType) {
			GeometryInstanceType geometryInstance = (GeometryInstanceType) geometryType;
			geometry = citygml.getCoreUnmarshaller().unmarshalAndTransformGeometryInstance(geometryInstance, dest);
			lod = (int) geometry.getLocalProperty(CityJSONUnmarshaller.GEOMETRY_INSTANCE_LOD);
		}

		if (geometry != null) {
			if (geometry instanceof MultiSurface) {
				MultiSurface multiSurface = (MultiSurface) geometry;
				switch (lod) {
					case 1:
						dest.setLod1MultiSurface(new MultiSurfaceProperty(multiSurface));
						break;
					case 2:
						dest.setLod2MultiSurface(new MultiSurfaceProperty(multiSurface));
						break;
					case 3:
						dest.setLod3MultiSurface(new MultiSurfaceProperty(multiSurface));
						break;
				}
			} else if (geometry instanceof AbstractSolid) {
				AbstractSolid solid = (AbstractSolid) geometry;
				switch (lod) {
					case 1:
						dest.setLod1Solid(new SolidProperty(solid));
						break;
					case 2:
						dest.setLod2Solid(new SolidProperty(solid));
						break;
					case 3:
						dest.setLod3Solid(new SolidProperty(solid));
						break;
				}
			}
		}
	}

	if (src.isSetChildren()) {
		for (String gmlId : src.getChildren()) {
			AbstractCityObjectType cityObject = cityJSON.getCityObject(gmlId);
			if (cityObject == null || !json.getCityJSONRegistry().isCoreCityObject(cityObject.getType()))
				continue;

			if (cityObject instanceof TunnelInstallationType) {
				TunnelInstallation installation = unmarshalTunnelInstallation((TunnelInstallationType) cityObject, cityJSON);
				dest.addOuterTunnelInstallation(new TunnelInstallationProperty(installation));
			} else if (cityObject instanceof TunnelPartType && src instanceof TunnelType) {
				TunnelPart part = unmarshalTunnelPart((TunnelPartType) cityObject, cityJSON);
				dest.addConsistsOfTunnelPart(new TunnelPartProperty(part));
			}
		}
	}
}
 
Example #23
Source File: BridgeUnmarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public void unmarshalBridgePart(BridgePartType src, BridgePart dest, CityJSON cityJSON) {
	unmarshalAbstractBridge(src, dest, cityJSON);
}
 
Example #24
Source File: ReliefMarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public AbstractCityObjectType marshal(ModelObject src, CityJSON cityJSON) {
	return getTypeMapper().apply(src, cityJSON);
}
 
Example #25
Source File: GenericsUnmarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public AbstractCityObject unmarshal(AbstractCityObjectType src, CityJSON cityJSON) {
    if (src instanceof GenericCityObjectType)
        return unmarshalGenericCityObject((GenericCityObjectType) src, cityJSON);

    return null;
}
 
Example #26
Source File: TransportationUnmarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public void unmarshalRailway(RailwayType src, Railway dest, CityJSON cityJSON) {
	unmarshalTransportationComplex(src, dest, cityJSON);
}
 
Example #27
Source File: VegetationUnmarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public void unmarshalPlantCover(PlantCoverType src, PlantCover dest, CityJSON cityJSON) {
	unmarshalAbstractVegetationObject(src, dest, cityJSON);
	
	if (src.isSetAttributes()) {
		PlantCoverAttributes attributes = src.getAttributes();
		
		if (attributes.isSetClazz())
			dest.setClazz(new Code(attributes.getClazz()));

		if (attributes.isSetFunction())
			dest.addFunction(new Code(attributes.getFunction()));

		if (attributes.isSetUsage())
			dest.addUsage(new Code(attributes.getUsage()));
		
		if (attributes.isSetAverageHeight())
			dest.setAverageHeight(new Length(attributes.getAverageHeight()));
	}
	
	for (AbstractGeometryType geometryType : src.getGeometry()) {
		AbstractGeometry geometry = null;
		int lod = 0;

		if (geometryType instanceof AbstractGeometryObjectType) {
			AbstractGeometryObjectType geometryObject = (AbstractGeometryObjectType) geometryType;
			geometry = json.getGMLUnmarshaller().unmarshal(geometryObject, dest);
			geometryObject.getLod().intValue();
		} else if (geometryType instanceof GeometryInstanceType) {
			GeometryInstanceType geometryInstance = (GeometryInstanceType) geometryType;
			geometry = citygml.getCoreUnmarshaller().unmarshalAndTransformGeometryInstance(geometryInstance, dest);
			lod = (int) geometry.getLocalProperty(CityJSONUnmarshaller.GEOMETRY_INSTANCE_LOD);
		}

		if (geometry != null) {
			if (geometry instanceof MultiSurface) {
				MultiSurface multiSurface = (MultiSurface) geometry;
				switch (lod) {
					case 1:
						dest.setLod1MultiSurface(new MultiSurfaceProperty(multiSurface));
						break;
					case 2:
						dest.setLod2MultiSurface(new MultiSurfaceProperty(multiSurface));
						break;
					case 3:
						dest.setLod3MultiSurface(new MultiSurfaceProperty(multiSurface));
						break;
				}
			} else if (geometry instanceof MultiSolid) {
				MultiSolid multiSolid = (MultiSolid) geometry;
				switch (lod) {
					case 1:
						dest.setLod1MultiSolid(new MultiSolidProperty(multiSolid));
						break;
					case 2:
						dest.setLod2MultiSolid(new MultiSolidProperty(multiSolid));
						break;
					case 3:
						dest.setLod3MultiSolid(new MultiSolidProperty(multiSolid));
						break;
				}
			}
		}
	}
}
 
Example #28
Source File: BuildingMarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public BuildingPartType marshalBuildingPart(BuildingPart src, CityJSON cityJSON) {
	BuildingPartType dest = new BuildingPartType();
	marshalBuildingPart(src, dest, cityJSON);

	return dest;
}
 
Example #29
Source File: BuildingMarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public void marshalBuildingPart(BuildingPart src, BuildingPartType dest, CityJSON cityJSON) {
	marshalAbstractBuilding(src, dest, cityJSON);

	if (src.isSetGenericApplicationPropertyOfBuildingPart())
		json.getADEMarshaller().marshal(src.getGenericApplicationPropertyOfBuildingPart(), dest, cityJSON);
}
 
Example #30
Source File: BuildingMarshaller.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public BuildingType marshalBuilding(Building src, CityJSON cityJSON) {
	BuildingType dest = new BuildingType();
	marshalBuilding(src, dest, cityJSON);

	return dest;
}