Mercurial > hg > openmind
view src/main/java/org/mpi/openmind/repository/utils/EntityUtils.java @ 89:8adfa8679991
new implementation of translit-to-romanization rules in RomanizationLoc with test(!).
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 26 Feb 2018 14:39:49 +0100 |
parents | 615d27dce9b3 |
children |
line wrap: on
line source
package org.mpi.openmind.repository.utils; import org.mpi.openmind.repository.bo.Entity; import org.mpi.openmind.repository.bo.Node; import org.mpi.openmind.repository.bo.Relation; public class EntityUtils { public static Entity createAssertion(String objectClass){ Entity ent = new Entity(Node.TYPE_ABOX, objectClass, false); return ent; } public static Entity createAssertion(String objectClass, String ownValue){ Entity ent = new Entity(Node.TYPE_ABOX, objectClass, false); ent.setOwnValue(ownValue); return ent; } public static Relation createRelationForAssertions(Entity source, Entity target, String ownValue){ Relation rel = new Relation(source, target, ownValue); rel.setType(Node.TYPE_ABOX); return rel; } public static Relation createRelationForDefinitions(Entity source, Entity target, String ownValue){ Relation rel = new Relation(source, target, ownValue); rel.setType(Node.TYPE_TBOX); return rel; } }