本文整理汇总了Java中org.citygml4j.model.module.ade.ADEModule类的典型用法代码示例。如果您正苦于以下问题:Java ADEModule类的具体用法?Java ADEModule怎么用?Java ADEModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ADEModule类属于org.citygml4j.model.module.ade包,在下文中一共展示了ADEModule类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addADEModules
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
private void addADEModules() {
CityGMLContext context = CityGMLContext.getInstance();
if (context.hasADEContexts()) {
for (ADEContext adeContext : context.getADEContexts()) {
for (ADEModule module : adeContext.getADEModules()) {
if (module.getCityGMLVersion() != version)
continue;
for (Module dependency : module.getDependencies()) {
if (contains(dependency)) {
if (adeModules == null)
adeModules = new HashSet<>();
adeModules.add(module);
break;
}
}
}
}
}
}
示例2: ADEMarshaller
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public ADEMarshaller(JAXBMarshaller jaxb) {
CityGMLContext context = CityGMLContext.getInstance();
if (context.hasADEContexts()) {
this.adeContexts = new HashMap<>();
for (ADEContext adeContext : context.getADEContexts()) {
for (ADEModule module : adeContext.getADEModules()) {
if (module.getCityGMLVersion() == jaxb.getModuleContext().getCityGMLVersion()) {
adeContext.getADEMarshaller().setADEMarshallerHelper(new ADEMarshallerHelper(jaxb));
for (String packageName : adeContext.getModelPackageNames())
this.adeContexts.put(packageName, adeContext);
}
}
}
}
}
示例3: getExtensionByURI
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public ADEExtension getExtensionByURI(String namespaceURI) {
for (ADEExtension extension : extensions.values()) {
for (ADEContext adeContext : extension.getADEContexts()) {
for (ADEModule adeModule : adeContext.getADEModules()) {
if (adeModule.getNamespaceURI().equals(namespaceURI))
return extension;
}
}
}
return null;
}
示例4: getADEContext
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public ADEContext getADEContext(String namespaceURI) {
for (ADEContext adeContext : adeContexts) {
for (ADEModule module : adeContext.getADEModules()) {
if (module.getNamespaceURI().equals(namespaceURI))
return adeContext;
}
}
return null;
}
示例5: newInstance
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public static synchronized SchemaHandler newInstance() throws SAXException {
if (instance == null) {
instance = new SchemaHandler();
URL schemaURL = SchemaHandler.class.getResource("/org/citygml4j/schemas/CityGML/citygml4j_profile.xsd");
if (schemaURL == null)
throw new SAXException("Failed to parse CityGML schemas. Could not find '/org/citygml4j/schemas/CityGML/citygml4j_profile.xsd' on classpath.");
instance.parse(schemaURL.toString());
}
SchemaHandler schemaHandler = new SchemaHandler();
schemaHandler.schemaSets.addAll(instance.schemaSets);
schemaHandler.visited.putAll(instance.visited);
// CityGML 0.4.0
schemaHandler.schemaLocations.put("http://www.citygml.org/citygml/1/0/0", CityGMLContext.class.getResource("/org/citygml4j/schemas/CityGML/0.4.0/CityGML.xsd").toString());
// parse local schemas provided by ADE modules
CityGMLContext context = CityGMLContext.getInstance();
if (context.hasADEContexts()) {
for (ADEContext adeContext : CityGMLContext.getInstance().getADEContexts()) {
for (ADEModule adeModule : adeContext.getADEModules()) {
URL schemaResource = adeModule.getSchemaResource();
if (schemaResource != null) {
try {
schemaHandler.parse(schemaResource.toURI().toString());
} catch (URISyntaxException e) {
throw new SAXException("Failed to parse XML schema file for ADE namespace '" + adeModule.getNamespaceURI() + "'.", e);
}
}
}
}
}
return schemaHandler;
}
示例6: setSchemaLocations
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public void setSchemaLocations(ModuleContext moduleContext) {
for (CityGMLModule module : moduleContext.getCityGMLModules()) {
if (module instanceof CoreModule)
continue;
setSchemaLocation(module);
}
for (ADEModule adeModule : moduleContext.getADEModules())
setSchemaLocation(adeModule);
}
示例7: setPrefixes
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public void setPrefixes(List<ADEContext> adeContexts) {
for (ADEContext adeContext : adeContexts) {
for (ADEModule module : adeContext.getADEModules()) {
if (module != null && module.getNamespacePrefix() != null)
setPrefix(module);
}
}
}
示例8: ADEUnmarshaller
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public ADEUnmarshaller(JAXBUnmarshaller jaxb) {
this.jaxb = jaxb;
CityGMLContext context = CityGMLContext.getInstance();
if (context.hasADEContexts()) {
this.adeContexts = new HashMap<>();
for (ADEContext adeContext : context.getADEContexts()) {
adeContext.getADEUnmarshaller().setADEUnmarshallerHelper(new ADEUnmarshallerHelper(jaxb));
for (ADEModule module : adeContext.getADEModules())
this.adeContexts.put(module.getNamespaceURI(), adeContext);
}
}
}
示例9: getADEModules
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
@Override
public List<ADEModule> getADEModules() {
return Arrays.asList(new ADEModule[]{NoiseADEModule.v1_0});
}
示例10: getADEModule
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
@Override
public ADEModule getADEModule() {
return NoiseADEModule.v1_0;
}
示例11: unregisterADEContext
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public void unregisterADEContext(ADEContext adeContext) {
for (ADEModule module : adeContext.getADEModules())
Modules.unregisterADEModule(module);
adeContexts.remove(adeContext);
}
示例12: getADEModule
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
default ADEModule getADEModule() {
return null;
}
示例13: contains
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public boolean contains(Module module) {
if (!(module instanceof ADEModule))
return modules.values().contains(module);
else
return adeModules != null ? adeModules.contains(module) : false;
}
示例14: getADEModules
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public List<ADEModule> getADEModules() {
return adeModules != null ? new ArrayList<>(adeModules) : Collections.emptyList();
}
示例15: registerADEModule
import org.citygml4j.model.module.ade.ADEModule; //导入依赖的package包/类
public static void registerADEModule(ADEModule module) {
modules.put(module.getNamespaceURI(), module);
}