Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*******************************************************************************
 * Copyright (C) 2010 Ansgar Gerlicher
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * Stuttgart, Hochschule der Medien: http://www.mi.hdm-stuttgart.de/mmb/
 * Collaborative Editing Framework or XML:
 * http://sourceforge.net/projects/cefx/
 * 
 * Dresden, University of Technology, Faculty of Computer Science
 * Computer Networks Group: http://www.rn.inf.tu-dresden.de
 * mobilis project: http://mobilisplatform.sourceforge.net
 ******************************************************************************/

import org.w3c.dom.Element;

public class Main {
    public static final String CEFX_NAMESPACE = "http://www.hdm-stuttgart.de/~gerlicher/cefx";
    public static final String CEFX_LOCKED_ATTR_NAME = "CEFXLOCKED";

    /**
     * Retrieves the client id of the client that locked the given node.
     * @param element the node that is locked.
     * @return the id of the locking client.
     */
    public static String getLockerId(Element element) {
        return element.getAttributeNS(CEFX_NAMESPACE, CEFX_LOCKED_ATTR_NAME);

    }
}