org.eclipse.emf.ecore.xmi.impl
Class XMLHelperImpl.NamespaceSupport

java.lang.Object
  extended byorg.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.NamespaceSupport
Enclosing class:
XMLHelperImpl

protected static class XMLHelperImpl.NamespaceSupport
extends Object

A helper to encode namespace prefix mappings.


Field Summary
protected  int[] context
           
protected  int currentContext
           
protected  String[] namespace
           
protected  int namespaceSize
           
protected  String[] prefixes
           
 
Constructor Summary
protected XMLHelperImpl.NamespaceSupport()
           
 
Method Summary
 boolean declarePrefix(String prefix, String uri)
           
 String getDeclaredPrefixAt(int index)
           
 int getDeclaredPrefixCount()
           
 String getPrefix(String uri)
           
 String getURI(String prefix)
           
 void popContext()
           
 void popContext(Map prefixesToFactories)
           
 void pushContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespace

protected String[] namespace

namespaceSize

protected int namespaceSize

context

protected int[] context

currentContext

protected int currentContext

prefixes

protected String[] prefixes
Constructor Detail

XMLHelperImpl.NamespaceSupport

protected XMLHelperImpl.NamespaceSupport()
Method Detail

pushContext

public void pushContext()

popContext

public void popContext()

popContext

public void popContext(Map prefixesToFactories)

declarePrefix

public boolean declarePrefix(String prefix,
                             String uri)
Parameters:
prefix - prefix to declare
uri - uri that maps to the prefix
Returns:
true if the prefix existed in the current context and its uri has been remapped; false if prefix does not exist in the current context

getURI

public String getURI(String prefix)

getPrefix

public String getPrefix(String uri)

getDeclaredPrefixCount

public int getDeclaredPrefixCount()

getDeclaredPrefixAt

public String getDeclaredPrefixAt(int index)

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.