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

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

java 10次浏览

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

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

示例1: getCityGMLModule

点赞 3

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
private CityGMLModule getCityGMLModule(Object src) {
	if (src != null) {
		moduleMatcher.reset(src.getClass().getPackage().getName());
		
		if (moduleMatcher.matches()) {
			String moduleString = moduleMatcher.group(1);
			if (moduleString == null)
				moduleString = "core";
			
			CityGMLModuleVersion version = moduleMatcher.group(2).equals("_2") ? CityGMLModuleVersion.v2_0_0 : CityGMLModuleVersion.v1_0_0;
			for (CityGMLModule module : Modules.getCityGMLModules()) {
				if (module.getVersion() == version && module.getType().toString().toLowerCase().equals(moduleString))
					return module;
			}	
		}
	}

	return null;
}
 

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

示例2: getCityGMLClass

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public CityGMLClass getCityGMLClass(QName featureTypeName) {
	Module module = Modules.getModule(featureTypeName.getNamespaceURI());
	if (module instanceof CityGMLModule) {
		CityGMLModule cityGMLModule = (CityGMLModule)module;
		return CityGMLClass.fromModelClass(cityGMLModule.getFeatureElementClass(featureTypeName.getLocalPart()));
	}

	return CityGMLClass.UNDEFINED;
}
 

开发者ID:3dcitydb,
项目名称:web-feature-service,
代码行数:10,
代码来源:FeatureTypeHandler.java

示例3: getCityGMLModules

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public List<CityGMLModule> getCityGMLModules() {
	List<CityGMLModule> result = new ArrayList<>();
	for (QName name : getAdvertisedFeatureTypes())
		result.add(Modules.getCityGMLModule(name.getNamespaceURI()));

	return result;
}
 

开发者ID:3dcitydb,
项目名称:web-feature-service,
代码行数:8,
代码来源:FeatureTypes.java

示例4: getCityGMLModuleNode

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
private DefaultMutableTreeNode getCityGMLModuleNode(CityGMLModule module) {
	DefaultMutableTreeNode node = new DefaultMutableTreeNode(module.getType());

	AppSchema schema = schemaMapping.getSchema(module.getNamespaceURI());
	if (schema != null) {
		for (FeatureType featureType : schema.listTopLevelFeatureTypes(true)) {
			DefaultMutableTreeNode child = new DefaultMutableTreeNode(featureType);
			node.add(child);
			leafs.add(child);
		}
	}

	return node;
}
 

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

示例5: containsProperty

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public boolean containsProperty(String name, String namespaceURI) {
	if (properties == null && genericAttributes == null)
		return TRUE;

	if (properties != null) {
		for (AbstractProperty property : properties) {
			if (property.getPath().equals(name) 
					&& property.isSetSchema()
					&& property.getSchema().matchesNamespaceURI(namespaceURI))
				return TRUE;
		}
	}

	if (genericAttributes != null) {
		boolean isGenericAttribute = false;
		for (CityGMLModule module : Modules.getCityGMLModules(CityGMLModuleType.GENERICS)) {
			if (module.getNamespaceURI().equals(namespaceURI)) {
				isGenericAttribute = true;
				break;
			}
		}

		if (isGenericAttribute) {
			for (GenericAttribute genericAttribute : genericAttributes) {					
				if (genericAttribute.getType() == CityGMLClass.UNDEFINED)
					return TRUE;

				String attrName = getGenericAttributeName(genericAttribute.getType());
				if (name.equals(attrName))
					return TRUE;
			}
		}
	}

	return FALSE;
}
 

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

示例6: getSchemaSource

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public Source getSchemaSource(CityGMLModule module) {
	String systemId = visited.get(module.getNamespaceURI());
	if (systemId != null)
		return new StreamSource(systemId);

	return null;
}
 

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

示例7: setSchemaLocations

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public void setSchemaLocations(CityGMLVersion version) {
	for (CityGMLModule module : version.getCityGMLModules()) {
		if (module instanceof CoreModule)
			continue;

		setSchemaLocation(module);
	}
}
 

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

示例8: getCityGMLFeatureProperty

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
private ElementInfo getCityGMLFeatureProperty(QName name) {
	ElementInfo elementInfo = null;
	String localName = name.getLocalPart();
	String namespaceURI = name.getNamespaceURI();

	boolean isFeatureProperty = false;
	boolean skipNestedElements = false;

	if (featureReadMode == FeatureReadMode.SPLIT_PER_COLLECTION_MEMBER) {
		HashSet<String> properties = cityGMLFeatureProperties.get(namespaceURI);
		isFeatureProperty = properties != null ? properties.contains(localName) : false;
	} else {
		Module module = Modules.getModule(namespaceURI);
		if (module instanceof CityGMLModule) {
			CityGMLModule cityGMLModule = (CityGMLModule)module;
			isFeatureProperty = cityGMLModule.hasFeatureProperty(localName);					
			if (localName.equals("appearance"))
				skipNestedElements = keepInlineAppearance;
		}
	}

	if (isFeatureProperty) {
		elementInfo = new ElementInfo();
		elementInfo.isFeatureProperty = true;
		elementInfo.hasXLink = true;
		elementInfo.skipNestedElements = skipNestedElements;
	}

	return elementInfo;
}
 

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

