mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge from SEAMIST3
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10730 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
*/
|
||||
package org.alfresco.cmis.dictionary;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* The scope for a CMIS name
|
||||
@@ -37,5 +40,37 @@ package org.alfresco.cmis.dictionary;
|
||||
*/
|
||||
public enum CMISScope
|
||||
{
|
||||
OBJECT, RELATIONSHIP, DOCUMENT, FOLDER, POLICY, UNKNOWN;
|
||||
OBJECT ('O'),
|
||||
RELATIONSHIP ('R'),
|
||||
DOCUMENT ('D'),
|
||||
FOLDER ('F'),
|
||||
POLICY ('P'),
|
||||
UNKNOWN ('U');
|
||||
|
||||
private static Map<Character, CMISScope> discriminatorMap = new HashMap<Character, CMISScope>(10);
|
||||
static
|
||||
{
|
||||
for (CMISScope scope : CMISScope.values())
|
||||
{
|
||||
discriminatorMap.put(scope.discriminator, scope);
|
||||
}
|
||||
}
|
||||
|
||||
private char discriminator;
|
||||
|
||||
CMISScope(char discriminator)
|
||||
{
|
||||
this.discriminator = discriminator;
|
||||
}
|
||||
|
||||
public char discriminator()
|
||||
{
|
||||
return discriminator;
|
||||
}
|
||||
|
||||
public static CMISScope toScope(char discrimator)
|
||||
{
|
||||
return discriminatorMap.get(discrimator);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user