public void addNamespace(String prefix, String uri) throws InvalidNamespaceException { AbstractDocumentComponent root = (AbstractDocumentComponent)mXPathOwner. getModel().getRootComponent(); if (root != null) { root.addPrefix(prefix, uri); } } }
public String getPrefix(String namespaceURI) { assert mXPathOwner instanceof AbstractDocumentComponent; String nsPrefix = ((AbstractDocumentComponent) mXPathOwner).lookupPrefix( namespaceURI); return nsPrefix; }
@Override public WebBeansModelImpl getModel() { return (WebBeansModelImpl)super.getModel(); }
protected void checkBaseTypeRef( NamedComponentReference<? extends GlobalType> gTypeRef) { if (gTypeRef != null) { GlobalType derivedFrom = gTypeRef.get(); if (derivedFrom != null) { assert mProcessedType != derivedFrom; // check for other case mDerivationMap.put(mProcessedType, derivedFrom); } } }
public String getNamespaceURI(String prefix) { if (prefix == null || prefix.length() == 0) { // the default namespace isn't supported by BPEL XPath // so, empty prefix corresponds to empty namespace. return XMLConstants.NULL_NS_URI; } assert (mXPathOwner instanceof AbstractDocumentComponent); String nsUri = ((AbstractDocumentComponent) mXPathOwner).lookupNamespaceURI( prefix, true); return nsUri; }
protected String fastGetRefName(NamedComponentReference ref) { if (ref == null) { return null; } String refString = ref.getRefString(); String[] splitRefString = refString.split(":", 2); String result = null; // if (splitRefString.length == 1) { result = splitRefString[0]; } else if (splitRefString.length == 2) { result = splitRefString[1]; } return result; }
protected Object getAttributeValueOf(Attribute attr, String stringValue) { if ( attr instanceof FacesAttributes ){ Class<?> clazz = attr.getType(); if ( clazz.equals( Boolean.class )){ return Boolean.valueOf( stringValue ); } } return stringValue; }
/** * Set the value of the text node from the child element with given QName. * This method is use to implement mapping of "property" as component attribute. * @param propertyName property change event name * @param text the string to set value of the child element text node. * @param qname QName of the child element to get text from. */ protected void setChildElementText(String propertyName, String text, QName qname) { super.setChildElementText(propertyName, text, qname); reorderChildren(); }
protected void appendChild(String propertyName, JSFConfigComponent child) { super.appendChild(propertyName, child); reorderChildren(); }
public String addNamespace(String uri) throws InvalidNamespaceException { AbstractDocumentComponent root = (AbstractDocumentComponent)mXPathOwner. getModel().getRootComponent(); if (root != null) { String prefix = calculateUniqueNsPrefix(); root.addPrefix(prefix, uri); return prefix; } return null; }
public JSFConfigModelImpl getModel(){ return (JSFConfigModelImpl)super.getModel(); }
protected void visitBaseTypeRef( NamedComponentReference<? extends GlobalType> gTypeRef) { if (gTypeRef != null) { GlobalType gt = gTypeRef.get(); if (gt != null) { gt.accept(this); } } }
@Override public void visit(AttributeGroupReference agr) { NamedComponentReference<GlobalAttributeGroup> gagRef = agr.getGroup(); if (gagRef != null) { GlobalAttributeGroup gag = gagRef.get(); if (gag != null) { visit(gag); } } }
@Override public void visit(GroupReference gr) { NamedComponentReference<GlobalGroup> ggRef = gr.getRef(); if (ggRef != null) { GlobalGroup gg = ggRef.get(); if (gg != null) { visit(gg); } } }
@Override public void visit(AttributeReference attrRef) { NamedComponentReference<GlobalAttribute> gAttrRef = attrRef.getRef(); if (gAttrRef != null) { GlobalAttribute gAttr = gAttrRef.get(); if (gAttr != null) { checkAttribute(gAttr); } } }
@Override public void visit(ElementReference er) { NamedComponentReference<GlobalElement> geRef = er.getRef(); if (geRef != null) { GlobalElement ge = geRef.get(); if (ge != null) { visit(ge); } } }
@Override public void visit(AttributeReference ar) { NamedComponentReference<GlobalAttribute> gaRef = ar.getRef(); if (gaRef != null) { GlobalAttribute ga = gaRef.get(); if (ga != null) { visit(ga); } } }
@Override public void visit(AttributeGroupReference agr) { NamedComponentReference<GlobalAttributeGroup> gagRef = agr.getGroup(); if (gagRef != null) { GlobalAttributeGroup gag = gagRef.get(); if (gag != null) { visitAttrContainer(gag); } } }
@Override public void visit(GroupReference gr) { NamedComponentReference<GlobalGroup> ggRef = gr.getRef(); if (ggRef != null) { GlobalGroup gg = ggRef.get(); if (gg != null) { visit(gg); } } }
@Override public void visit(SimpleExtension se) { NamedComponentReference<GlobalType> gtRef = se.getBase(); if (gtRef != null) { GlobalType gt = gtRef.get(); if (gt != null) { visitChildren(gt); } } // visitChildren(se); }