public class Merger extends Object
A class that performs the merging abilities for the AndroMDA core.
Merging takes place when the NamespaceProperties.MERGE_MAPPINGS_URI
is found within the
namespace
and merge mappings are used to replace any matching patterns in the given string
.
Constructor and Description |
---|
Merger() |
Modifier and Type | Method and Description |
---|---|
String |
getMergedString(InputStream inputStream,
String namespace)
Retrieves the merged string.
|
String |
getMergedString(String string,
String namespace)
Retrieves the merged string.
|
static Merger |
instance()
Gets the shared Merger instance.
|
boolean |
requiresMerge(String namespace)
Indicates whether or not the given
namespace
requires a merge. |
public Merger()
public static Merger instance()
public String getMergedString(String string, String namespace)
Retrieves the merged string. The merging takes place when
the NamespaceProperties.MERGE_MAPPINGS_URI
is found within the
namespace
and the merge mappings are used to replace any
matching patterns in the given string
.
string
- the String to be replacednamespace
- This namespace is searched when attempting to find the
NamespaceProperties.MERGE_MAPPINGS_URI
.public String getMergedString(InputStream inputStream, String namespace)
NamespaceProperties.MERGE_MAPPINGS_URI
is found within the
namespace
and the merge mappings are used to replace any
matching patterns in the given inputStream
.
inputStream
- the InputStream instance which is first converted
to a String and then merged.namespace
- This namespace is searched when attempting to find the
NamespaceProperties.MERGE_MAPPINGS_URI
.public boolean requiresMerge(String namespace)
namespace
requires a merge.namespace
- the namespace to evaluate.Copyright © 2003–2014 AndroMDA.org. All rights reserved.