Author: thorsten
Date: Fri Sep 26 05:11:40 2008
New Revision: 699292
URL: http://svn.apache.org/viewvc?rev=699292&view=rev
Log:
Extracting helper method
Modified:
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
Modified:
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java?rev=699292&r1=699291&r2=699292&view=diff
==============================================================================
---
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
(original)
+++
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
Fri Sep 26 05:11:40 2008
@@ -89,7 +89,7 @@
XMLStreamReader reader = getReader(structurerStream);
StAXOMBuilder builder = new StAXOMBuilder(reader);
OMElement strucuturer = builder.getDocumentElement();
- Iterator<OMNode> structures = strucuturer.getChildrenWithName(new QName(
+ Iterator<OMNode> structures = strucuturer.getChildrenWithName(qIt(
Captions.NS, Captions.STRUCTURE_ELEMENT));
/*
* process all structure elements within this structurer file.
@@ -189,10 +189,10 @@
throws DispatcherException, XMLStreamException, IOException,
JaxenException {
if (component.getQName().equals(
- new QName(Captions.NS, Captions.CONTRACT_ELEMENT))) {
+ qIt(Captions.NS, Captions.CONTRACT_ELEMENT))) {
processContract(component, pathNode);
} else if (component.getQName().equals(
- new QName(Captions.NS, Captions.HOOK_ELEMENT))) {
+ qIt(Captions.NS, Captions.HOOK_ELEMENT))) {
processHook(component, pathNode);
}
}
@@ -278,7 +278,7 @@
OMNamespace space = ns.next();
spaces.add(space);
}
- Iterator<OMElement> parts = content.getChildrenWithName(new QName(
+ Iterator<OMElement> parts = content.getChildrenWithName(qIt(
Captions.NS_CONTRACTS, Captions.PART_ELEMENT));
while (parts.hasNext()) {
OMElement part = parts.next();
@@ -318,6 +318,14 @@
}
/**
+ * @param name
+ * @param uri
+ * @return
+ */
+ private QName qIt(String uri,String name) {
+ return new QName(uri,name);
+ }
+ /**
* @param properties
* @param param
* @throws XMLStreamException