use of eu.esdihumboldt.hale.io.oml.internal.goml.rdf.IDetailedAbout in project hale by halestudio.
the class OmlReader method setBeanLists.
private void setBeanLists(IEntity entity, List<NamedEntityBean> list, TypeIndex schema) {
if (entity.getAbout().getAbout().equals(Entity.NULL_ENTITY.getAbout().getAbout())) {
return;
}
if (entity instanceof ComposedFeatureClass) {
ComposedFeatureClass cfc = (ComposedFeatureClass) entity;
List<FeatureClass> coll = cfc.getCollection();
for (FeatureClass fc : coll) {
setBeanLists(fc, list, schema);
}
} else if (entity instanceof ComposedProperty) {
ComposedProperty cp = (ComposedProperty) entity;
List<Property> coll = cp.getCollection();
for (Property prop : coll) {
setBeanLists(prop, list, schema);
}
} else if (entity instanceof FeatureClass) {
// get the detailed about-information
IDetailedAbout about = DetailedAbout.getDetailedAbout(entity.getAbout(), false);
TypeBean typeBean = new TypeBean();
setTypeNameBean(typeBean, about, schema);
NamedEntityBean namedEntityBean = new NamedEntityBean();
namedEntityBean.setEntity(typeBean);
namedEntityBean.setName(null);
list.add(namedEntityBean);
} else if (entity instanceof Property) {
// get the detailed about-information
IDetailedAbout about = DetailedAbout.getDetailedAbout(entity.getAbout(), true);
PropertyBean prop = new PropertyBean();
List<ChildContextBean> childList = new ArrayList<ChildContextBean>();
List<String> props = about.getProperties();
for (String property : props) {
ChildContextBean ccb = new ChildContextBean();
ccb.setChildName(new QName(property));
childList.add(ccb);
}
setTypeNameBean(prop, about, schema);
prop.setProperties(childList);
NamedEntityBean namedEntityBean = new NamedEntityBean();
namedEntityBean.setEntity(prop);
namedEntityBean.setName(null);
list.add(namedEntityBean);
}
}
Aggregations