-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed tests, more renderers, default StringRenderer is now Manchester…
…Renderer
- Loading branch information
Showing
22 changed files
with
355 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
uel-core/src/main/java/de/tudresden/inf/lat/uel/core/renderer/FunctionalRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package de.tudresden.inf.lat.uel.core.renderer; | ||
|
||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import de.tudresden.inf.lat.uel.type.api.AtomManager; | ||
import de.tudresden.inf.lat.uel.type.api.Definition; | ||
import de.tudresden.inf.lat.uel.type.cons.RendererKeywords; | ||
|
||
public class FunctionalRenderer extends StringRenderer { | ||
|
||
protected FunctionalRenderer(AtomManager atomManager, Map<String, String> shortFormMap, | ||
Set<Definition> background) { | ||
super(atomManager, shortFormMap, background); | ||
} | ||
|
||
@Override | ||
protected String translateExistentialRestriction(String roleName, Integer childId) { | ||
sb.append(RendererKeywords.objectSomeValuesFrom); | ||
sb.append(RendererKeywords.open); | ||
sb.append(roleName); | ||
sb.append(RendererKeywords.space); | ||
translateChild(childId); | ||
sb.append(RendererKeywords.close); | ||
return ""; | ||
} | ||
|
||
@Override | ||
protected String translateTop() { | ||
sb.append(RendererKeywords.owlThing); | ||
return ""; | ||
} | ||
|
||
@Override | ||
protected String translateTrueConjunction(Set<Integer> atomIds) { | ||
sb.append(RendererKeywords.objectIntersectionOf); | ||
sb.append(RendererKeywords.open); | ||
|
||
for (Integer atomId : atomIds) { | ||
translateAtom(atomId); | ||
sb.append(RendererKeywords.space); | ||
} | ||
|
||
sb.setLength(sb.length() - RendererKeywords.space.length()); | ||
sb.append(RendererKeywords.close); | ||
return ""; | ||
} | ||
|
||
} |
Oops, something went wrong.