buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/SAXContentHandlerExt.java
changeset 628 7c4a911dc066
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *
       
    16  */
       
    17 
       
    18 package com.nokia.helium.ant.data;
       
    19 
       
    20 import org.dom4j.DocumentFactory;
       
    21 import org.dom4j.io.SAXContentHandler;
       
    22 import org.xml.sax.Locator;
       
    23 
       
    24 /**
       
    25  * An extension of SAXContentHandler that allows the Locator to be accessed.
       
    26  */
       
    27 public class SAXContentHandlerExt extends SAXContentHandler {
       
    28     private Locator locator;
       
    29 
       
    30     public SAXContentHandlerExt(DocumentFactory documentFactory) {
       
    31         super(documentFactory, null);
       
    32     }
       
    33 
       
    34     public void setDocumentLocator(Locator documentLocator) {
       
    35         super.setDocumentLocator(documentLocator);
       
    36         this.locator = documentLocator;
       
    37     }
       
    38 
       
    39     public Locator getDocumentLocator() {
       
    40         return locator;
       
    41     }
       
    42 }