Java Code Examples for com.google.gwt.xml.client.Node#getNamespaceURI()

The following examples show how to use com.google.gwt.xml.client.Node#getNamespaceURI() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EditorPanelAdapter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public InteractionUnit fromXML(Node node) {

    String label = ParseUtils.IDOrLabel(node);

    //QName id = QName.valueOf(node.getAttributes().getNamedItem("id").getNodeValue());
    QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());

    Container container = new Container(
            id.getNamespaceURI(), id.getLocalPart(),
            label,
            TemporalOperator.Choice,
            StereoTypes.EditorPanel);

    return container;
}
 
Example 2
Source File: PropertiesAdapter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public InteractionUnit fromXML(Node node) {
    String label = ParseUtils.IDOrLabel(node);

    String op = ParseUtils.failSafe(node.getAttributes().getNamedItem("operator"), TemporalOperator.Concurrency.toString());

    //QName id = QName.valueOf(node.getAttributes().getNamedItem("id").getNodeValue());
    QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());

    Container properties = new Container(
            id.getNamespaceURI(), id.getLocalPart(),
            label,
            TemporalOperator.valueOf(op),
            StereoTypes.Properties);
    return properties;
}
 
Example 3
Source File: PagesAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public InteractionUnit fromXML(Node node) {

    String label = ParseUtils.IDOrLabel(node);

    QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());
    Container form = new Container(
            id.getNamespaceURI(), id.getLocalPart(),
            label,
            TemporalOperator.Choice,
            StereoTypes.Pages);
    return form;
}
 
Example 4
Source File: PulldownAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public InteractionUnit fromXML(Node node) {

    String label = ParseUtils.IDOrLabel(node);

    QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());
    Container form = new Container(
            id.getNamespaceURI(), id.getLocalPart(),
            label,
            StereoTypes.PullDown);
    return form;
}
 
Example 5
Source File: FormAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public InteractionUnit fromXML(Node node) {
    String label = ParseUtils.IDOrLabel(node);

    //QName id = QName.valueOf(node.getAttributes().getNamedItem("id").getNodeValue());
    QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());

    Container form = new Container(
            id.getNamespaceURI(), id.getLocalPart(),
            label,
            TemporalOperator.Concurrency,
            StereoTypes.Form);
    return form;
}
 
Example 6
Source File: TodoAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public InteractionUnit fromXML(Node node) {

    String label = ParseUtils.IDOrLabel(node);

    String idAtt = UUID.uuid().toString();//node.getAttributes().getNamedItem("id").getNodeValue();
    QName id = new QName(node.getNamespaceURI(), "todo_"+idAtt);
    Output output = new Output(
            id.getNamespaceURI(), id.getLocalPart(),
            label, StereoTypes.Todo);

    return output;
}
 
Example 7
Source File: ToolstripAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public InteractionUnit fromXML(Node node) {

    String label = ParseUtils.IDOrLabel(node);

    QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());
    Container tools = new Container(
            id.getNamespaceURI(), id.getLocalPart(),
            label,
            StereoTypes.Toolstrip);
    return tools;
}
 
Example 8
Source File: UsewareAdapter.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
private InteractionUnit createUnitByName(String name, Node node)
{
    InteractionUnit unit = null;

    //QName.valueOf(node.getAttributes().getNamedItem("id").getNodeValue());
    QName id = new QName(node.getNamespaceURI(), node.getAttributes().getNamedItem("id").getNodeValue());
    String label = ParseUtils.IDOrLabel(node);

    if("container".equals(name))
    {
        String op = ParseUtils.failSafe(node.getAttributes().getNamedItem("operator"), TemporalOperator.Concurrency.toString());
        unit = new Container(
                id.getNamespaceURI(), id.getLocalPart(),
                label,
                TemporalOperator.valueOf(op)
        );

    }
    else if("input".equals(name))
    {
        unit = new Input(id.getNamespaceURI(), id.getLocalPart(),
                label);

    }
    else if("output".equals(name))
    {

        unit = new Output(id.getNamespaceURI(), id.getLocalPart(),
                label);
    }
    else if("select".equals(name))
    {
        unit = new Select(id.getNamespaceURI(), id.getLocalPart(),
                label);
    }
    else if("trigger".equals(name))
    {
        unit = new Trigger(id.getNamespaceURI(), id.getLocalPart(),
                QName.valueOf(ParseUtils.failSafe(node.getAttributes().getNamedItem("type"), "")),
                label);
    }
    else if("link".equals(name))
    {
        unit = new Link(id.getNamespaceURI(), id.getLocalPart(),
                QName.valueOf(ParseUtils.failSafe(node.getAttributes().getNamedItem("target"), "")),
                label);
    }
    return unit;
}