// BASEFUNCTION\r
VALIDATIONS.Functions : L0.Library\r
VALIDATIONS.Functions.baseRealizationFunction : L0.Function\r
+VALIDATIONS.Functions.path : L0.Function\r
+ L0.HasValueType "String" \r
\r
// DEPENDENCIES\r
VALIDATIONS.Dependencies : L0.Library\r
VALIDATIONS.Dependencies.dependencyValidator : L0.Function\r
VALIDATIONS.Dependencies.missingDependencyValidator : L0.Function\r
-VALIDATIONS.Dependencies.dependencySynchronizer : L0.Function\r
\r
// EXPRESSIONS \r
VALIDATIONS.Expressions : L0.Library\r
VALIDATIONS.Expressions.expressionValidator : L0.Function\r
-VALIDATIONS.Expressions.expressionSynchronizer : L0.Function\r
+\r
+// ENUMERATIONS\r
+VALIDATIONS.Enumerations : L0.Library\r
+VALIDATIONS.Enumerations.enumerationIndexValidator : L0.Function\r
\r
SYSDYN.Variable\r
@VALIDATIONS.constraint\r
VALIDATIONS.Dependencies.DependencyConnectionsIssueSource\r
VALIDATIONS.Dependencies.dependencyValidator \r
VALIDATIONS.Functions.baseRealizationFunction \r
+ \r
+SYSDYN.Enumeration\r
+ @VALIDATIONS.constraint\r
+ VALIDATIONS.EnumerationConstraint\r
+ VALIDATIONS.Enumerations.EnumerationIssueSource \r
+ VALIDATIONS.Enumerations.enumerationIndexValidator \r
+ VALIDATIONS.Functions.baseRealizationFunction \r
\r
SYSDYN.Variable\r
@VALIDATIONS.listeningConstraint\r
ISSUE.Severity.Error\r
VALIDATIONS.Expressions.expressionIssueDescription : L0.Function\r
L0.HasValueType "String"\r
+ VALIDATIONS.Functions.path\r
\r
VALIDATIONS.MissingLinkIssue\r
@VALIDATIONS.issue\r
ISSUE.Severity.Warning\r
VALIDATIONS.Dependencies.missingLinkIssueDescription : L0.Function\r
L0.HasValueType "String"\r
+ VALIDATIONS.Functions.path\r
\r
VALIDATIONS.UnusedDependencyIssue\r
@VALIDATIONS.issue\r
ISSUE.Severity.Warning\r
VALIDATIONS.Dependencies.unusedDependencyIssueDescription : L0.Function \r
L0.HasValueType "String"\r
+ VALIDATIONS.Functions.path\r
\r
VALIDATIONS.NoSuchVariableIssue\r
@VALIDATIONS.issue\r
ISSUE.Severity.Error\r
VALIDATIONS.Dependencies.noSuchVariableIssueDescription : L0.Function \r
- L0.HasValueType "String" \r
+ L0.HasValueType "String"\r
+ VALIDATIONS.Functions.path\r
+ \r
+VALIDATIONS.EmptyEnumerationIssue\r
+ @VALIDATIONS.issue\r
+ ISSUE.Severity.Error\r
+ VALIDATIONS.Enumerations.emptyEnumerationIssueDescription : L0.Function\r
+ L0.HasValueType "String"\r
+ VALIDATIONS.Functions.path \r
\r
// IssueSource template\r
VALIDATIONS.constraint : L0.Template\r
\r
// Issue template\r
VALIDATIONS.issue : L0.Template\r
- @template %issue %severity %description\r
+ @template %issue %severity %description %path\r
%issue <T ISSUE.Sources.DependencyTracker.Issue\r
L0.Asserts _ : L0.Assertion\r
L0.HasPredicate ISSUE.Issue.HasSeverity\r
L0.HasObject %severity\r
L0.Asserts _ : L0.Assertion\r
L0.HasPredicate L0.HasDescription\r
- L0.HasObject %description
\ No newline at end of file
+ L0.HasObject %description\r
+ L0.Asserts _ : L0.Assertion\r
+ L0.HasPredicate ISSUE.Issue.path\r
+ L0.HasObject %path
\ No newline at end of file
public final Resource Validations_Dependencies;\r
public final Resource Validations_Dependencies_DependencyConnectionsIssueSource;\r
public final Resource Validations_Dependencies_MissingDependencyConnectionsIssueSource;\r
- public final Resource Validations_Dependencies_dependencySynchronizer;\r
public final Resource Validations_Dependencies_dependencyValidator;\r
public final Resource Validations_Dependencies_missingDependencyValidator;\r
public final Resource Validations_Dependencies_missingLinkIssueDescription;\r
public final Resource Validations_Dependencies_noSuchVariableIssueDescription;\r
public final Resource Validations_Dependencies_unusedDependencyIssueDescription;\r
public final Resource Validations_DependencyConstraint;\r
+ public final Resource Validations_EmptyEnumerationIssue;\r
+ public final Resource Validations_EnumerationConstraint;\r
+ public final Resource Validations_Enumerations;\r
+ public final Resource Validations_Enumerations_EnumerationIssueSource;\r
+ public final Resource Validations_Enumerations_emptyEnumerationIssueDescription;\r
+ public final Resource Validations_Enumerations_enumerationIndexValidator;\r
public final Resource Validations_ExpressionConstraint;\r
public final Resource Validations_ExpressionIssue;\r
public final Resource Validations_Expressions;\r
public final Resource Validations_Expressions_ExpressionIssueSource;\r
public final Resource Validations_Expressions_expressionIssueDescription;\r
- public final Resource Validations_Expressions_expressionSynchronizer;\r
public final Resource Validations_Expressions_expressionValidator;\r
public final Resource Validations_Functions;\r
public final Resource Validations_Functions_baseRealizationFunction;\r
+ public final Resource Validations_Functions_path;\r
public final Resource Validations_MissingDependencyConstraint;\r
public final Resource Validations_MissingLinkIssue;\r
public final Resource Validations_NoSuchVariableIssue;\r
public static final String Validations_Dependencies = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies";\r
public static final String Validations_Dependencies_DependencyConnectionsIssueSource = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/DependencyConnectionsIssueSource";\r
public static final String Validations_Dependencies_MissingDependencyConnectionsIssueSource = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/MissingDependencyConnectionsIssueSource";\r
- public static final String Validations_Dependencies_dependencySynchronizer = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/dependencySynchronizer";\r
public static final String Validations_Dependencies_dependencyValidator = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/dependencyValidator";\r
public static final String Validations_Dependencies_missingDependencyValidator = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/missingDependencyValidator";\r
public static final String Validations_Dependencies_missingLinkIssueDescription = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/missingLinkIssueDescription";\r
public static final String Validations_Dependencies_noSuchVariableIssueDescription = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/noSuchVariableIssueDescription";\r
public static final String Validations_Dependencies_unusedDependencyIssueDescription = "http://www.simantics.org/Sysdyn-1.1/Validations/Dependencies/unusedDependencyIssueDescription";\r
public static final String Validations_DependencyConstraint = "http://www.simantics.org/Sysdyn-1.1/Validations/DependencyConstraint";\r
+ public static final String Validations_EmptyEnumerationIssue = "http://www.simantics.org/Sysdyn-1.1/Validations/EmptyEnumerationIssue";\r
+ public static final String Validations_EnumerationConstraint = "http://www.simantics.org/Sysdyn-1.1/Validations/EnumerationConstraint";\r
+ public static final String Validations_Enumerations = "http://www.simantics.org/Sysdyn-1.1/Validations/Enumerations";\r
+ public static final String Validations_Enumerations_EnumerationIssueSource = "http://www.simantics.org/Sysdyn-1.1/Validations/Enumerations/EnumerationIssueSource";\r
+ public static final String Validations_Enumerations_emptyEnumerationIssueDescription = "http://www.simantics.org/Sysdyn-1.1/Validations/Enumerations/emptyEnumerationIssueDescription";\r
+ public static final String Validations_Enumerations_enumerationIndexValidator = "http://www.simantics.org/Sysdyn-1.1/Validations/Enumerations/enumerationIndexValidator";\r
public static final String Validations_ExpressionConstraint = "http://www.simantics.org/Sysdyn-1.1/Validations/ExpressionConstraint";\r
public static final String Validations_ExpressionIssue = "http://www.simantics.org/Sysdyn-1.1/Validations/ExpressionIssue";\r
public static final String Validations_Expressions = "http://www.simantics.org/Sysdyn-1.1/Validations/Expressions";\r
public static final String Validations_Expressions_ExpressionIssueSource = "http://www.simantics.org/Sysdyn-1.1/Validations/Expressions/ExpressionIssueSource";\r
public static final String Validations_Expressions_expressionIssueDescription = "http://www.simantics.org/Sysdyn-1.1/Validations/Expressions/expressionIssueDescription";\r
- public static final String Validations_Expressions_expressionSynchronizer = "http://www.simantics.org/Sysdyn-1.1/Validations/Expressions/expressionSynchronizer";\r
public static final String Validations_Expressions_expressionValidator = "http://www.simantics.org/Sysdyn-1.1/Validations/Expressions/expressionValidator";\r
public static final String Validations_Functions = "http://www.simantics.org/Sysdyn-1.1/Validations/Functions";\r
public static final String Validations_Functions_baseRealizationFunction = "http://www.simantics.org/Sysdyn-1.1/Validations/Functions/baseRealizationFunction";\r
+ public static final String Validations_Functions_path = "http://www.simantics.org/Sysdyn-1.1/Validations/Functions/path";\r
public static final String Validations_MissingDependencyConstraint = "http://www.simantics.org/Sysdyn-1.1/Validations/MissingDependencyConstraint";\r
public static final String Validations_MissingLinkIssue = "http://www.simantics.org/Sysdyn-1.1/Validations/MissingLinkIssue";\r
public static final String Validations_NoSuchVariableIssue = "http://www.simantics.org/Sysdyn-1.1/Validations/NoSuchVariableIssue";\r
Validations_Dependencies = getResourceOrNull(graph, URIs.Validations_Dependencies);\r
Validations_Dependencies_DependencyConnectionsIssueSource = getResourceOrNull(graph, URIs.Validations_Dependencies_DependencyConnectionsIssueSource);\r
Validations_Dependencies_MissingDependencyConnectionsIssueSource = getResourceOrNull(graph, URIs.Validations_Dependencies_MissingDependencyConnectionsIssueSource);\r
- Validations_Dependencies_dependencySynchronizer = getResourceOrNull(graph, URIs.Validations_Dependencies_dependencySynchronizer);\r
Validations_Dependencies_dependencyValidator = getResourceOrNull(graph, URIs.Validations_Dependencies_dependencyValidator);\r
Validations_Dependencies_missingDependencyValidator = getResourceOrNull(graph, URIs.Validations_Dependencies_missingDependencyValidator);\r
Validations_Dependencies_missingLinkIssueDescription = getResourceOrNull(graph, URIs.Validations_Dependencies_missingLinkIssueDescription);\r
Validations_Dependencies_noSuchVariableIssueDescription = getResourceOrNull(graph, URIs.Validations_Dependencies_noSuchVariableIssueDescription);\r
Validations_Dependencies_unusedDependencyIssueDescription = getResourceOrNull(graph, URIs.Validations_Dependencies_unusedDependencyIssueDescription);\r
Validations_DependencyConstraint = getResourceOrNull(graph, URIs.Validations_DependencyConstraint);\r
+ Validations_EmptyEnumerationIssue = getResourceOrNull(graph, URIs.Validations_EmptyEnumerationIssue);\r
+ Validations_EnumerationConstraint = getResourceOrNull(graph, URIs.Validations_EnumerationConstraint);\r
+ Validations_Enumerations = getResourceOrNull(graph, URIs.Validations_Enumerations);\r
+ Validations_Enumerations_EnumerationIssueSource = getResourceOrNull(graph, URIs.Validations_Enumerations_EnumerationIssueSource);\r
+ Validations_Enumerations_emptyEnumerationIssueDescription = getResourceOrNull(graph, URIs.Validations_Enumerations_emptyEnumerationIssueDescription);\r
+ Validations_Enumerations_enumerationIndexValidator = getResourceOrNull(graph, URIs.Validations_Enumerations_enumerationIndexValidator);\r
Validations_ExpressionConstraint = getResourceOrNull(graph, URIs.Validations_ExpressionConstraint);\r
Validations_ExpressionIssue = getResourceOrNull(graph, URIs.Validations_ExpressionIssue);\r
Validations_Expressions = getResourceOrNull(graph, URIs.Validations_Expressions);\r
Validations_Expressions_ExpressionIssueSource = getResourceOrNull(graph, URIs.Validations_Expressions_ExpressionIssueSource);\r
Validations_Expressions_expressionIssueDescription = getResourceOrNull(graph, URIs.Validations_Expressions_expressionIssueDescription);\r
- Validations_Expressions_expressionSynchronizer = getResourceOrNull(graph, URIs.Validations_Expressions_expressionSynchronizer);\r
Validations_Expressions_expressionValidator = getResourceOrNull(graph, URIs.Validations_Expressions_expressionValidator);\r
Validations_Functions = getResourceOrNull(graph, URIs.Validations_Functions);\r
Validations_Functions_baseRealizationFunction = getResourceOrNull(graph, URIs.Validations_Functions_baseRealizationFunction);\r
+ Validations_Functions_path = getResourceOrNull(graph, URIs.Validations_Functions_path);\r
Validations_MissingDependencyConstraint = getResourceOrNull(graph, URIs.Validations_MissingDependencyConstraint);\r
Validations_MissingLinkIssue = getResourceOrNull(graph, URIs.Validations_MissingLinkIssue);\r
Validations_NoSuchVariableIssue = getResourceOrNull(graph, URIs.Validations_NoSuchVariableIssue);\r
}\r
}\r
\r
- GraphUtils.create2(g,\r
- sr.Validations_Dependencies_MissingDependencyConnectionsIssueSource,\r
- L0X.IsActivatedBy, model,\r
- l0.PartOf, moduleType\r
- );\r
-\r
- GraphUtils.create2(g,\r
- sr.Validations_Dependencies_DependencyConnectionsIssueSource,\r
- L0X.IsActivatedBy, model,\r
- l0.PartOf, moduleType\r
- );\r
-\r
- GraphUtils.create2(g,\r
- sr.Validations_Expressions_ExpressionIssueSource,\r
- L0X.IsActivatedBy, model,\r
- l0.PartOf, moduleType\r
- );\r
-\r
Resource mapping = g.newResource();\r
g.claim(mapping, l0.InstanceOf, null, sr.DiagramToCompositeMapping);\r
g.claim(diagram, L0X.HasTrigger, mapping);\r
import org.simantics.db.layer0.adapter.impl.DefaultPasteImportAdvisor;\r
import org.simantics.graph.representation.TransferableGraph1;\r
import org.simantics.layer0.Layer0;\r
+import org.simantics.layer0.utils.direct.GraphUtils;\r
+import org.simantics.operation.Layer0X;\r
import org.simantics.simulation.ontology.SimulationResource;\r
import org.simantics.structural.stubs.StructuralResource2;\r
import org.simantics.sysdyn.SysdynResource;\r
} else {\r
fixHasTailAndHasHead(graph, ModelRoot);\r
addDependencies(graph, ModelRoot);\r
+ addEnumerationIssueSource(graph, ModelRoot);\r
}\r
}\r
\r
}\r
}\r
\r
+ protected void addEnumerationIssueSource(WriteGraph graph, Resource modelRoot) throws DatabaseException {\r
+ Layer0 L0 = Layer0.getInstance(graph);\r
+ Layer0X L0X = Layer0X.getInstance(graph); \r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ Collection<Resource> enumerationIssueSources = graph.syncRequest(new ObjectsWithType(modelRoot, L0.ConsistsOf, sr.Validations_Enumerations_EnumerationIssueSource));\r
+ if(enumerationIssueSources.isEmpty()) {\r
+ GraphUtils.create2(graph,\r
+ sr.Validations_Enumerations_EnumerationIssueSource,\r
+ L0X.IsActivatedBy, modelRoot,\r
+ L0.PartOf, modelRoot\r
+ ); \r
+ } }\r
+\r
protected void fixHasTailAndHasHead(WriteGraph graph, Resource modelRoot) throws DatabaseException {\r
Layer0 L0 = Layer0.getInstance(graph);\r
SysdynResource sr = SysdynResource.getInstance(graph);\r
}\r
\r
private Collection<Resource> findAllConfigurations(ReadGraph graph, Resource modelRoot) throws DatabaseException {\r
- Layer0 L0 = Layer0.getInstance(graph);\r
SysdynResource sr = SysdynResource.getInstance(graph);\r
StructuralResource2 SR2 = StructuralResource2.getInstance(graph);\r
+ Collection<Resource> modulesAndModels = findAllModelsAndModules(graph, modelRoot);\r
Collection<Resource> configurations = new ArrayList<Resource>();\r
- configurations.add(graph.getPossibleObject(modelRoot, SimulationResource.getInstance(graph).HasConfiguration));\r
\r
- for(Resource r : graph.getObjects(modelRoot, L0.ConsistsOf)) {\r
+ for(Resource r : modulesAndModels) {\r
if(graph.isInheritedFrom(r, sr.Module)) {\r
configurations.add(graph.getPossibleObject(r, SR2.IsDefinedBy));\r
+ } else if(graph.isInstanceOf(r, sr.SysdynModel)) {\r
+ configurations.add(graph.getPossibleObject(modelRoot, SimulationResource.getInstance(graph).HasConfiguration));\r
}\r
}\r
\r
return configurations;\r
}\r
+ \r
+ private Collection<Resource> findAllModelsAndModules(ReadGraph graph, Resource modelRoot) throws DatabaseException {\r
+ Layer0 L0 = Layer0.getInstance(graph);\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ Collection<Resource> modelsAndModules = new ArrayList<Resource>();\r
+ modelsAndModules.add(modelRoot);\r
+\r
+ for(Resource r : graph.getObjects(modelRoot, L0.ConsistsOf)) {\r
+ if(graph.isInheritedFrom(r, sr.Module)) {\r
+ modelsAndModules.add(r);\r
+ }\r
+ }\r
+ \r
+ return modelsAndModules;\r
+ }\r
\r
private void displayErrorMessage(Shell shell, String message) {\r
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ERROR);\r
}\r
}\r
\r
- GraphUtils.create2(g,\r
- sr.Validations_Dependencies_MissingDependencyConnectionsIssueSource,\r
- L0X.IsActivatedBy, model,\r
- l0.PartOf, moduleType\r
- );\r
- \r
- GraphUtils.create2(g,\r
- sr.Validations_Dependencies_DependencyConnectionsIssueSource,\r
- L0X.IsActivatedBy, model,\r
- l0.PartOf, moduleType\r
- );\r
- \r
- GraphUtils.create2(g,\r
- sr.Validations_Expressions_ExpressionIssueSource,\r
- L0X.IsActivatedBy, model,\r
- l0.PartOf, moduleType\r
- );\r
- \r
Resource mapping = g.newResource();\r
g.claim(mapping, l0.InstanceOf, null, sr.DiagramToCompositeMapping);\r
g.claim(diagram, L0X.HasTrigger, mapping);\r
L0X.IsActivatedBy, model,\r
l0.PartOf, model\r
);\r
+ \r
+ GraphUtils.create2(g,\r
+ sr.Validations_Enumerations_EnumerationIssueSource,\r
+ L0X.IsActivatedBy, model,\r
+ l0.PartOf, model\r
+ ); \r
\r
Resource conf = GraphUtils.create2(g,\r
sr.Configuration,\r
--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2012 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.sysdyn.ui.validation;\r
+\r
+import java.util.Collections;\r
+import java.util.List;\r
+\r
+import org.simantics.db.Issue;\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.common.utils.OrderedSetUtils;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.issues.common.StandardIssue;\r
+import org.simantics.scl.reflection.annotations.SCLValue;\r
+import org.simantics.sysdyn.SysdynResource;\r
+\r
+/**\r
+ * Functions for checking issues in Enumerations\r
+ * @author Teemu Lempinen\r
+ *\r
+ */\r
+public class EnumerationFunction {\r
+\r
+ private static String NO_INDEXES = "Enumeration does not contain indexes.";\r
+\r
+ @SCLValue(type = "ReadGraph -> Resource -> [Issue]")\r
+ public static List<Issue> enumerationIndexValidator(ReadGraph graph, Resource component) throws DatabaseException {\r
+\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+\r
+ if(!graph.isInstanceOf(component, sr.Enumeration)) {\r
+ return Collections.emptyList();\r
+ }\r
+\r
+ boolean noIndexes = false;\r
+\r
+ try {\r
+ Resource indexList = graph.getPossibleObject(component, sr.Enumeration_enumerationIndexes);\r
+ List<Resource> indexes = OrderedSetUtils.toList(graph, indexList);\r
+ if(indexes.size() == 0)\r
+ noIndexes = true;\r
+ } catch (DatabaseException e) {\r
+ noIndexes = true;\r
+ }\r
+\r
+ if(noIndexes)\r
+ return Collections.<Issue>singletonList(new StandardIssue(sr.Validations_EmptyEnumerationIssue, component));\r
+ else\r
+ return Collections.emptyList();\r
+ }\r
+\r
+ @SCLValue(type = "ReadGraph -> Resource -> Variable -> String")\r
+ public static String emptyEnumerationIssueDescription(ReadGraph graph, Resource converter, Variable property) throws DatabaseException {\r
+ return NO_INDEXES;\r
+ }\r
+}\r
*******************************************************************************/\r
package org.simantics.sysdyn.ui.validation;\r
\r
+import java.util.List;\r
+\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Resource;\r
+import org.simantics.db.common.utils.NameUtils;\r
import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.issues.common.IssueUtils;\r
+import org.simantics.layer0.Layer0;\r
+import org.simantics.project.ontology.ProjectResource;\r
import org.simantics.scl.reflection.annotations.SCLValue;\r
import org.simantics.simulation.ontology.SimulationResource;\r
import org.simantics.structural.stubs.StructuralResource2;\r
else return null;\r
\r
}\r
+\r
+\r
+ @SCLValue(type = "ReadGraph -> Resource -> Variable -> String")\r
+ public static String path(ReadGraph graph, Resource source, Variable property) throws DatabaseException {\r
+ List<Resource> contexts = IssueUtils.getContextsForProperty(graph, property);\r
+ if (contexts.size() > 0) {\r
+ Resource component = contexts.get(0);\r
+ Layer0 L0 = Layer0.getInstance(graph);\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ ProjectResource PROJECT = ProjectResource.getInstance(graph);\r
+ StringBuilder sb = new StringBuilder("");\r
+ Resource parent = graph.getPossibleObject(component, L0.PartOf);\r
+ boolean first = true;\r
+ while(parent != null && !graph.isInstanceOf(parent, PROJECT.Project)) {\r
+ if(!graph.isInstanceOf(parent, sr.Configuration)) {\r
+ String name = NameUtils.getSafeName(graph, parent);\r
+ if(first) {\r
+ sb.append(name);\r
+ first = false;\r
+ } else {\r
+ sb.insert(0, "/");\r
+ sb.insert(0, name);\r
+ }\r
+ }\r
+ parent = graph.getPossibleObject(parent, L0.PartOf);\r
+ }\r
+ return sb.toString();\r
+ } else {\r
+ return "";\r
+ }\r
+ }\r
}\r