• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java WaterSurface类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.citygml4j.model.citygml.waterbody.WaterSurface的典型用法代码示例。如果您正苦于以下问题:Java WaterSurface类的具体用法?Java WaterSurface怎么用?Java WaterSurface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

WaterSurface类属于org.citygml4j.model.citygml.waterbody包,在下文中一共展示了WaterSurface类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getElementMapper

点赞 3

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
private TypeMapper<JAXBElement<?>> getElementMapper() {
	if (elementMapper == null) {
		lock.lock();
		try {
			if (elementMapper == null) {
				elementMapper = TypeMapper.<JAXBElement<?>>create()
						.with(WaterBody.class, this::createWaterBody)
						.with(WaterClosureSurface.class, this::createWaterClosureSurface)
						.with(WaterGroundSurface.class, this::createWaterGroundSurface)
						.with(WaterSurface.class, this::createWaterSurface);
			}
		} finally {
			lock.unlock();
		}
	}

	return elementMapper;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:19,
代码来源:WaterBody200Marshaller.java

示例2: getTypeMapper

点赞 3

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
private TypeMapper<Object> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = TypeMapper.create()
						.with(BoundedByWaterSurfaceProperty.class, this::marshalBoundedByWaterSurfaceProperty)
						.with(WaterBody.class, this::marshalWaterBody)
						.with(WaterClosureSurface.class, this::marshalWaterClosureSurface)
						.with(WaterGroundSurface.class, this::marshalWaterGroundSurface)
						.with(WaterSurface.class, this::marshalWaterSurface);	
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:20,
代码来源:WaterBody200Marshaller.java

示例3: getTypeMapper

点赞 3

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
private TypeMapper<Object> getTypeMapper() {
	if (typeMapper == null) {
		lock.lock();
		try {
			if (typeMapper == null) {
				typeMapper = TypeMapper.create()
						.with(BoundedByWaterSurfaceProperty.class, this::marshalBoundedByWaterSurfaceProperty)
						.with(WaterBody.class, this::marshalWaterBody)
						.with(WaterClosureSurface.class, this::marshalWaterClosureSurface)
						.with(WaterGroundSurface.class, this::marshalWaterGroundSurface)
						.with(WaterSurface.class, this::marshalWaterSurface);
			}
		} finally {
			lock.unlock();
		}
	}

	return typeMapper;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:20,
代码来源:WaterBody100Marshaller.java

示例4: assignGenericProperty

点赞 3

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public boolean assignGenericProperty(ADEGenericElement genericProperty, QName substitutionGroup, CityGML dest) {
	String name = substitutionGroup.getLocalPart();
	boolean success = true;

	if (dest instanceof AbstractWaterObject && name.equals("_GenericApplicationPropertyOfWaterObject"))
		((AbstractWaterObject)dest).addGenericApplicationPropertyOfWaterObject(genericProperty);		
	else if (dest instanceof AbstractWaterBoundarySurface && name.equals("_GenericApplicationPropertyOfWaterBoundarySurface"))
		((AbstractWaterBoundarySurface)dest).addGenericApplicationPropertyOfWaterBoundarySurface(genericProperty);		
	else if (dest instanceof WaterBody && name.equals("_GenericApplicationPropertyOfWaterBody"))
		((WaterBody)dest).addGenericApplicationPropertyOfWaterBody(genericProperty);		
	else if (dest instanceof WaterClosureSurface && name.equals("_GenericApplicationPropertyOfWaterClosureSurface"))
		((WaterClosureSurface)dest).addGenericApplicationPropertyOfWaterClosureSurface(genericProperty);		
	else if (dest instanceof WaterGroundSurface && name.equals("_GenericApplicationPropertyOfWaterGroundSurface"))
		((WaterGroundSurface)dest).addGenericApplicationPropertyOfWaterGroundSurface(genericProperty);		
	else if (dest instanceof WaterSurface && name.equals("_GenericApplicationPropertyOfWaterSurface"))
		((WaterSurface)dest).addGenericApplicationPropertyOfWaterSurface(genericProperty);		
	else
		success = false;

	return success;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:22,
代码来源:WaterBody100Unmarshaller.java

示例5: marshalSemantics

点赞 3

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public SemanticsType marshalSemantics(AbstractCityObject cityObject) {
	SemanticsType semantics = null;

	if (cityObject instanceof WaterSurface) {
		semantics = new SemanticsType(SemanticsTypeName.WATER_SURFACE);
		marshalWaterSurface((WaterSurface)cityObject, semantics);
	} else if (cityObject instanceof WaterGroundSurface)
		semantics = new SemanticsType(SemanticsTypeName.WATER_GROUND_SURFACE);
	else if (cityObject instanceof WaterClosureSurface)
		semantics = new SemanticsType(SemanticsTypeName.WATER_CLOSURE_SURFACE);

	if (semantics != null && cityObject.isSetGenericAttribute())
		citygml.getGenericsMarshaller().marshalSemanticsAttributes(cityObject.getGenericAttribute(), semantics);

	return semantics;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:17,
代码来源:WaterBodyMarshaller.java

示例6: visit

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public void visit(WaterSurface waterSurface) {
	visit((AbstractWaterBoundarySurface)waterSurface);

	if (waterSurface.isSetGenericApplicationPropertyOfWaterSurface())
		for (ADEComponent ade : waterSurface.getGenericApplicationPropertyOfWaterSurface())
			visit(ade);
}
 

开发者ID:3dcitydb,
项目名称:importer-exporter,
代码行数:8,
代码来源:ADEPropertyCollector.java

示例7: apply

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public T apply(WaterSurface waterSurface) {
	T object = apply((AbstractWaterBoundarySurface)waterSurface);
	if (object != null)
		return object;

	if (waterSurface.isSetGenericApplicationPropertyOfWaterSurface()) {
		for (ADEComponent ade : new ArrayList<ADEComponent>(waterSurface.getGenericApplicationPropertyOfWaterSurface())) {
			object = apply(ade);
			if (object != null)
				return object;
		}
	}

	return null;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:16,
代码来源:GMLFunctionWalker.java

示例8: visit

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public void visit(WaterSurface waterSurface) {
	visit((AbstractWaterBoundarySurface)waterSurface);

	if (waterSurface.isSetGenericApplicationPropertyOfWaterSurface())
		for (ADEComponent ade : new ArrayList<ADEComponent>(waterSurface.getGenericApplicationPropertyOfWaterSurface()))
			visit(ade);
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:8,
代码来源:GMLWalker.java

示例9: marshalWaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public void marshalWaterSurface(WaterSurface src, WaterSurfaceType dest) {
	marshalAbstractWaterBoundarySurface(src, dest);

	if (src.isSetWaterLevel())
		dest.setWaterLevel(jaxb.getGMLMarshaller().marshalCode(src.getWaterLevel()));

	if (src.isSetGenericApplicationPropertyOfWaterSurface()) {
		for (ADEComponent adeComponent : src.getGenericApplicationPropertyOfWaterSurface()) {
			JAXBElement<Object> jaxbElement = jaxb.getADEMarshaller().marshalJAXBElement(adeComponent);
			if (jaxbElement != null)
				dest.get_GenericApplicationPropertyOfWaterSurface().add(jaxbElement);
		}
	}
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:15,
代码来源:WaterBody200Marshaller.java

示例10: marshalWaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public void marshalWaterSurface(WaterSurface src, WaterSurfaceType dest) {
	marshalAbstractWaterBoundarySurface(src, dest);

	if (src.isSetWaterLevel())
		dest.setWaterLevel(src.getWaterLevel().getValue());

	if (src.isSetGenericApplicationPropertyOfWaterSurface()) {
		for (ADEComponent adeComponent : src.getGenericApplicationPropertyOfWaterSurface()) {
			JAXBElement<Object> jaxbElement = jaxb.getADEMarshaller().marshalJAXBElement(adeComponent);
			if (jaxbElement != null)
				dest.get_GenericApplicationPropertyOfWaterSurface().add(jaxbElement);
		}
	}
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:15,
代码来源:WaterBody100Marshaller.java

示例11: unmarshalWaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public void unmarshalWaterSurface(WaterSurfaceType src, WaterSurface dest) throws MissingADESchemaException {
	unmarshalAbstractWaterBoundarySurface(src, dest);

	if (src.isSetWaterLevel())
		dest.setWaterLevel(new Code(src.getWaterLevel()));

	if (src.isSet_GenericApplicationPropertyOfWaterSurface()) {
		for (JAXBElement<Object> elem : src.get_GenericApplicationPropertyOfWaterSurface()) {
			ADEModelObject ade = jaxb.getADEUnmarshaller().unmarshal(elem);
			if (ade != null)
				dest.addGenericApplicationPropertyOfWaterSurface(ade);
		}
	}
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:15,
代码来源:WaterBody100Unmarshaller.java

示例12: unmarshalWaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public void unmarshalWaterSurface(WaterSurfaceType src, WaterSurface dest) throws MissingADESchemaException {
	unmarshalAbstractWaterBoundarySurface(src, dest);

	if (src.isSetWaterLevel())
		dest.setWaterLevel(jaxb.getGMLUnmarshaller().unmarshalCode(src.getWaterLevel()));

	if (src.isSet_GenericApplicationPropertyOfWaterSurface()) {
		for (JAXBElement<Object> elem : src.get_GenericApplicationPropertyOfWaterSurface()) {
			ADEModelObject ade = jaxb.getADEUnmarshaller().unmarshal(elem);
			if (ade != null)
				dest.addGenericApplicationPropertyOfWaterSurface(ade);
		}
	}
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:15,
代码来源:WaterBody200Unmarshaller.java

示例13: unmarshalWaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public WaterSurface unmarshalWaterSurface(SemanticsType src, List<AbstractSurface> surfaces, Number lod) {
	WaterSurface dest = new WaterSurface();
	
	if (src.isSetProperties()) {
		Object attribute = src.getProperties().get("waterLevel");
		if (attribute instanceof String) {
			dest.setWaterLevel(new Code((String)attribute));
			src.getProperties().remove("waterLevel");
		}
	}
	
	unmarshalAbstractWaterBoundarySurface(src, dest, surfaces, lod);

	return dest;
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:16,
代码来源:WaterBodyUnmarshaller.java

示例14: CG_WaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public CG_WaterSurface(WaterSurface wS) {
  super(wS);
  this.setWaterLevel(wS.getWaterLevel());
}
 

开发者ID:IGNF,
项目名称:geoxygene,
代码行数:5,
代码来源:CG_WaterSurface.java

示例15: generateAbstractWaterBoundarySurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public static CG_WaterBoundarySurface generateAbstractWaterBoundarySurface(
  AbstractWaterBoundarySurface wBS) {

  if (wBS instanceof WaterGroundSurface) {

    return new CG_WaterGroundSurface((WaterGroundSurface) wBS);

  } else if (wBS instanceof WaterSurface) {

    return new CG_WaterSurface((WaterSurface) wBS);

  } else if (wBS instanceof WaterClosureSurface) {
    return new CG_WaterClosureSurface((WaterClosureSurface) wBS);

  } else {

    System.out.println("Classe non gérée AbstractWaterBoundarySurfaceType"
        + wBS.getCityGMLClass());

  }

  return null;

}
 

开发者ID:IGNF,
项目名称:geoxygene,
代码行数:25,
代码来源:CG_WaterBoundarySurface.java

示例16: doImport

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public long doImport(AbstractWaterBoundarySurface waterBoundarySurface, AbstractCityObject parent, long parentId) throws CityGMLImportException, SQLException {
	FeatureType featureType = importer.getFeatureType(waterBoundarySurface);
	if (featureType == null)
		throw new SQLException("Failed to retrieve feature type.");

	// import city object information
	long waterBoundarySurfaceId = cityObjectImporter.doImport(waterBoundarySurface, featureType);

	// import boundary surface information
	// primary id
	psWaterBoundarySurface.setLong(1, waterBoundarySurfaceId);

	// objectclass id
	psWaterBoundarySurface.setLong(2, featureType.getObjectClassId());

	// wtr:waterLevel
	if (waterBoundarySurface instanceof WaterSurface 
			&& ((WaterSurface)waterBoundarySurface).isSetWaterLevel() && ((WaterSurface)waterBoundarySurface).getWaterLevel().isSetValue()) {
		psWaterBoundarySurface.setString(3, ((WaterSurface)waterBoundarySurface).getWaterLevel().getValue());
		psWaterBoundarySurface.setString(4, ((WaterSurface)waterBoundarySurface).getWaterLevel().getCodeSpace());
	} else {
		psWaterBoundarySurface.setNull(3, Types.NULL);
		psWaterBoundarySurface.setNull(4, Types.VARCHAR);
	}

	// wtr:lodXMultiSurface
	for (int i = 0; i < 3; i++) {
		SurfaceProperty surfaceProperty = null;
		long surfaceGeometryId = 0;

		switch (i) {
		case 0:
			surfaceProperty = waterBoundarySurface.getLod2Surface();
			break;
		case 1:
			surfaceProperty = waterBoundarySurface.getLod3Surface();
			break;
		case 2:
			surfaceProperty = waterBoundarySurface.getLod4Surface();
			break;
		}

		if (surfaceProperty != null) {
			if (surfaceProperty.isSetSurface()) {
				surfaceGeometryId = surfaceGeometryImporter.doImport(surfaceProperty.getSurface(), waterBoundarySurfaceId);
				surfaceProperty.unsetSurface();
			} else {
				String href = surfaceProperty.getHref();
				if (href != null && href.length() != 0) {
					importer.propagateXlink(new DBXlinkSurfaceGeometry(
							featureType.getObjectClassId(), 
							waterBoundarySurfaceId, 
							href, 
							"LOD" + (i + 2) + "_SURFACE_ID"));
				}
			}
		}

		if (surfaceGeometryId != 0)
			psWaterBoundarySurface.setLong(5 + i, surfaceGeometryId);
		else
			psWaterBoundarySurface.setNull(5 + i, Types.NULL);
	}

	psWaterBoundarySurface.addBatch();
	if (++batchCounter == importer.getDatabaseAdapter().getMaxBatchSize())
		importer.executeBatch(TableEnum.WATERBOUNDARY_SURFACE);

	// boundary surface to water body
	if (parent instanceof WaterBody)
		bodyToSurfaceImporter.doImport(waterBoundarySurfaceId, parentId);
	
	// ADE-specific extensions
	if (importer.hasADESupport())
		importer.delegateToADEImporter(waterBoundarySurface, waterBoundarySurfaceId, featureType);

	return waterBoundarySurfaceId;
}
 

开发者ID:3dcitydb,
项目名称:importer-exporter,
代码行数:79,
代码来源:DBWaterBoundarySurface.java

示例17: createWaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
private JAXBElement<?> createWaterSurface(WaterSurface src) {
	return wtr.createWaterSurface(marshalWaterSurface(src));
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:4,
代码来源:WaterBody200Marshaller.java

示例18: marshalWaterSurface

点赞 2

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
private void marshalWaterSurface(WaterSurface src, SemanticsType dest) {
	if (src.isSetWaterLevel())
		dest.addProperty("waterLevel", src.getWaterLevel().getValue());
}
 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:5,
代码来源:WaterBodyMarshaller.java

示例19: visit

点赞 1

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public void visit(WaterSurface waterSurface); 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:2,
代码来源:FeatureVisitor.java

示例20: apply

点赞 1

import org.citygml4j.model.citygml.waterbody.WaterSurface; //导入依赖的package包/类
public T apply(WaterSurface waterSurface); 

开发者ID:citygml4j,
项目名称:citygml4j,
代码行数:2,
代码来源:FeatureFunctor.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)