Package org.apache.tapestry.util.xml

Examples of org.apache.tapestry.util.xml.DocumentParseException


    private void copyBindings(String sourceComponentId, IComponentSpecification cs,
            IContainedComponent target)
    {try { __CLOVER_225_0.M[3126]++;
        __CLOVER_225_0.S[13100]++;IContainedComponent source = cs.getComponent(sourceComponentId);
        __CLOVER_225_0.S[13101]++;if ((((source == null) && (++__CLOVER_225_0.CT[2229] != 0)) || (++__CLOVER_225_0.CF[2229] == 0))){
            __CLOVER_225_0.S[13102]++;throw new DocumentParseException(ParseMessages.unableToCopy(sourceComponentId),
                    getLocation(), null);}

        __CLOVER_225_0.S[13103]++;Iterator i = source.getBindingNames().iterator();
        __CLOVER_225_0.S[13104]++;while ((((i.hasNext()) && (++__CLOVER_225_0.CT[2230] != 0)) || (++__CLOVER_225_0.CF[2230] == 0))){
        {
View Full Code Here


        __CLOVER_225_0.S[13210]++;boolean hasCopyOf = Tapestry.isNonBlank(copyOf);

        __CLOVER_225_0.S[13211]++;if ((((hasCopyOf) && (++__CLOVER_225_0.CT[2232] != 0)) || (++__CLOVER_225_0.CF[2232] == 0))){
        {
            __CLOVER_225_0.S[13212]++;if ((((Tapestry.isNonBlank(type)) && (++__CLOVER_225_0.CT[2233] != 0)) || (++__CLOVER_225_0.CF[2233] == 0))){
                __CLOVER_225_0.S[13213]++;throw new DocumentParseException(ParseMessages.bothTypeAndCopyOf(id),
                        getLocation(), null);}
        }}
        else{
        {
            __CLOVER_225_0.S[13214]++;if ((((Tapestry.isBlank(type)) && (++__CLOVER_225_0.CT[2234] != 0)) || (++__CLOVER_225_0.CF[2234] == 0))){
                __CLOVER_225_0.S[13215]++;throw new DocumentParseException(ParseMessages.missingTypeOrCopyOf(id),
                        getLocation(), null);}
        }}

        __CLOVER_225_0.S[13216]++;IContainedComponent cc = _factory.createContainedComponent();
        __CLOVER_225_0.S[13217]++;cc.setType(type);
View Full Code Here

    {try { __CLOVER_225_0.M[3150]++;
        __CLOVER_225_0.S[13255]++;String libraryId = getValidatedAttribute("id", LIBRARY_ID_PATTERN, "invalid-library-id");
        __CLOVER_225_0.S[13256]++;String path = getAttribute("specification-path");

        __CLOVER_225_0.S[13257]++;if ((((libraryId.equals(INamespace.FRAMEWORK_NAMESPACE)) && (++__CLOVER_225_0.CT[2236] != 0)) || (++__CLOVER_225_0.CF[2236] == 0))){
            __CLOVER_225_0.S[13258]++;throw new DocumentParseException(ParseMessages
                    .frameworkLibraryIdIsReserved(INamespace.FRAMEWORK_NAMESPACE), getLocation(),
                    null);}

        __CLOVER_225_0.S[13259]++;ILibrarySpecification ls = (ILibrarySpecification) peekObject();
View Full Code Here

    private void expectElement(String elementName)
    {try { __CLOVER_225_0.M[3164]++;
        __CLOVER_225_0.S[13344]++;if ((((_elementName.equals(elementName)) && (++__CLOVER_225_0.CT[2240] != 0)) || (++__CLOVER_225_0.CF[2240] == 0))){
            __CLOVER_225_0.S[13345]++;return;}

        __CLOVER_225_0.S[13346]++;throw new DocumentParseException(ParseMessages.incorrectDocumentType(
                _elementName,
                elementName), getLocation(), null);

    } finally { }}
View Full Code Here

        __CLOVER_225_0.S[13359]++;boolean asAttribute = Tapestry.isNonBlank(attributeValue);
        __CLOVER_225_0.S[13360]++;boolean asContent = Tapestry.isNonBlank(contentValue);

        __CLOVER_225_0.S[13361]++;if ((((asAttribute && asContent) && (++__CLOVER_225_0.CT[2243] != 0)) || (++__CLOVER_225_0.CF[2243] == 0))){
        {
            __CLOVER_225_0.S[13362]++;throw new DocumentParseException(ParseMessages.noAttributeAndBody(
                    attributeName,
                    _elementName), getLocation(), null);
        }}

        __CLOVER_225_0.S[13363]++;if ((((required && !(asAttribute || asContent)) && (++__CLOVER_225_0.CT[2244] != 0)) || (++__CLOVER_225_0.CF[2244] == 0))){
        {
            __CLOVER_225_0.S[13364]++;throw new DocumentParseException(ParseMessages.requiredExtendedAttribute(
                    _elementName,
                    attributeName), getLocation(), null);
        }}

        __CLOVER_225_0.S[13365]++;if ((((asAttribute) && (++__CLOVER_225_0.CT[2245] != 0)) || (++__CLOVER_225_0.CF[2245] == 0))){
View Full Code Here

                __CLOVER_225_0.S[13392]++;_parser = _parserFactory.newSAXParser();}

            __CLOVER_225_0.S[13393]++;URL resourceURL = resource.getResourceURL();

            __CLOVER_225_0.S[13394]++;if ((((resourceURL == null) && (++__CLOVER_225_0.CT[2249] != 0)) || (++__CLOVER_225_0.CF[2249] == 0))){
                __CLOVER_225_0.S[13395]++;throw new DocumentParseException(ParseMessages.missingResource(resource), resource);}

            __CLOVER_225_0.S[13396]++;InputStream rawStream = resourceURL.openStream();
            __CLOVER_225_0.S[13397]++;stream = new BufferedInputStream(rawStream);

            __CLOVER_225_0.S[13398]++;_parser.parse(stream, this, resourceURL.toExternalForm());

            __CLOVER_225_0.S[13399]++;stream.close();
            __CLOVER_225_0.S[13400]++;stream = null;

            __CLOVER_225_0.S[13401]++;success = true;
        }
        catch (Exception ex)
        {
            __CLOVER_225_0.S[13402]++;_parser = null;

            __CLOVER_225_0.S[13403]++;throw new DocumentParseException(ParseMessages.errorReadingResource(resource, ex),
                    resource, ex);
        }
        finally
        {
            __CLOVER_225_0.S[13404]++;if ((((!success) && (++__CLOVER_225_0.CT[2250] != 0)) || (++__CLOVER_225_0.CF[2250] == 0))){
View Full Code Here

        }}

        __CLOVER_225_0.S[13427]++;if ((((TAPESTRY_DTD_3_0_PUBLIC_ID.equals(publicId)) && (++__CLOVER_225_0.CT[2253] != 0)) || (++__CLOVER_225_0.CF[2253] == 0))){
            __CLOVER_225_0.S[13428]++;return getDTDInputSource("Tapestry_3_0.dtd");}

        __CLOVER_225_0.S[13429]++;throw new DocumentParseException(ParseMessages.unknownPublicId(getResource(), publicId),
                getResource());
    } finally { }}
View Full Code Here

            __CLOVER_368_0.S[8098]++;parser.parse(is, this);
        }
        catch (Exception ex)
        {
            __CLOVER_368_0.S[8099]++;throw new DocumentParseException(ex.getMessage(), getResource(), ex);
        }
    } finally { }}
