001package org.nuxeo.ecm.platform.indexing.gateway.ws;
002
003import java.io.Serializable;
004
005import org.nuxeo.ecm.core.schema.DocumentType;
006
007/**
008 * JAXB object for {@link DocumentType} export via WS
009 *
010 * @author tiry
011 */
012public class DocumentTypeDescriptor implements Serializable {
013
014    /**
015     *
016     */
017    private static final long serialVersionUID = 1L;
018
019    protected boolean isFile = false;
020
021    protected boolean isFolder = false;
022
023    protected String name;
024
025    protected String[] facets;
026
027    protected String[] schemas;
028
029    public DocumentTypeDescriptor() {
030
031    }
032
033    public DocumentTypeDescriptor(DocumentType docType) {
034        isFile = docType.isFile();
035        isFolder = docType.isFolder();
036        name = docType.getName();
037        facets = docType.getFacets().toArray(new String[docType.getFacets().size()]);
038        schemas = docType.getSchemaNames();
039    }
040
041    public boolean isFile() {
042        return isFile;
043    }
044
045    public void setFile(boolean isFile) {
046        this.isFile = isFile;
047    }
048
049    public boolean isFolder() {
050        return isFolder;
051    }
052
053    public void setFolder(boolean isFolder) {
054        this.isFolder = isFolder;
055    }
056
057    public String getName() {
058        return name;
059    }
060
061    public void setName(String name) {
062        this.name = name;
063    }
064
065    public String[] getFacets() {
066        return facets;
067    }
068
069    public void setFacets(String[] facets) {
070        this.facets = facets;
071    }
072
073    public String[] getSchemas() {
074        return schemas;
075    }
076
077    public void setSchemas(String[] schemas) {
078        this.schemas = schemas;
079    }
080}