/* * This file is part of muCommander, http://www.mucommander.com * Copyright (C) 2002-2016 Maxence Bernard * * muCommander is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * muCommander is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.mucommander.command; /** * Defines the structure of a custom associations XML file. * <p> * This interface is only meant as a convenient way of sharing the XML * file format between the {@link AssociationWriter} and {@link AssociationReader}. It will be removed * at bytecode optimisation time. * </p> * <p> * Associations XML files must match the following DTD: * <pre> * <!ELEMENT associations (association*)> * * <!ELEMENT association (filename?,symlink?,hidden?,readable?,writable?,executable?)> * <!ATTLIST association command CDATA #REQUIRED> * * <!ELEMENT filename EMPTY> * <!ATTLIST filename value CDATA #REQUIRED> * <!ATTLIST filename case_sensitive (true|false) #IMPLIED> * * <!ELEMENT symlink EMPTY> * <!ATTLIST symlink value (true|false) #REQUIRED> * * <!ELEMENT hidden EMPTY> * <!ATTLIST hidden value (true|false) #REQUIRED> * * <!ELEMENT readable EMPTY> * <!ATTLIST readable value (true|false) #REQUIRED> * * <!ELEMENT writable EMPTY> * <!ATTLIST writable value (true|false) #REQUIRED> * * <!ELEMENT executable EMPTY> * <!ATTLIST executable value (true|false) #REQUIRED> * </pre> * </p> * @see AssociationReader * @see AssociationWriter * @author Nicolas Rinaudo */ interface AssociationsXmlConstants { // - XML elements ---------------------------------------------------------- // ------------------------------------------------------------------------- /** Root element. */ public static final String ELEMENT_ROOT = "associations"; /** Custom association definition element. */ public static final String ELEMENT_ASSOCIATION = "association"; public static final String ELEMENT_MASK = "filename"; public static final String ELEMENT_IS_SYMLINK = "symlink"; public static final String ELEMENT_IS_HIDDEN = "hidden"; public static final String ELEMENT_IS_READABLE = "readable"; public static final String ELEMENT_IS_WRITABLE = "writable"; public static final String ELEMENT_IS_EXECUTABLE = "executable"; // - Custom association structure ------------------------------------------ // ------------------------------------------------------------------------- /** Name of the attribute containing the alias of the command to execute in this association. */ public static final String ATTRIBUTE_COMMAND = "command"; public static final String ATTRIBUTE_VALUE = "value"; public static final String ATTRIBUTE_CASE_SENSITIVE = "case_sensitive"; public static final String VALUE_TRUE = "true"; public static final String VALUE_FALSE = "false"; }