Search in sources :

Example 11 with ChildDefinition

use of eu.esdihumboldt.hale.common.schema.model.ChildDefinition in project hale by halestudio.

the class AppSchemaMappingTest method getLandCoverDatasetGeometryGmlIdTargetProperty.

private ListMultimap<String, Property> getLandCoverDatasetGeometryGmlIdTargetProperty() {
    List<ChildDefinition<?>> childDefs = getLandCoverDatasetGeometryPath();
    ChildDefinition<?> gmlId = DefinitionUtil.getChild(childDefs.get(childDefs.size() - 1), new QName(GML_NS, "id"));
    childDefs.add(gmlId);
    return createTargetProperty(childDefs);
}
Also used : QName(javax.xml.namespace.QName) ChildDefinition(eu.esdihumboldt.hale.common.schema.model.ChildDefinition)

Example 12 with ChildDefinition

use of eu.esdihumboldt.hale.common.schema.model.ChildDefinition in project hale by halestudio.

the class AppSchemaMappingTest method getLandCoverUnitGeometryGmlIdTargetProperty.

private ListMultimap<String, Property> getLandCoverUnitGeometryGmlIdTargetProperty() {
    List<ChildDefinition<?>> childDefs = getLandCoverUnitGeometryPath();
    ChildDefinition<?> geometry = childDefs.get(childDefs.size() - 1);
    ChildDefinition<?> abstractGeometry = DefinitionUtil.getChild(geometry, new QName("http://www.opengis.net/gml/3.2/AbstractGeometry", "choice"));
    assertNotNull(abstractGeometry);
    ChildDefinition<?> multiSurface = DefinitionUtil.getChild(abstractGeometry, new QName(GML_NS, "MultiSurface"));
    assertNotNull(multiSurface);
    ChildDefinition<?> gmlId = DefinitionUtil.getChild(multiSurface, new QName(GML_NS, "id"));
    assertNotNull(gmlId);
    childDefs.add(abstractGeometry);
    childDefs.add(multiSurface);
    childDefs.add(gmlId);
    return createTargetProperty(childDefs);
}
Also used : QName(javax.xml.namespace.QName) ChildDefinition(eu.esdihumboldt.hale.common.schema.model.ChildDefinition)

Example 13 with ChildDefinition

use of eu.esdihumboldt.hale.common.schema.model.ChildDefinition in project hale by halestudio.

the class AppSchemaMappingTest method getLandCoverUnitGeometryPath.

private List<ChildDefinition<?>> getLandCoverUnitGeometryPath() {
    ChildDefinition<?> geometry = DefinitionUtil.getChild(landCoverUnitType, new QName(LANDCOVER_NS, "geometry"));
    assertNotNull(geometry);
    List<ChildDefinition<?>> childDefs = new ArrayList<ChildDefinition<?>>();
    childDefs.add(geometry);
    return childDefs;
}
Also used : QName(javax.xml.namespace.QName) ChildDefinition(eu.esdihumboldt.hale.common.schema.model.ChildDefinition) ArrayList(java.util.ArrayList)

Example 14 with ChildDefinition

use of eu.esdihumboldt.hale.common.schema.model.ChildDefinition in project hale by halestudio.

the class AppSchemaMappingTest method getLandCoverDatasetGeometryPath.

