001/*
002 * (C) Copyright 2006-2007 Nuxeo SAS <http://nuxeo.com> and others
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Jean-Marc Orliaguet, Chalmers
011 *
012 * $Id$
013 */
014
015package org.nuxeo.theme.perspectives;
016
017import org.nuxeo.common.xmap.annotation.XNode;
018import org.nuxeo.common.xmap.annotation.XObject;
019import org.nuxeo.theme.relations.Relate;
020import org.nuxeo.theme.types.Type;
021import org.nuxeo.theme.types.TypeFamily;
022
023@XObject("perspective")
024public final class PerspectiveType implements Relate, Type {
025
026    @XNode("@name")
027    public String name;
028
029    @XNode("title")
030    public String title;
031
032    public PerspectiveType() {
033    }
034
035    public PerspectiveType(String name, String title) {
036        this.name = name;
037        this.title = title;
038    }
039
040    public TypeFamily getTypeFamily() {
041        return TypeFamily.PERSPECTIVE;
042    }
043
044    public String getTypeName() {
045        return name;
046    }
047
048    public String hash() {
049        return name;
050    }
051
052    public String getTitle() {
053        return title;
054    }
055
056    public void setTitle(String title) {
057        this.title = title;
058    }
059
060    public String getName() {
061        return name;
062    }
063
064}