-
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.
Create a BPTS skeleton from a BPEL file
- Loading branch information
Showing
5 changed files
with
264 additions
and
24 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
20 changes: 20 additions & 0 deletions
20
.../src/main/java/net/bpelunit/utils/bptstool/functions/create/NamespacePrefixGenerator.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,20 @@ | ||
package net.bpelunit.utils.bptstool.functions.create; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class NamespacePrefixGenerator { | ||
|
||
private int counter = 1; | ||
private static final String NSPREFIX = "ns"; | ||
|
||
private Map<String, String> namespaceMap = new HashMap<String, String>(); | ||
|
||
public synchronized String getNamespacePrefix(String namespace) { | ||
if(!namespaceMap.containsKey(namespace)) { | ||
namespaceMap.put(namespace, NSPREFIX + (counter++)); | ||
} | ||
return namespaceMap.get(namespace); | ||
} | ||
|
||
} |
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