Package org.apache.xmlgraphics.util

Examples of org.apache.xmlgraphics.util.QName


                this.contextStack.push(array);
                this.nestingInfoStack.push("Alt");
            } else if ("li".equals(localName)) {
                //nop, handle in endElement()
            } else if ("value".equals(localName)) {
                QName name = new QName(uri, qName);
                this.contextStack.push(name);
                this.nestingInfoStack.push("prop:" + name);
            } else {
                throw new SAXException("Unexpected element in the RDF namespace: " + localName);
            }
        } else {
            QName name = new QName(uri, qName);
            this.contextStack.push(name);
            this.nestingInfoStack.push("prop:" + name);
        }
    }
View Full Code Here


                //this.contextStack.pop();
                //this.nestingInfoStack.pop();
            }
        } else {
            XMPProperty prop;
            QName name;
            if (hasComplexContent()) {
                //Pop content of property
                Object obj = this.contextStack.pop();
                this.nestingInfoStack.pop();
               
View Full Code Here

        properties.put(prop.getName(), prop);
    }
   
    /** {@inheritDoc} */
    public XMPProperty getProperty(String uri, String localName) {
        return getProperty(new QName(uri, localName));
    }
View Full Code Here

        handler.startElement(XMPConstants.RDF_NAMESPACE, "RDF", "rdf:RDF", atts);
        //Get all property namespaces
        Set namespaces = new java.util.HashSet();
        Iterator iter = properties.keySet().iterator();
        while (iter.hasNext()) {
            QName n = ((QName)iter.next());
            namespaces.add(n.getNamespaceURI());
        }
        //One Description element per namespace
        iter = namespaces.iterator();
        while (iter.hasNext()) {
            String ns = (String)iter.next();
View Full Code Here

        properties.put(prop.getName(), prop);
    }
   
    /** {@inheritDoc} */
    public XMPProperty getProperty(String uri, String localName) {
        return getProperty(new QName(uri, localName));
    }
View Full Code Here

     * Returns the QName for a property of this schema.
     * @param propName the property name
     * @return the QName for the property
     */
    protected QName getQName(String propName) {
        return new QName(getNamespace(), propName);
    }
View Full Code Here

                }
                Object value = props.getProperty(XMPConstants.RDF_VALUE);
                XMPProperty prop = new XMPProperty(getName(), value);
                Iterator iter = props.iterator();
                while (iter.hasNext()) {
                    QName name = (QName)iter.next();
                    if (!XMPConstants.RDF_VALUE.equals(name)) {
                        prop.setPropertyQualifier(name, props.getProperty(name));
                    }
                }
            }
View Full Code Here

     * Returns the QName for a given property
     * @param propName the property name
     * @return the resulting QName
     */
    protected QName getQName(String propName) {
        return new QName(getSchema().getNamespace(), propName);
    }
View Full Code Here

     * @param propName the property name
     * @param value the String value
     * @param arrayType the type of array to operate on
     */
    private void addStringToArray(String propName, String value, XMPArrayType arrayType) {
        QName name = getQName(propName);
        XMPProperty prop = meta.getProperty(name);
        XMPArray array;
        if (prop == null) {
            array = new XMPArray(arrayType);
            array.add(value);
View Full Code Here

     */
    protected void setLangAlt(String propName, String lang, String value) {
        if (lang == null) {
            lang = XMPConstants.DEFAULT_LANGUAGE;
        }
        QName name = getQName(propName);
        XMPProperty prop = meta.getProperty(name);
        XMPArray array;
        if (prop == null) {
            array = new XMPArray(XMPArrayType.ALT);
            array.add(value, lang);
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.util.QName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.