Resource link = null;
DependencyCheckResult result = checkDependecies(graph, document, instance);
if (result == DependencyCheckResult.NoLocationModel)
- throw new DatabaseException("Location of document link is not part of a model.");
+ throw new DatabaseException(Messages.SourceLinkUtil_DatabaseExceptionLocNotModelPart);
if (result == DependencyCheckResult.DifferentModel) {
- throw new DatabaseException("Location of document link and document are in different models, document link cannot be created.");
+ throw new DatabaseException(Messages.SourceLinkUtil_DatabaseExceptionDocumentInDifferentModel);
}
if (result == DependencyCheckResult.NoReferenceModel) {
//referred document and location are not in the same model, create an URI reference.
}
public static Resource createInstanceSource(WriteGraph graph, Resource reference, Resource location) throws DatabaseException {
- return createInstanceSource(graph, reference, location, "");
+ return createInstanceSource(graph, reference, location, ""); //$NON-NLS-1$
}
public static Resource createInstanceSource(WriteGraph graph, Resource reference, Resource location, String comment) throws DatabaseException {
}
public static Resource createInstanceSource(WriteGraph graph, String reference, Resource location) throws DatabaseException {
- return createInstanceSource(graph, reference, location, "");
+ return createInstanceSource(graph, reference, location, ""); //$NON-NLS-1$
}
public static Resource createInstanceSource(WriteGraph graph, String reference, Resource location, String comment) throws DatabaseException {
}
public static Resource createFunctionalSource(WriteGraph graph, Resource reference, Resource location, Resource relation) throws DatabaseException {
- return createFunctionalSource(graph, reference, location, relation, "");
+ return createFunctionalSource(graph, reference, location, relation, ""); //$NON-NLS-1$
}
}
public static Resource createFunctionalSource(WriteGraph graph, String reference, Resource location, Resource relation) throws DatabaseException {
- return createFunctionalSource(graph, reference, location, relation, "");
+ return createFunctionalSource(graph, reference, location, relation, ""); //$NON-NLS-1$
}
} else if (value instanceof Object[]) {
return Arrays.toString((Object[])value);
} else {
- return "TODO: Array " + value.getClass().getSimpleName();
+ return "TODO: Array " + value.getClass().getSimpleName(); //$NON-NLS-1$
}
} else {
return value.toString();
}
public static String getCustomizedString(ReadGraph graph, Resource document, List<String> annotationContent) throws DatabaseException{
- String label = "";
+ String label = ""; //$NON-NLS-1$
Variable doc = graph.adapt(document, Variable.class);
for (String path : annotationContent) {
- if (path.startsWith("\"") && path.endsWith("\"")) {
- label += path.substring(1,path.length()-1)+ " ";
+ if (path.startsWith("\"") && path.endsWith("\"")) { //$NON-NLS-1$ //$NON-NLS-2$
+ label += path.substring(1,path.length()-1)+ " "; //$NON-NLS-1$
} else {
Variable v = PredefinedVariables.getInstance().getVariable(graph, path, null, doc);
if (v != null) {
- label += v.getValue(graph) + " ";
+ label += v.getValue(graph) + " "; //$NON-NLS-1$
}
}
}