View Full Code Here

        __CLOVER_368_0.S[8234]++;while ((((i.hasNext()) && (++__CLOVER_368_0.CT[1396] != 0)) || (++__CLOVER_368_0.CF[1396] == 0))){
        {
            __CLOVER_368_0.S[8235]++;String name = (String) i.next();

            __CLOVER_368_0.S[8236]++;if ((((!epi.isKnown(name)) && (++__CLOVER_368_0.CT[1397] != 0)) || (++__CLOVER_368_0.CF[1397] == 0))){
                __CLOVER_368_0.S[8237]++;throw new DocumentParseException(
                    ScriptMessages.unexpectedAttributeInElement(name, _elementName),
                    getLocation(),
                    null);}
        }}

        // Now check that all required attributes have been specified.

        __CLOVER_368_0.S[8238]++;i = epi.getRequiredNames();
        __CLOVER_368_0.S[8239]++;while ((((i.hasNext()) && (++__CLOVER_368_0.CT[1398] != 0)) || (++__CLOVER_368_0.CF[1398] == 0))){
        {
            __CLOVER_368_0.S[8240]++;String name = (String) i.next();

            __CLOVER_368_0.S[8241]++;if ((((!_attributes.containsKey(name)) && (++__CLOVER_368_0.CT[1399] != 0)) || (++__CLOVER_368_0.CF[1399] == 0))){
                __CLOVER_368_0.S[8242]++;throw new DocumentParseException(
                    ScriptMessages.missingRequiredAttribute(name, _elementName),
                    getLocation(),
                    null);}
        }}
View Full Code Here

    private void copyBindings(String sourceComponentId, IComponentSpecification cs,
            IContainedComponent target)
    {
        IContainedComponent source = cs.getComponent(sourceComponentId);
        if (source == null)
            throw new DocumentParseException(ParseMessages.unableToCopy(sourceComponentId),
                    getLocation());

        Iterator i = source.getBindingNames().iterator();
        while (i.hasNext())
        {
View Full Code Here

TOP

Related Classes of org.apache.tapestry.util.xml.DocumentParseException

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.