Examples of PrefixMap


Examples of org.apache.flex.compiler.common.PrefixMap

     */
    void lookupPrefix(String prefix, IMXMLTagData tag)
    {
        while (tag != null)
        {
            PrefixMap pm = tag.getPrefixMap();
            if (pm != null && pm.containsPrefix(prefix))
                // we found the prefix, and haven't gone past the root tag, so don't need to do anything special
                return;
            else if (tag == rootTag)
                // don't look past the root tag
                tag = null;
View Full Code Here

Examples of org.apache.flex.compiler.common.PrefixMap

    }

    @Override
    public PrefixMap getPrefixMapForData(IMXMLTagData data)
    {
        PrefixMap result = nsMap.get(data);
        if (result != null)
            return result;
        if (data.isCloseTag())
        {
            IMXMLTagData openTagData = data.getParent().findTagOrSurroundingTagContainingOffset(data.getAbsoluteStart());
View Full Code Here

Examples of org.apache.flex.compiler.common.PrefixMap

    {
        MutablePrefixMap compMap = new MutablePrefixMap();
        IMXMLTagData lookingAt = this;
        while (lookingAt != null)
        {
            PrefixMap depth = getParent().getPrefixMapForData(lookingAt);
            if (depth != null)
            {
                compMap.addAll(depth, true);
            }
            lookingAt = lookingAt.getParentTag();
View Full Code Here

Examples of org.apache.flex.compiler.common.PrefixMap

            //walk up our chain to find the correct uri for our namespace.  first one wins
            String prefix = getPrefix();
            IMXMLTagData lookingAt = this;
            while (lookingAt != null)
            {
                PrefixMap depth = getParent().getPrefixMapForData(lookingAt);
                if (depth != null && depth.containsPrefix(prefix))
                {
                    uri = depth.getNamespaceForPrefix(prefix);
                    break;
                }
                lookingAt = lookingAt.getParentTag();
            }
        }
View Full Code Here

Examples of org.apache.flex.compiler.common.PrefixMap

                            data[pos] = fakeMXMLTagData;
                            prefixMap.remove((MXMLTagData)currToken);
                            didNonPayloadRepair = true;      // note a repair, so we can alert caller
                            
                            // If the original tag had a prefix map, transfer to to the new tag.
                            PrefixMap map = ((MXMLTagData)currToken).getPrefixMap();
                            if (map != null)
                                prefixMap.put(fakeMXMLTagData, map);
              break;
            }
            pos++;
View Full Code Here

Examples of org.apache.flex.compiler.common.PrefixMap

            // For attributes with prefix, parent's parent can be null if
            // parent is the root tag
            while (lookingAt != null && lookingAt.getParent() != null)
            {
                PrefixMap depth = lookingAt.getParent().getPrefixMapForData(lookingAt);
                if (depth != null && depth.containsPrefix(prefix))
                {
                    uri = depth.getNamespaceForPrefix(prefix);
                    break;
                }

                lookingAt = lookingAt.getParentTag();
            }
View Full Code Here

Examples of org.apache.jena.riot.system.PrefixMap

   
    private static void printIRI(Writer out, String iriStr, Prologue prologue)
    {
        if ( prologue != null )
        {
            PrefixMap pmap = prologue.getPrefixMap() ;
            if pmap != null )
            {
                String pname = prefixFor(iriStr, pmap) ;
                if ( pname != null )
                {
View Full Code Here

Examples of org.apache.jena.riot.system.PrefixMap

   
    private static void printIRI(Writer out, String iriStr, Prologue prologue)
    {
        if ( prologue != null )
        {
            PrefixMap pmap = prologue.getPrefixMap() ;
            if pmap != null )
            {
                String pname = prefixFor(iriStr, pmap) ;
                if ( pname != null )
                {
View Full Code Here

Examples of org.apache.jena.riot.system.PrefixMap

      // Need to access the prefix mapping.
     
      Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(testString) ;
      StreamRDF sink = StreamRDFLib.sinkNull() ;
      LangTurtle parser = RiotReader.createParserTurtle(tokenizer, "http://base/", sink) ;
      PrefixMap prefixMap = parser.getProfile().getPrologue().getPrefixMap() ;

      prefixMap.add("a", "http://host/a#") ;
        prefixMap.add("x", "http://host/a#") ;
        // Unicode 00E9 is e-acute
        // Unicode 03B1 is alpha
        prefixMap.add("\u00E9", "http://host/e-acute/") ;
        prefixMap.add("\u03B1", "http://host/alpha/") ;
        prefixMap.add("", "http://host/") ;
        prefixMap.add("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#") ;
        prefixMap.add("xsd", "http://www.w3.org/2001/XMLSchema#") ;
        parser.parse();

        tokenizer.close();
  }
View Full Code Here

Examples of org.openjena.riot.system.PrefixMap

   
    static ParserProfile profile()
    {
        // TODO
        // Don't do anything with IRIs.
        Prologue prologue = new Prologue(new PrefixMap(), IRIResolver.createNoResolve()) ;
        ErrorHandler handler = ErrorHandlerFactory.getDefaultErrorHandler() ;
        ParserProfile profile = new ParserProfileBase(prologue, handler) ;
        profile.setLabelToNode(LabelToNode.createUseLabelAsGiven()) ;
        // Include safe bNode labels.
        return profile ;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.