Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OwlCompiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Nilsson
OwlCompiler
Commits
fec258f0
Commit
fec258f0
authored
18 years ago
by
Anders Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Fixing ClassUses
parent
c65d6cc2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CompilerGeneration.jrag
+17
-12
17 additions, 12 deletions
CompilerGeneration.jrag
with
17 additions
and
12 deletions
CompilerGeneration.jrag
+
17
−
12
View file @
fec258f0
...
@@ -220,18 +220,20 @@ aspect GenRewrites {
...
@@ -220,18 +220,20 @@ aspect GenRewrites {
pStream.println(ind(1)+"}");
pStream.println(ind(1)+"}");
// TEMPORARY!!!!!
// TEMPORARY!!!!!
// Rewrite isSkillOf to ClassUse
// Rewrite isSkillOf/hasSkill/hasProperty/isPropertyOf to ClassUse
// pStream.println(ind(1)+"rewrite ComplexElement {");
pStream.println(ind(1)+"rewrite ComplexElement {");
// pStream.println(ind(2)+"when ("+name()+")");
pStream.println(ind(2)+"when ((name().equals(\"hasSkill\")");
// pStream.println(ind(2)+"to ClassUse {");
pStream.println(ind(2)+"|| name().equals(\"isSkillOf\"))");
// pStream.println(ind(3)+"ClassUse use = new ClassUse();");
pStream.println("&& getNumAttribute() > 0 && getAttribute(0) instanceof RdfResource)");
// pStream.println(ind(3)+"use.setOwlIdentifier(new OwlIdentifier(\""+name()+"\"));");
pStream.println(ind(2)+"to ClassUse {");
// pStream.println(ind(3)+"use.setAttributeList(new List().add(new RdfResource(getAttribute(0).getValue())));");
pStream.println(ind(3)+"ClassUse use = new ClassUse();");
// pStream.println(ind(3)+"use.setElementList(new List());");
pStream.println(ind(3)+"String att = getAttribute(0).name();");
// pStream.println(ind(3)+"getStart().addElement(this);");
pStream.println(ind(3)+"use.setOwlIdentifier(new OwlIdentifier(att.substring(att.indexOf('#')+1,att.indexOf('_'))));");
// pStream.println(ind(3)+"return use;");
pStream.println(ind(3)+"use.setAttributeList(getAttributeList());");
// pStream.println(ind(2)+"}");
pStream.println(ind(3)+"use.setElementList(new List());");
// pStream.println(ind(1)+"}");
pStream.println(ind(3)+"return use;");
pStream.println(ind(2)+"}");
pStream.println(ind(1)+"}");
super.genRewrites(pStream);
super.genRewrites(pStream);
...
@@ -337,6 +339,9 @@ aspect GenMisc {
...
@@ -337,6 +339,9 @@ aspect GenMisc {
pStream.println(ind(1)+"String ComplexElement.name() {");
pStream.println(ind(1)+"String ComplexElement.name() {");
pStream.println(ind(2)+"return getOwlIdentifier().getIDENTIFIER();");
pStream.println(ind(2)+"return getOwlIdentifier().getIDENTIFIER();");
pStream.println(ind(1)+"}");
pStream.println(ind(1)+"}");
pStream.println(ind(1)+"String Attribute.name() {");
pStream.println(ind(2)+"return getValue().getSTRING_LITERAL();");
pStream.println(ind(1)+"}");
super.genMisc(pStream);
super.genMisc(pStream);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment