protected Database databaseForResource ( final TokenProxy < ? , TokenType . Simple > tokenProxy , final Resource resource , final String domain ) throws HodErrorException { final ResourceIdentifier resourceIdentifier = new ResourceIdentifier ( domain , resource . getResource ( ) ) ; final Set < String > parametricFields ; if ( tokenProxy == null ) { parametricFields = indexFieldsService . getParametricFields ( resourceIdentifier ) ; } else { parametricFields = indexFieldsService . getParametricFields ( tokenProxy , resourceIdentifier ) ; } return new Database . Builder ( ) . setName ( resource . getResource ( ) ) . setDisplayName ( resource . getDisplayName ( ) ) . setIsPublic ( ResourceIdentifier . PUBLIC_INDEXES_DOMAIN . equals ( domain ) ) . setDomain ( domain ) . setIndexFields ( parametricFields ) . build ( ) ; }
Converts the given resource name to a database