示例9: createDefaultStoredQuery

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
private StoredQuery createDefaultStoredQuery() throws ParserConfigurationException, SAXException {
	// GetFeatureById query according to the WFS 2.0 spec
	StoredQueryDescriptionType description = new StoredQueryDescriptionType();

	description.setId(GET_FEATURE_BY_ID_NAME);

	Title queryTitle = new Title();
	queryTitle.setLang("en");
	queryTitle.setValue("Get feature by identifier");
	description.getTitle().add(queryTitle);
	Abstract queryAbstract = new Abstract();
	queryAbstract.setLang("en");
	queryAbstract.setValue("Retrieves a feature by its gml:id.");
	description.getAbstract().add(queryAbstract);

	ParameterExpressionType parameter = new ParameterExpressionType();
	parameter.setName("id");
	parameter.setType(XSDataType.XS_STRING.getName());
	Title parameterTitle = new Title();
	parameterTitle.setLang("en");
	parameterTitle.setValue("Identifier");
	parameter.getTitle().add(parameterTitle);
	Abstract parameterAbstract = new Abstract();
	parameterAbstract.setLang("en");
	parameterAbstract.setValue("The gml:id of the feature to be retrieved.");
	parameter.getAbstract().add(parameterAbstract);
	description.getParameter().add(parameter);

	DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
	Document document = builder.newDocument();
	Element query = document.createElementNS(Constants.WFS_NAMESPACE_URI, "Query");

	NamespaceFilter namespaceFilter = new NamespaceFilter();
	CityGMLVersion version = wfsConfig.getFeatureTypes().getDefaultVersion();
	boolean multipleVersions = wfsConfig.getFeatureTypes().getVersions().size() > 1;
	CityGMLModule module = version.getCityGMLModule(CityGMLModuleType.CORE);		
	String prefix = module .getNamespacePrefix();
	if (multipleVersions)
		prefix += (version == CityGMLVersion.v2_0_0) ? "2" : "1";
	
	namespaceFilter.startPrefixMapping(prefix, module.getNamespaceURI());
	query.setAttribute("typeNames", "schema-element(" + prefix + ':' + "_CityObject)");

	Element filter = document.createElementNS(Constants.FES_NAMESPACE_URI, "Filter");
	Element resourceId = document.createElementNS(Constants.FES_NAMESPACE_URI, "ResourceId");
	resourceId.setAttribute("rid", "${id}");
	filter.appendChild(resourceId);
	query.appendChild(filter);

	QueryExpressionTextType queryExpression = new QueryExpressionTextType();
	queryExpression.getContent().add(query);		
	queryExpression.setIsPrivate(false);
	queryExpression.setLanguage("en");
	queryExpression.setReturnFeatureTypes(new ArrayList<QName>());
	queryExpression.setLanguage(StoredQuery.DEFAULT_LANGUAGE);
	description.getQueryExpressionText().add(queryExpression);

	return new StoredQuery(description, namespaceFilter, this);
}
 

开发者ID:3dcitydb,
项目名称:web-feature-service,
代码行数:60,
代码来源:StoredQueryManager.java

示例10: getCityGMLModule

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public CityGMLModule getCityGMLModule() {
	// return null by default 
	return null;
}
 

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

示例11: getCityGMLModule

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public CityGMLModule getCityGMLModule() {
	return module;
}
 

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

示例12: getCityGMLModules

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public List<CityGMLModule> getCityGMLModules() {
	return getModules(CityGMLModule.class);
}
 

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

示例13: getCityGMLModules

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public static List<CityGMLModule> getCityGMLModules() {
	return getModules(CityGMLModule.class);
}
 

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

示例14: getCityGMLModule

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public static CityGMLModule getCityGMLModule(String namespaceURI) {
	return getModule(CityGMLModule.class, namespaceURI);
}
 

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