private List<ChildDefinition<?>> getLandCoverDatasetGeometryPath() {
    ChildDefinition<?> extent = DefinitionUtil.getChild(landCoverDatasetType, new QName(LANDCOVER_NS, "extent"));
    assertNotNull(extent);
    ChildDefinition<?> exExtent = DefinitionUtil.getChild(extent, new QName(GMD_NS, "EX_Extent"));
    assertNotNull(exExtent);
    ChildDefinition<?> geographicElement = DefinitionUtil.getChild(exExtent, new QName(GMD_NS, "geographicElement"));
    assertNotNull(geographicElement);
    ChildDefinition<?> exGeographicExtentChoice = DefinitionUtil.getChild(geographicElement, new QName("http://www.isotc211.org/2005/gmd/AbstractEX_GeographicExtent", "choice"));
    assertNotNull(exGeographicExtentChoice);
    ChildDefinition<?> exBoundingPolygon = DefinitionUtil.getChild(exGeographicExtentChoice, new QName(GMD_NS, "EX_BoundingPolygon"));
    assertNotNull(exBoundingPolygon);
    ChildDefinition<?> polygon = DefinitionUtil.getChild(exBoundingPolygon, new QName(GMD_NS, "polygon"));
    assertNotNull(polygon);
    ChildDefinition<?> abstractGeometry = DefinitionUtil.getChild(polygon, new QName("http://www.opengis.net/gml/3.2/AbstractGeometry", "choice"));
    assertNotNull(abstractGeometry);
    ChildDefinition<?> multiSurface = DefinitionUtil.getChild(abstractGeometry, new QName(GML_NS, "MultiSurface"));
    assertNotNull(multiSurface);
    List<ChildDefinition<?>> childDefs = new ArrayList<ChildDefinition<?>>();
    childDefs.add(extent);
    childDefs.add(exExtent);
    childDefs.add(geographicElement);
    childDefs.add(exGeographicExtentChoice);
    childDefs.add(exBoundingPolygon);
    childDefs.add(polygon);
    childDefs.add(abstractGeometry);
    childDefs.add(multiSurface);
    return childDefs;
}
Also used : QName(javax.xml.namespace.QName) ChildDefinition(eu.esdihumboldt.hale.common.schema.model.ChildDefinition) ArrayList(java.util.ArrayList)

Example 15 with ChildDefinition

use of eu.esdihumboldt.hale.common.schema.model.ChildDefinition in project hale by halestudio.

the class AppSchemaMappingTest method getCodeSpaceTargetProperty.

private ListMultimap<String, Property> getCodeSpaceTargetProperty() {
    ChildDefinition<?> nameChildDef = DefinitionUtil.getChild(landCoverDatasetType, new QName(GML_NS, "name"));
    ChildDefinition<?> codeSpaceChildDef = DefinitionUtil.getChild(nameChildDef, new QName("codeSpace"));
    List<ChildDefinition<?>> childDefs = new ArrayList<ChildDefinition<?>>();
    childDefs.add(nameChildDef);
    childDefs.add(codeSpaceChildDef);
    return createTargetProperty(childDefs);
}
Also used : QName(javax.xml.namespace.QName) ChildDefinition(eu.esdihumboldt.hale.common.schema.model.ChildDefinition) ArrayList(java.util.ArrayList)

Aggregations

ChildDefinition (eu.esdihumboldt.hale.common.schema.model.ChildDefinition)32 ArrayList (java.util.ArrayList)20 QName (javax.xml.namespace.QName)19 TypeDefinition (eu.esdihumboldt.hale.common.schema.model.TypeDefinition)11 ChildContext (eu.esdihumboldt.hale.common.align.model.ChildContext)6 Definition (eu.esdihumboldt.hale.common.schema.model.Definition)6 EntityDefinition (eu.esdihumboldt.hale.common.align.model.EntityDefinition)5 PropertyEntityDefinition (eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition)5 DefinitionGroup (eu.esdihumboldt.hale.common.schema.model.DefinitionGroup)5 List (java.util.List)5 PropertyDefinition (eu.esdihumboldt.hale.common.schema.model.PropertyDefinition)4 Pair (eu.esdihumboldt.util.Pair)3 LinkedList (java.util.LinkedList)3 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)3 TreePath (org.eclipse.jface.viewers.TreePath)3 TypeEntityDefinition (eu.esdihumboldt.hale.common.align.model.impl.TypeEntityDefinition)2 InstanceValidationMessage (eu.esdihumboldt.hale.common.instance.extension.validation.report.InstanceValidationMessage)2 InstanceValidationReport (eu.esdihumboldt.hale.common.instance.extension.validation.report.InstanceValidationReport)2 Group (eu.esdihumboldt.hale.common.instance.model.Group)2 Instance (eu.esdihumboldt.hale.common.instance.model.Instance)2