X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.document.ui%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fui%2Fgraphfile%2FDocumentVersionUtils.java;h=c53fd1ab37038a1791a1603102aad54035065b7d;hp=82372f1264a568c21a06927a59c147f7583b6f24;hb=c8e675ae59eebb045a095a07e54462d0fe87f5cb;hpb=8783f9ee2b67f83160d88f43a7aef02a6b25f955 diff --git a/bundles/org.simantics.document.ui/src/org/simantics/document/ui/graphfile/DocumentVersionUtils.java b/bundles/org.simantics.document.ui/src/org/simantics/document/ui/graphfile/DocumentVersionUtils.java index 82372f126..c53fd1ab3 100644 --- a/bundles/org.simantics.document.ui/src/org/simantics/document/ui/graphfile/DocumentVersionUtils.java +++ b/bundles/org.simantics.document.ui/src/org/simantics/document/ui/graphfile/DocumentVersionUtils.java @@ -43,7 +43,7 @@ public class DocumentVersionUtils { public static void createNewVersion(WriteGraph graph, Resource oldDocument, Resource newDocument, Resource relation) throws DatabaseException{ DocumentResource doc = DocumentResource.getInstance(graph); if (graph.hasStatement(oldDocument, doc.HasNewerVersion)) - throw new DatabaseException("Document " + NameUtils.getSafeName(graph, oldDocument) +" has already new version"); + throw new DatabaseException("Document " + NameUtils.getSafeName(graph, oldDocument) +" has already new version"); //$NON-NLS-1$ //$NON-NLS-2$ Resource inverse = graph.getInverse(relation); Resource lib = graph.getSingleObject(oldDocument, inverse); @@ -81,7 +81,7 @@ public class DocumentVersionUtils { if (!graph.getSingleType(document2, doc.Document).equals(graph.getSingleType(document1, doc.Document))) return; if (!versionRel.equals(doc.HasNewerVersion) && !(versionRel.equals(doc.HasOlderVersion))) - throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel)); + throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel)); //$NON-NLS-1$ Resource versionRelInv = graph.getInverse(versionRel); // toSet must not be part of the document's version history @@ -112,7 +112,7 @@ public class DocumentVersionUtils { if (lib != null) { Resource relation = graph.getPossibleObject(lib, doc.HasLibraryRelation); String type= graph.getPossibleRelatedValue(lib, doc.HasVersionType); - if ("TREE".equals(type) && relation != null) { + if ("TREE".equals(type) && relation != null) { //$NON-NLS-1$ if (versionRel.equals(doc.HasOlderVersion)) { graph.deny(document2, graph.getInverse(relation)); graph.claim(document1,relation,document2); @@ -136,14 +136,14 @@ public class DocumentVersionUtils { public static void unsetVersion(WriteGraph graph, Resource document1, Resource document2, Resource versionRel) throws DatabaseException { DocumentResource doc = DocumentResource.getInstance(graph); if (!versionRel.equals(doc.HasNewerVersion) && !(versionRel.equals(doc.HasOlderVersion))) - throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel)); + throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel)); //$NON-NLS-1$ graph.deny(document1, versionRel,document2); Resource lib = getLib(graph, document1); if (lib != null) { Resource relation = graph.getPossibleObject(lib, doc.HasLibraryRelation); String type= graph.getPossibleRelatedValue(lib, doc.HasVersionType); - if ("TREE".equals(type) && relation != null) { + if ("TREE".equals(type) && relation != null) { //$NON-NLS-1$ if (versionRel.equals(doc.HasOlderVersion)) { graph.deny(document1, relation); graph.claim(lib,relation,document2);