示例15: next

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public int next() throws XMLStreamException {
	int event = reader.next();
	
	if (event == XMLStreamConstants.START_ELEMENT) {
		String localPart = reader.getLocalName();
		String namespaceURI = reader.getNamespaceURI();
		depth++;

		if (namespaceURI.startsWith("http://www.citygml.org/citygml")) {
			isCityGML = true;

			if (localPart.equals("creationDate") ||
					localPart.equals("terminationDate") ||
					localPart.equals("generalizesTo")) {
				namespaceURI = CoreModule.v1_0_0.getNamespaceURI();
			}

			else if (localPart.equals("externalReference")) {
				parents.push(parent);
				parent = new ParentFeatureElement(localPart, CoreModule.v1_0_0.getNamespaceURI(), depth);
				namespaceURI = CoreModule.v1_0_0.getNamespaceURI();
			} 

			else if (localPart.equals("stringAttribute") ||
					localPart.equals("intAttribute") ||
					localPart.equals("doubleAttribute") ||
					localPart.equals("dateAttribute") ||
					localPart.equals("uriAttribute")) {
				parents.push(parent);
				parent = new ParentFeatureElement(localPart, GenericsModule.v1_0_0.getNamespaceURI(), depth);
				namespaceURI = GenericsModule.v1_0_0.getNamespaceURI();
			}

			else if (localPart.equals("appearanceMember")) {
				if (parent != null && !parent.localPart.equals("CityModel"))
					localPart = "appearance";

				namespaceURI = AppearanceModule.v1_0_0.getNamespaceURI();					
			}
			
			else if (localPart.equals("TexturedSurface") ||
					localPart.equals("SimpleTexture") ||
					localPart.equals("Material")) {
				namespaceURI = TexturedSurfaceModule.v1_0_0.getNamespaceURI();
			}

			else {
				for (CityGMLModule module : CityGMLVersion.v1_0_0.getCityGMLModules()) {
					if (module.getType() == CityGMLModuleType.BRIDGE || module.getType() == CityGMLModuleType.TUNNEL)
						continue;

					if (module.hasFeature(localPart)) {
						parents.push(parent);
						parent = new ParentFeatureElement(localPart, module.getNamespaceURI(), depth);
						break;
					}		
				}

				namespaceURI = parent.namespaceURI;
			}

		} else
			isCityGML = false;
		
		currentName = new QName(namespaceURI, localPart);

	} else if (event == XMLStreamConstants.END_ELEMENT) {
		if (parent != null && parent.depth == depth)
			parent = parents.pop();

		depth--;
	}

	return event;
}
 

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

示例16: getCityGMLModule

点赞 2

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
private CityGMLModule getCityGMLModule(Object src) {

		if (src instanceof ModelObject) {
			ModuleContext moduleContext = jaxb.getModuleContext();

			if (src instanceof AppearanceModuleComponent)
				return (AppearanceModule)moduleContext.getModule(CityGMLModuleType.APPEARANCE);
			else if (src instanceof BridgeModuleComponent)
				return (BridgeModule)moduleContext.getModule(CityGMLModuleType.BRIDGE);
			else if (src instanceof BuildingModuleComponent)
				return (BuildingModule)moduleContext.getModule(CityGMLModuleType.BUILDING);
			else if (src instanceof CityFurnitureModuleComponent)
				return (CityFurnitureModule)moduleContext.getModule(CityGMLModuleType.CITY_FURNITURE);
			else if (src instanceof CityObjectGroupModuleComponent)
				return (CityObjectGroupModule)moduleContext.getModule(CityGMLModuleType.CITY_OBJECT_GROUP);
			else if (src instanceof GenericsModuleComponent)
				return (GenericsModule)moduleContext.getModule(CityGMLModuleType.GENERICS);
			else if (src instanceof LandUseModuleComponent)
				return (LandUseModule)moduleContext.getModule(CityGMLModuleType.LAND_USE);
			else if (src instanceof ReliefModuleComponent)
				return (ReliefModule)moduleContext.getModule(CityGMLModuleType.RELIEF);
			else if (src instanceof TexturedSurfaceModuleComponent)
				return (TexturedSurfaceModule)moduleContext.getModule(CityGMLModuleType.TEXTURED_SURFACE);
			else if (src instanceof TransportationModuleComponent)
				return (TransportationModule)moduleContext.getModule(CityGMLModuleType.TRANSPORTATION);
			else if (src instanceof TunnelModuleComponent)
				return (TunnelModule)moduleContext.getModule(CityGMLModuleType.TUNNEL);
			else if (src instanceof VegetationModuleComponent)
				return (VegetationModule)moduleContext.getModule(CityGMLModuleType.VEGETATION);
			else if (src instanceof WaterBodyModuleComponent)
				return (WaterBodyModule)moduleContext.getModule(CityGMLModuleType.WATER_BODY);
			else
				return (CoreModule)moduleContext.getModule(CityGMLModuleType.CORE);		
		}

		else if (src != null) {
			moduleMatcher.reset(src.getClass().getPackage().getName());

			if (moduleMatcher.matches()) {
				String moduleString = moduleMatcher.group(1);
				if (moduleString == null)
					moduleString = "core";

				CityGMLModuleVersion version = moduleMatcher.group(2).equals("_2") ? CityGMLModuleVersion.v2_0_0 : CityGMLModuleVersion.v1_0_0;
				for (CityGMLModule module : Modules.getCityGMLModules()) {
					if (module.getVersion() == version && module.getType().toString().toLowerCase().equals(moduleString))
						return module;
				}	
			}		
		}

		return null;
	}
 

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

示例17: getCityGMLModule

点赞 1

import org.citygml4j.model.module.citygml.CityGMLModule; //导入依赖的package包/类
public CityGMLModule getCityGMLModule(); 

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


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