use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.
the class HierarchicalRelationshipType method getByMdTermRelationship.
public static HierarchicalRelationshipType getByMdTermRelationship(MdTermRelationship mdTermRelationship) {
HierarchicalRelationshipTypeQuery query = new HierarchicalRelationshipTypeQuery(new QueryFactory());
query.WHERE(query.getMdTermRelationship().EQ(mdTermRelationship));
try (OIterator<? extends HierarchicalRelationshipType> it = query.getIterator()) {
if (it.hasNext()) {
return it.next();
}
}
return null;
}
use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.
the class HierarchicalRelationshipType method getByMdEdge.
public static HierarchicalRelationshipType getByMdEdge(MdEdgeDAOIF mdEdge) {
HierarchicalRelationshipTypeQuery query = new HierarchicalRelationshipTypeQuery(new QueryFactory());
query.WHERE(query.getMdEdge().EQ(mdEdge.getOid()));
try (OIterator<? extends HierarchicalRelationshipType> it = query.getIterator()) {
if (it.hasNext()) {
return it.next();
}
}
return null;
}
use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.
the class HierarchyMetadata method deleteByRelationship.
public static void deleteByRelationship(MdTermRelationship mdRelationship) {
HierarchyMetadataQuery query = new HierarchyMetadataQuery(new QueryFactory());
query.WHERE(query.getMdTermRelationship().EQ(mdRelationship));
List<? extends HierarchyMetadata> hierarchies = query.getIterator().getAll();
for (HierarchyMetadata hierarchy : hierarchies) {
hierarchy.delete();
}
}
use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.
the class InheritedHierarchyAnnotation method getByInheritedHierarchy.
public static List<? extends InheritedHierarchyAnnotation> getByInheritedHierarchy(Universal universal, HierarchicalRelationshipType inheritedRelationship) {
InheritedHierarchyAnnotationQuery query = new InheritedHierarchyAnnotationQuery(new QueryFactory());
query.WHERE(query.getUniversal().EQ(universal));
query.WHERE(query.getInheritedHierarchicalRelationshipType().EQ(inheritedRelationship));
try (OIterator<? extends InheritedHierarchyAnnotation> iterator = query.getIterator()) {
List<? extends InheritedHierarchyAnnotation> list = iterator.getAll();
return list;
}
}
use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.
the class InheritedHierarchyAnnotation method getByForHierarchical.
public static InheritedHierarchyAnnotation getByForHierarchical(HierarchicalRelationshipType forHierarchicalRelationship) {
InheritedHierarchyAnnotationQuery query = new InheritedHierarchyAnnotationQuery(new QueryFactory());
query.WHERE(query.getForHierarchicalRelationshipType().EQ(forHierarchicalRelationship));
try (OIterator<? extends InheritedHierarchyAnnotation> iterator = query.getIterator()) {
if (iterator.hasNext()) {
return iterator.next();
}
}
return null;
}
Aggregations