Package org.apache.jena.fuseki.validation

Examples of org.apache.jena.fuseki.validation.QueryValidator$Content


          Element emt = processElementFragment(factory, stream);
          stream.next();
          return emt;

        case DTD:
          Content dt = DTDParser.parse(stream.getText(), factory);
          stream.next();
          return dt;

        case CDATA:
          Content cd = factory.cdata(stream.getText());
          stream.next();
          return cd;

        case SPACE:
        case CHARACTERS:
          Content txt = factory.text(stream.getText());
          stream.next();
          return txt;

        case COMMENT:
          Content comment = factory.comment(stream.getText());
          stream.next();
          return comment;

        case ENTITY_REFERENCE:
          Content er = factory.entityRef(stream.getLocalName());
          stream.next();
          return er;

        case PROCESSING_INSTRUCTION:
          Content pi = factory.processingInstruction(
              stream.getPITarget(), stream.getPIData());
          stream.next();
          return pi;

        default:
View Full Code Here


    public static String textValueOf(Element htmlElement) {
        List<Content> htmlContent = htmlElement.getContent();
        if(htmlContent.isEmpty()) {
            return null;
        }
        Content content = htmlContent.get(0);
        if(!(content instanceof Text)) {
            return null;
        }
        Text htmlText = (Text) content;
        return normalized(htmlText.getValue());
View Full Code Here

            //
            //  In many cases these are the same.  [linktext|linkref].
            //
            if( VariableManager.isVariableLink( linktext ) )
            {
                Content el = new VariableContent(linktext);

                addElement( el );
            }
            else if( isExternalLink( linkref ) )
            {
View Full Code Here

            int idxOfFirstContent = 0;
            int count = 0;

            for( Iterator i = kids.iterator(); i.hasNext(); count++ )
            {
                Content c = (Content) i.next();
                if( c instanceof Element )
                {
                    String name = ((Element)c).getName();
                    if( isBlockLevel(name) ) break;
                }

                if( !(c instanceof ProcessingInstruction) )
                {
                    ls.add( c );
                    if( idxOfFirstContent == 0 ) idxOfFirstContent = count;
                }
            }

            //
            //  If there were any elements, then add a new <p> (unless it would
            //  be an empty one)
            //
            if( ls.size() > 0 )
            {
                Element newel = new Element("p");

                for( Iterator i = ls.iterator(); i.hasNext(); )
                {
                    Content c = (Content) i.next();

                    c.detach();
                    newel.addContent(c);
                }

                //
                // Make sure there are no empty <p/> tags added.
View Full Code Here

    public static String textValueOf(Element htmlElement) {
        List<Content> htmlContent = htmlElement.getContent();
        if(htmlContent.isEmpty()) {
            return null;
        }
        Content content = htmlContent.get(0);
        if(!(content instanceof Text)) {
            return null;
        }
        Text htmlText = (Text) content;
        return normalized(htmlText.getValue());
View Full Code Here

TOP

Related Classes of org.apache.jena.fuseki.validation.QueryValidator$Content

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.