1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.model

File EntityType.java

 

Coverage histogram

../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
2
2
1
95
22
2
1
1
2
1

Classes

Class Line # Actions
EntityType 30 2 0% 2 0
1.0100%
 

Contributing tests

This file is covered by 280 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.model;
21   
22    import java.util.Locale;
23   
24    /**
25    * Represents a type of entity (ie a Model Object such as a Wiki, a Space, a Document, an Attachment, etc).
26    *
27    * @version $Id: 62a7f62fa7f211a32e26ad0c3d915ff57ee41d11 $
28    * @since 2.2M1
29    */
 
30    public enum EntityType
31    {
32    // Note that order below is important since it creates an order.
33    // For example: EntityType.WIKI.ordinal() < EntityType.SPACE.ordinal()
34   
35    /**
36    * Represents a Wiki Entity.
37    */
38    WIKI,
39   
40    /**
41    * Represents a Space Entity.
42    */
43    SPACE,
44   
45    /**
46    * Represents a Document Entity.
47    */
48    DOCUMENT,
49   
50    /**
51    * Represents an Attachment Entity.
52    */
53    ATTACHMENT,
54   
55    /**
56    * Represents an Object Entity.
57    */
58    OBJECT,
59   
60    /**
61    * Represents an Object Property Entity.
62    */
63    OBJECT_PROPERTY,
64   
65    /**
66    * Represents a class property entity.
67    * @since 3.2M1
68    */
69    CLASS_PROPERTY,
70   
71    /**
72    * Represents a structured part of the content of a document or an object property.
73    * @since 6.0M1
74    */
75    BLOCK;
76   
77    /**
78    * The lower case String version of the enum.
79    */
80    private String lowerCase;
81   
 
82  1280 toggle EntityType()
83    {
84  1280 this.lowerCase = name().toLowerCase(Locale.US);
85    }
86   
87    /**
88    * @return the lower case String version of the enum
89    * @since 6.2.1
90    */
 
91  136115 toggle public String getLowerCase()
92    {
93  136109 return this.lowerCase;
94    }
95    }